diff --git a/README.md b/README.md
index da0378f..d05d674 100644
--- a/README.md
+++ b/README.md
@@ -1,26 +1,37 @@
-# XposedDex
+# XposedDex One UI 2.1
Samsung Dex modifications through Xposed
1. Immersive Apps,
Will enable the possibility to define which apps to run in Immersive mode so they remove the titlebar when maximized.
2. Hide Dex Logo,
-Removes the Dex logo from the taskbar to have more space (that menu wasn't anyway that useful). (change requires restart)
+Removes the Dex logo from the taskbar to have more space (that menu wasn't anyway that useful).
-3. Hide NoSIM Icon,
-Removes the NoSIM icon from statusbar. (change requires restart)
+3. Hide NoSIM Icon,
+Removes the NoSIM icon from statusbar.
-4. Hide App Overflow Buttons,
-Removes left and right arrows when to many apps are open. (change requires restart)
+4. Hide App Overflow Buttons,
+Removes left and right arrows when to many apps are open.
5. Fix Keyboard,
-Enables floating mode for non qwerty keyboard layouts too and fixes dark mode having a white border around the keyboard. (change requires restart)
+Enables floating mode for non qwerty keyboard layouts too and fixes dark mode having a white border around the keyboard.
6. Fix Samsung Browser,
-Enables secret mode (as it's disabled if Magisk installed) and disable always visible scroll bar (looks ugly under dark mode). (change requires restart)
+Enables secret mode (as it's disabled if Magisk installed) and disable always visible scroll bar (looks ugly under dark mode).
7. Fix Weather,
-Keep displaying weather icon in the statusbar. (change requires restart)
+Keep displaying weather icon in the statusbar.
+
+8. Hide Task Button,
+Remove the tasks button on the taskbar.
+
+9. Hide Status Bar Separators,
+Makes statusbar more compact and hides empty spaces.
+
+10. Taskbar Fixes
+Don't make it fully black (buttons on the taskbar) when window maximized.
+
+NOTE: All changes require a restart.
IMPORTANT: Requires Magisk and edXposed installed on your tablet.
Only tested with One UI 2.1, Android 10, Build T865XXU2BTC7 so latest release for Tab S6
diff --git a/bin/com.pijulius.xposeddex.apk b/bin/com.pijulius.xposeddex.apk
index dceb835..bfce233 100644
Binary files a/bin/com.pijulius.xposeddex.apk and b/bin/com.pijulius.xposeddex.apk differ
diff --git a/res/values/strings.xml b/res/values/strings.xml
index ff55449..a748312 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -13,14 +13,18 @@
Enables secret mode and disable always visible scroll bar.
Fix Weather
Keep displaying weather icon in the statusbar.
- Fix Squid
- Make it Premium and some small fixes.
Dex Taskbar
+ Fix Taskbar
+ Disable setting black backgrounds for statusbar and taskbar buttons on maximized applications.
Hide Dex Logo
Removes the Dex logo from the taskbar.
+ Hide Tasks Button
+ Removes the Tasks button from the taskbar.
Hide NoSIM Icon
Removes the NoSIM icon from statusbar.
+ Hide StatusBar Separators
+ Removes empty gaps from statusbar to make it more compact.
Hide App Overflow Buttons
Removes left and right arrows when to many apps are open.
diff --git a/res/xml/settings.xml b/res/xml/settings.xml
index adeb757..b5d3384 100644
--- a/res/xml/settings.xml
+++ b/res/xml/settings.xml
@@ -33,18 +33,18 @@
android:title="@string/settings_fix_weather"
android:key="fixWeather" />
-
-
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/com/pijulius/xposeddex/XposedDex.java b/src/com/pijulius/xposeddex/XposedDex.java
index 22c7a84..eaf05f8 100644
--- a/src/com/pijulius/xposeddex/XposedDex.java
+++ b/src/com/pijulius/xposeddex/XposedDex.java
@@ -44,6 +44,9 @@ public void handleLoadPackage(LoadPackageParam lpparam) throws Throwable {
immersiveApps(lpparam);
+ if (settings.getBoolean("fixTaskbar", true))
+ taskbarFixes(lpparam);
+
if (settings.getBoolean("fixKeyboard", true))
keyboardFixes(lpparam);
@@ -102,14 +105,44 @@ protected void afterHookedMethod(MethodHookParam param) throws Throwable {
});
}
+ public void taskbarFixes(LoadPackageParam lpparam) {
+ // Taskbar fixes, disable setting the black backgrounds when an app is maximized
+ if (!lpparam.packageName.equals("com.samsung.desktopsystemui"))
+ return;
+
+ Class> hookClass = null;
+
+ hookClass = findClass("com.samsung.desktopsystemui.statusbar.phone.taskbar.views.TaskBarView",
+ lpparam.classLoader);
+
+ XposedBridge.hookAllMethods(hookClass, "setDarkBackground", new XC_MethodHook() {
+ @Override
+ protected void beforeHookedMethod(MethodHookParam param) throws Throwable {
+ param.setResult(false);
+ }
+ });
+
+ hookClass = findClass("com.samsung.desktopsystemui.statusbar.phone.taskbar.desk.DeskStatusBarView",
+ lpparam.classLoader);
+
+ XposedBridge.hookAllMethods(hookClass, "setDarkBackground", new XC_MethodHook() {
+ @Override
+ protected void beforeHookedMethod(MethodHookParam param) throws Throwable {
+ param.setResult(false);
+ }
+ });
+ }
+
public void taskbarResourceFixes(InitPackageResourcesParam resparam) {
if (!resparam.packageName.equals("com.samsung.desktopsystemui"))
return;
final boolean hideDexLogo = settings.getBoolean("hideDexLogo", true);
+ final boolean hideTasksButton = settings.getBoolean("hideTasksButton", true);
final boolean hideAppOverflowButtons = settings.getBoolean("hideAppOverflowButtons", true);
+ final boolean hideStatusBarSeparators = settings.getBoolean("hideStatusBarSeparators", true);
- if (hideDexLogo || hideAppOverflowButtons) {
+ if (hideDexLogo || hideTasksButton || hideAppOverflowButtons || hideStatusBarSeparators) {
resparam.res.hookLayout("com.samsung.desktopsystemui", "layout", "taskbar", new XC_LayoutInflated() {
@Override
public void handleLayoutInflated(XC_LayoutInflated.LayoutInflatedParam liparam) throws Throwable {
@@ -133,6 +166,18 @@ public void handleLayoutInflated(XC_LayoutInflated.LayoutInflatedParam liparam)
marginParams.setMarginEnd(0);
}
+ if (hideTasksButton) {
+ view = (View)liparam.view.findViewById(liparam.res.getIdentifier(
+ "recent_apps", "id", "com.samsung.desktopsystemui"));
+
+ view.setVisibility(View.GONE);
+ view.getLayoutParams().width = 0;
+
+ MarginLayoutParams marginParams = (MarginLayoutParams)view.getLayoutParams();
+ marginParams.setMarginStart(0);
+ marginParams.setMarginEnd(0);
+ }
+
if (hideAppOverflowButtons) {
view = (View)liparam.view.findViewById(liparam.res.getIdentifier(
"button_scroll_left", "id", "com.samsung.desktopsystemui"));
@@ -146,8 +191,89 @@ public void handleLayoutInflated(XC_LayoutInflated.LayoutInflatedParam liparam)
view.setVisibility(View.GONE);
view.getLayoutParams().width = 0;
}
+
+ if (hideStatusBarSeparators) {
+ view = (View)liparam.view.findViewById(liparam.res.getIdentifier(
+ "size_control", "id", "com.samsung.desktopsystemui"));
+
+ MarginLayoutParams marginParams = (MarginLayoutParams)view.getLayoutParams();
+ marginParams.setMarginStart(0);
+ marginParams.setMarginEnd(0);
+
+ view = (View)liparam.view.findViewById(liparam.res.getIdentifier(
+ "desk_status_bar_container", "id", "com.samsung.desktopsystemui"));
+
+ marginParams = (MarginLayoutParams)view.getLayoutParams();
+ marginParams.setMarginStart(0);
+ marginParams.setMarginEnd(0);
+
+ view = (View)liparam.view.findViewById(liparam.res.getIdentifier(
+ "taskbar_divider", "id", "com.samsung.desktopsystemui"));
+
+ view.setVisibility(View.GONE);
+ view.getLayoutParams().width = 0;
+ view.setPadding(0, 0, 0, 0);
+
+ marginParams = (MarginLayoutParams)view.getLayoutParams();
+ marginParams.setMarginStart(0);
+ marginParams.setMarginEnd(0);
+
+ view = (View)liparam.view.findViewById(liparam.res.getIdentifier(
+ "global_function", "id", "com.samsung.desktopsystemui"));
+
+ view.setPadding(0, view.getPaddingTop(), view.getPaddingRight(), view.getPaddingBottom());
+ }
}
});
+
+ if (hideStatusBarSeparators) {
+ resparam.res.hookLayout("com.samsung.desktopsystemui", "layout", "desk_status_bar", new XC_LayoutInflated() {
+ @Override
+ public void handleLayoutInflated(XC_LayoutInflated.LayoutInflatedParam liparam) throws Throwable {
+ View view = null;
+
+ view = (View)liparam.view.findViewById(liparam.res.getIdentifier(
+ "notification_icon_area", "id", "com.samsung.desktopsystemui"));
+
+ view.setPadding(0, view.getPaddingTop(), 0, view.getPaddingBottom());
+
+ MarginLayoutParams marginParams = (MarginLayoutParams)view.getLayoutParams();
+ marginParams.setMarginStart(0);
+ marginParams.setMarginEnd(0);
+
+ view = (View)liparam.view.findViewById(liparam.res.getIdentifier(
+ "system_icon_area_outer", "id", "com.samsung.desktopsystemui"));
+
+ view.setPadding(0, view.getPaddingTop(), 0, view.getPaddingBottom());
+ }
+ });
+
+ resparam.res.setReplacement(
+ "com.samsung.desktopsystemui", "drawable", "desk_panel_view_bg", new XResources.DrawableLoader() {
+ @Override
+ public Drawable newDrawable(XResources res, int id) throws Throwable {
+ return new ColorDrawable(Color.TRANSPARENT);
+ }
+ });
+
+ resparam.res.setReplacement(
+ "com.samsung.desktopsystemui", "drawable", "quick_connect_hidden_icon", new XResources.DrawableLoader() {
+ @SuppressWarnings("deprecation")
+ @Override
+ public Drawable newDrawable(XResources res, int id) throws Throwable {
+ return res.getDrawable(android.R.drawable.arrow_up_float);
+ }
+ });
+
+ resparam.res.setReplacement(
+ "com.samsung.desktopsystemui", "drawable", "stat_notify_more_for_desk", new XResources.DrawableLoader() {
+ @SuppressWarnings("deprecation")
+ @Override
+ public Drawable newDrawable(XResources res, int id) throws Throwable {
+ return res.getDrawable(android.R.drawable.arrow_up_float);
+ }
+ });
+ }
}
if (settings.getBoolean("hideNoSIMIcon", true)) {
@@ -260,12 +386,14 @@ protected void afterHookedMethod(MethodHookParam param) throws Throwable {
}
});
- hookClass = findClass("com.sec.android.daemonapp.app.notification.WeatherNotificationManager",
+ //hookClass = findClass("com.samsung.android.weather.infrastructure.system.android.DesktopModeManager",
+ //hookClass = findClass("com.samsung.android.weather.infrastructure.system.sdl.DesktopModeManager",
+ hookClass = findClass("com.samsung.android.weather.infrastructure.system.sep.DesktopModeManager",
lpparam.classLoader);
- XposedBridge.hookAllMethods(hookClass, "stopPanelOnGoingNoti", new XC_MethodHook() {
+ XposedBridge.hookAllMethods(hookClass, "isDesktopMode", new XC_MethodHook() {
@Override
- protected void beforeHookedMethod(MethodHookParam param) throws Throwable {
+ protected void afterHookedMethod(MethodHookParam param) throws Throwable {
param.setResult(false);
}
});