Skip to content

Commit 38d160b

Browse files
author
root
committed
Xposed Dex for One UI 3.1 with features: Make all apps immersive, Fix samsung browser secret mode and always visible scrollbar, Fix SoundTouch landscape mode, Hide task button, Hide date below clock on right side, Hide taskbar separators and if both checked increment size of icons in taskbar.
1 parent c33d969 commit 38d160b

File tree

6 files changed

+55
-80
lines changed

6 files changed

+55
-80
lines changed

.classpath

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
<classpath>
33
<classpathentry kind="src" path="src"/>
44
<classpathentry kind="src" path="gen"/>
5-
<classpathentry kind="con" path="org.eclipse.andmore.ANDROID_FRAMEWORK"/>
6-
<classpathentry exported="true" kind="con" path="org.eclipse.andmore.LIBRARIES"/>
7-
<classpathentry exported="true" kind="con" path="org.eclipse.andmore.DEPENDENCIES"/>
5+
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
6+
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
7+
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.DEPENDENCIES"/>
88
<classpathentry kind="lib" path="lib/api-82.jar" sourcepath="lib/api-82-sources.jar"/>
99
<classpathentry kind="output" path="bin/classes"/>
1010
</classpath>

.project

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@
66
</projects>
77
<buildSpec>
88
<buildCommand>
9-
<name>org.eclipse.andmore.ResourceManagerBuilder</name>
9+
<name>com.android.ide.eclipse.adt.ResourceManagerBuilder</name>
1010
<arguments>
1111
</arguments>
1212
</buildCommand>
1313
<buildCommand>
14-
<name>org.eclipse.andmore.PreCompilerBuilder</name>
14+
<name>com.android.ide.eclipse.adt.PreCompilerBuilder</name>
1515
<arguments>
1616
</arguments>
1717
</buildCommand>
@@ -21,13 +21,13 @@
2121
</arguments>
2222
</buildCommand>
2323
<buildCommand>
24-
<name>org.eclipse.andmore.ApkBuilder</name>
24+
<name>com.android.ide.eclipse.adt.ApkBuilder</name>
2525
<arguments>
2626
</arguments>
2727
</buildCommand>
2828
</buildSpec>
2929
<natures>
30-
<nature>org.eclipse.andmore.AndroidNature</nature>
30+
<nature>com.android.ide.eclipse.adt.AndroidNature</nature>
3131
<nature>org.eclipse.jdt.core.javanature</nature>
3232
</natures>
3333
</projectDescription>

bin/com.pijulius.xposeddex.apk

-385 Bytes
Binary file not shown.

res/values/strings.xml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,14 @@
99
<string name="settings_make_apps_immersive_sum">Will remove window titlebar for maximized applications.</string>
1010
<string name="settings_fix_sbrowser">Fix Samsung Browser</string>
1111
<string name="settings_fix_sbrowser_sum">Enables secret mode and disable always visible scroll bar.</string>
12+
<string name="settings_fix_soundtouch">Fix SoundTouch</string>
13+
<string name="settings_fix_soundtouch_sum">Make Bose SoundTouch app to be landscape and always show volume control slider.</string>
1214

1315
<string name="settings_samsung_dex_taskbar">Dex Taskbar</string>
14-
<string name="settings_fix_taskbar">Taskbar Fixes</string>
15-
<string name="settings_fix_taskbar_sum">Add small space above app docks running marker.</string>
1616
<string name="settings_hide_tasks_button">Hide Tasks Button</string>
1717
<string name="settings_hide_tasks_button_sum">Removes the Tasks button from the taskbar.</string>
18-
<string name="settings_hide_nosim_icon">Hide NoSIM Icon</string>
19-
<string name="settings_hide_nosim_icon_sum">Removes the NoSIM icon from statusbar.</string>
20-
<string name="settings_hide_battery_percentage">Hide Battery Percentage</string>
21-
<string name="settings_hide_battery_percentage_sum">Removes the battery percentage from statusbar.</string>
18+
<string name="settings_hide_date">Hide Date</string>
19+
<string name="settings_hide_date_sum">Removes the date from the taskbar below the clock.</string>
2220
<string name="settings_hide_taskbar_separators">Hide Taskbar Separators</string>
2321
<string name="settings_hide_taskbar_separators_sum">Removes empty gaps (separators) from taskbar.</string>
2422

res/xml/settings.xml

Lines changed: 11 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,18 @@
1919
android:title="@string/settings_fix_sbrowser"
2020
android:key="fixSBrowser" />
2121

22+
<CheckBoxPreference
23+
android:name="@string/settings_fix_soundtouch"
24+
android:summary="@string/settings_fix_soundtouch_sum"
25+
android:defaultValue="true"
26+
android:title="@string/settings_fix_soundtouch"
27+
android:key="fixSoundTouch" />
28+
2229
</PreferenceCategory>
2330

2431
<PreferenceCategory
2532
android:title="@string/settings_samsung_dex_taskbar">
2633

27-
<CheckBoxPreference
28-
android:name="@string/settings_fix_taskbar"
29-
android:summary="@string/settings_fix_taskbar_sum"
30-
android:defaultValue="true"
31-
android:title="@string/settings_fix_taskbar"
32-
android:key="fixTaskbar" />
33-
3434
<CheckBoxPreference
3535
android:name="@string/settings_hide_tasks_button"
3636
android:summary="@string/settings_hide_tasks_button_sum"
@@ -39,18 +39,11 @@
3939
android:key="hideTasksButton" />
4040

4141
<CheckBoxPreference
42-
android:name="@string/settings_hide_nosim_icon"
43-
android:summary="@string/settings_hide_nosim_icon_sum"
44-
android:defaultValue="true"
45-
android:title="@string/settings_hide_nosim_icon"
46-
android:key="hideNoSIMIcon" />
47-
48-
<CheckBoxPreference
49-
android:name="@string/settings_hide_battery_percentage"
50-
android:summary="@string/settings_hide_battery_percentage_sum"
42+
android:name="@string/settings_hide_date"
43+
android:summary="@string/settings_hide_date_sum"
5144
android:defaultValue="true"
52-
android:title="@string/settings_hide_battery_percentage"
53-
android:key="hideBatteryPercentage" />
45+
android:title="@string/settings_hide_date"
46+
android:key="hideDate" />
5447

5548
<CheckBoxPreference
5649
android:name="@string/settings_hide_taskbar_separators"

src/com/pijulius/xposeddex/XposedDex.java

Lines changed: 33 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,13 @@ public void handleInitPackageResources(InitPackageResourcesParam resparam) throw
4747
settings = new XSharedPreferences(new File(settingsFile));
4848

4949
taskbarResourceFixes(resparam);
50+
51+
if (settings.getBoolean("fixSoundTouch", true))
52+
soundtouchResourceFixes(resparam);
5053
}
5154

5255
public void makeAppsImmersive(LoadPackageParam lpparam) {
53-
Class<?> hookClass = findClass("com.android.internal.policy.MultiWindowDecorSupport",
56+
Class<?> hookClass = findClass("com.android.internal.policy.DecorView",
5457
lpparam.classLoader);
5558

5659
XposedBridge.hookAllMethods(hookClass, "isImmersiveMode", new XC_MethodHook() {
@@ -67,9 +70,9 @@ public void taskbarResourceFixes(InitPackageResourcesParam resparam) {
6770

6871
final boolean hideTasksButton = settings.getBoolean("hideTasksButton", true);
6972
final boolean hideTaskbarSeparators = settings.getBoolean("hideTaskbarSeparators", true);
70-
final boolean spaceAboveAppDock = settings.getBoolean("fixTaskbar", true);
73+
final boolean hideDate = settings.getBoolean("hideDate", true);
7174

72-
if (hideTasksButton || hideTaskbarSeparators || spaceAboveAppDock) {
75+
if (hideTasksButton || hideTaskbarSeparators || hideDate) {
7376
resparam.res.hookLayout("com.samsung.desktopsystemui", "layout", "taskbar", new XC_LayoutInflated() {
7477
@Override
7578
public void handleLayoutInflated(XC_LayoutInflated.LayoutInflatedParam liparam) throws Throwable {
@@ -111,70 +114,51 @@ public void handleLayoutInflated(XC_LayoutInflated.LayoutInflatedParam liparam)
111114
marginParams.setMarginEnd(0);
112115
}
113116

114-
if (spaceAboveAppDock) {
117+
if (hideTasksButton && hideTaskbarSeparators) {
115118
view = (View)liparam.view.findViewById(liparam.res.getIdentifier(
116119
"appdock_container", "id", "com.samsung.desktopsystemui"));
117120

118-
view.setPadding(0, 4, 0, 0);
121+
MarginLayoutParams marginParams = (MarginLayoutParams)view.getLayoutParams();
122+
marginParams.setMarginStart(400);
123+
marginParams.setMarginEnd(550);
119124
}
120-
}
121-
});
122-
}
123-
124-
if (settings.getBoolean("hideNoSIMIcon", true)) {
125-
resparam.res.hookLayout("com.samsung.desktopsystemui", "layout", "desk_signal_cluster_view_25", new XC_LayoutInflated() {
126-
@Override
127-
public void handleLayoutInflated(XC_LayoutInflated.LayoutInflatedParam liparam) throws Throwable {
128-
View view = null;
129125

130-
view = (View)liparam.view.findViewById(liparam.res.getIdentifier(
131-
"no_sims_combo", "id", "com.samsung.desktopsystemui"));
132-
133-
view.setVisibility(View.GONE);
134-
view.getLayoutParams().width = 0;
135-
136-
view = (View)liparam.view.findViewById(liparam.res.getIdentifier(
137-
"sec_no_sim_slot1", "id", "com.samsung.desktopsystemui"));
138-
139-
view.setVisibility(View.GONE);
140-
view.getLayoutParams().width = 0;
141-
142-
view = (View)liparam.view.findViewById(liparam.res.getIdentifier(
143-
"sec_no_sim_slot2", "id", "com.samsung.desktopsystemui"));
126+
if (hideDate) {
127+
view = (View)liparam.view.findViewById(liparam.res.getIdentifier(
128+
"date", "id", "com.samsung.desktopsystemui"));
144129

145-
view.setVisibility(View.GONE);
146-
view.getLayoutParams().width = 0;
130+
view.setVisibility(View.GONE);
131+
view.getLayoutParams().width = 0;
132+
view.setPadding(0, 0, 0, 0);
133+
}
147134
}
148135
});
149136
}
150137

151-
if (settings.getBoolean("hideBatteryPercentage", true)) {
152-
resparam.res.hookLayout("com.samsung.desktopsystemui", "layout", "battery_percentage_view", new XC_LayoutInflated() {
138+
if (hideTaskbarSeparators) {
139+
resparam.res.hookLayout("com.samsung.desktopsystemui", "layout", "pinned_apps_divider", new XC_LayoutInflated() {
153140
@Override
154141
public void handleLayoutInflated(XC_LayoutInflated.LayoutInflatedParam liparam) throws Throwable {
155142
View view = null;
156143

157-
view = (View)liparam.view.findViewById(liparam.res.getIdentifier(
158-
"battery_percentage_view", "id", "com.samsung.desktopsystemui"));
144+
if (hideTaskbarSeparators) {
145+
view = (View)liparam.view.findViewById(liparam.res.getIdentifier(
146+
"pinned_apps_divider", "id", "com.samsung.desktopsystemui"));
159147

160-
view.setVisibility(View.GONE);
148+
view.setVisibility(View.GONE);
149+
view.getLayoutParams().width = 0;
150+
view.setPadding(0, 0, 0, 0);
151+
}
161152
}
162153
});
154+
}
155+
}
163156

164-
resparam.res.hookLayout("com.samsung.desktopsystemui", "layout", "desk_system_icons", new XC_LayoutInflated() {
165-
@Override
166-
public void handleLayoutInflated(XC_LayoutInflated.LayoutInflatedParam liparam) throws Throwable {
167-
View view = null;
168-
169-
view = (View)liparam.view.findViewById(liparam.res.getIdentifier(
170-
"system_icons_battery_container", "id", "com.samsung.desktopsystemui"));
157+
public void soundtouchResourceFixes(InitPackageResourcesParam resparam) {
158+
if (!resparam.packageName.equals("com.bose.soundtouch"))
159+
return;
171160

172-
MarginLayoutParams marginParams = (MarginLayoutParams)view.getLayoutParams();
173-
marginParams.setMarginStart(10);
174-
marginParams.setMarginEnd(10);
175-
}
176-
});
177-
}
161+
resparam.res.setReplacement("com.bose.soundtouch", "bool", "allow_rotation", true);
178162
}
179163

180164
public void sbrowserFixes(LoadPackageParam lpparam) {
@@ -184,7 +168,7 @@ public void sbrowserFixes(LoadPackageParam lpparam) {
184168

185169
Class<?> hookClass = null;
186170

187-
hookClass = findClass("com.sec.android.app.sbrowser.SBrowserCommandLine",
171+
hookClass = findClass("com.sec.android.app.sbrowser.init.SBrowserCommandLine",
188172
lpparam.classLoader);
189173

190174
XposedBridge.hookAllMethods(hookClass, "setSamsungDexEnabled", new XC_MethodHook() {

0 commit comments

Comments
 (0)