Skip to content

Commit 77f5752

Browse files
committed
Add hide ATH description option
- bump version to 8.1.1 - add hide ATH description option - add placebo for eXistenZ color theme
1 parent 89e3f8f commit 77f5752

File tree

5 files changed

+23
-16
lines changed

5 files changed

+23
-16
lines changed

AndroidManifest.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
22
package="hk.kennethso168.xposed.advancedrebootmenu"
3-
android:versionCode="14"
4-
android:versionName="8.0.2" >
3+
android:versionCode="15"
4+
android:versionName="8.1.1" >
55

66
<uses-sdk
77
android:minSdkVersion="14"

res/values/arrays.xml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<item name="enable">Show all dialogs</item>
55
<item name="disable">Disable all reboot dialogs</item>
66
</string-array>
7-
<!-- Don't translate all the below strings -->
7+
<!-- Don't change the digits -->
88
<string-array name="confirm_dialog_values">
99
<item name="enable">0</item>
1010
<item name="disable">1</item>
@@ -13,12 +13,14 @@
1313
<item name="default">Default (White)</item>
1414
<item name="dark">Dark</item>
1515
<item name="color">Colorful</item>
16+
<!--<item name="existenz">eXistenZ</item>-->
1617
</string-array>
17-
<!-- Don't translate all the below strings -->
18+
<!-- Don't change the digits -->
1819
<string-array name="icon_color_values">
1920
<item name="default">0</item>
2021
<item name="dark">1</item>
2122
<item name="color">2</item>
23+
<!--<item name="existenz">3</item>-->
2224
</string-array>
2325

2426
</resources>

res/values/strings.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,10 @@
5656
<!-- Do not translate or include the "default" strings in other languages -->
5757
<string name="confirm_dialog_default">0</string>
5858
<string name="icon_color_title_default">0</string>
59-
<string name="no_locked_off_title">Anti-theft helper</string>
59+
<string name="no_locked_off_title">Anti-theft helper (ATH)</string>
6060
<string name="no_locked_off_summ">Disable shutdown, reboot, airplane mode toggle and mobile data toggle functions while the device is still at the lockscreen and not yet unlocked</string>
61+
<string name="ath_hide_desc_title">Hide ATH description</string>
62+
<string name="ath_hide_desc_summ">Hide the \'Device is locked\' option in the power menu, so a thief will have no idea what\'s going on</string>
6163
<string name="remove_reboot_title">Remove reboot item</string>
6264
<string name="remove_reboot_summ">Remove the original reboot item if it exists and advanced reboot is turned off</string>
6365
<string name="remove_screenshot_title">Remove screenshot item</string>

res/xml/preferences.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<CheckBoxPreference android:summary="@string/no_locked_off_summ" android:title="@string/no_locked_off_title" android:key="pref_no_locked_off" android:defaultValue="false"/>
88

9-
<ListPreference android:key="pref_icon_color" android:title="@string/icon_color_title" android:entryValues="@array/icon_color_values" android:entries="@array/icon_color" android:defaultValue="@string/icon_color_title_default"/>
9+
<CheckBoxPreference android:summary="@string/ath_hide_desc_summ" android:key="pref_ath_hide_desc" android:title="@string/ath_hide_desc_title" android:dependency="pref_no_locked_off" android:defaultValue="false"/><ListPreference android:key="pref_icon_color" android:title="@string/icon_color_title" android:entryValues="@array/icon_color_values" android:entries="@array/icon_color" android:defaultValue="@string/icon_color_title_default"/>
1010
<PreferenceScreen android:key="pref_modify_items" android:title="@string/modify_menu_items">
1111
<PreferenceCategory android:key="pref_reboot_item" android:title="@string/sect_reboot_item"><CheckBoxPreference android:summary="@string/enable_reboot_summ" android:key="pref_enable_reboot" android:title="@string/enable_reboot_title" android:defaultValue="true" android:disableDependentsState="true"/><ListPreference android:entries="@array/confirm_dialog" android:key="pref_confirm_dialog" android:title="@string/confirm_dialog_title" android:defaultValue="@string/confirm_dialog_default" android:entryValues="@array/confirm_dialog_values" /><PreferenceScreen android:title="@string/reboot_methods_title" android:key="pref_reboot_methods" android:persistent="false">
1212
<CheckBoxPreference android:defaultValue="true" android:key="pref_rebootsub_soft" android:title="@string/reboot_soft" />
@@ -26,6 +26,7 @@
2626

2727

2828

29+
2930
</PreferenceCategory>
3031
<PreferenceCategory android:title="@string/sect_debug" android:key="pref_debug">
3132
<CheckBoxPreference android:key="pref_hide_ic_launcher" android:title="@string/hide_ic_launcher_title" android:defaultValue="false" /><CheckBoxPreference android:summary="@string/verbose_log_summ" android:key="pref_verbose_log" android:title="@string/verbose_log_title" android:defaultValue="false"/>

src/hk/kennethso168/xposed/advancedrebootmenu/ModRebootMenu.java

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -157,15 +157,16 @@ protected void afterHookedMethod(final MethodHookParam param) throws Throwable {
157157
int IconColorInt = Integer.parseInt(IconColorMode);
158158

159159
//Create "sets" of icons with different color themes of the same icon in one set
160-
int[] mRebootIconSet = {R.drawable.ic_lock_reboot, R.drawable.ic_lock_reboot_dark, R.drawable.ic_lock_reboot_color};
161-
int[] mScreenshotIconSet = {R.drawable.ic_screenshot, R.drawable.ic_screenshot_dark, R.drawable.ic_screenshot_color};
162-
int[] mQuickDialIconSet = {R.drawable.ic_call, R.drawable.ic_call_dark, R.drawable.ic_call_color};
163-
int[] mRebootSoftIconSet = {R.drawable.ic_lock_reboot_soft, R.drawable.ic_lock_reboot_soft_dark, R.drawable.ic_lock_reboot_soft_color};
164-
int[] mRecoveryIconSet = {R.drawable.ic_lock_recovery, R.drawable.ic_lock_recovery_dark, R.drawable.ic_lock_recovery_color};
165-
int[] mBootloaderIconSet = {R.drawable.ic_lock_reboot_bootloader, R.drawable.ic_lock_reboot_bootloader_dark, R.drawable.ic_lock_reboot_bootloader_color};
166-
int[] mExpandStatusBarIconSet = {R.drawable.ic_expand_statusbar, R.drawable.ic_expand_statusbar_dark, R.drawable.ic_expand_statusbar_color};
167-
int[] mToggleDataIconSet = {R.drawable.ic_data, R.drawable.ic_data_dark, R.drawable.ic_data_color};
168-
int[] mDeviceLockedIconSet = {R.drawable.ic_device_locked, R.drawable.ic_device_locked_dark, R.drawable.ic_device_locked_color};
160+
//TODO replace all WIPs with eXistenZ theme icons
161+
int[] mRebootIconSet = {R.drawable.ic_lock_reboot, R.drawable.ic_lock_reboot_dark, R.drawable.ic_lock_reboot_color, R.drawable.ic_wip};
162+
int[] mScreenshotIconSet = {R.drawable.ic_screenshot, R.drawable.ic_screenshot_dark, R.drawable.ic_screenshot_color, R.drawable.ic_wip};
163+
int[] mQuickDialIconSet = {R.drawable.ic_call, R.drawable.ic_call_dark, R.drawable.ic_call_color, R.drawable.ic_wip};
164+
int[] mRebootSoftIconSet = {R.drawable.ic_lock_reboot_soft, R.drawable.ic_lock_reboot_soft_dark, R.drawable.ic_lock_reboot_soft_color, R.drawable.ic_wip};
165+
int[] mRecoveryIconSet = {R.drawable.ic_lock_recovery, R.drawable.ic_lock_recovery_dark, R.drawable.ic_lock_recovery_color, R.drawable.ic_wip};
166+
int[] mBootloaderIconSet = {R.drawable.ic_lock_reboot_bootloader, R.drawable.ic_lock_reboot_bootloader_dark, R.drawable.ic_lock_reboot_bootloader_color, R.drawable.ic_wip};
167+
int[] mExpandStatusBarIconSet = {R.drawable.ic_expand_statusbar, R.drawable.ic_expand_statusbar_dark, R.drawable.ic_expand_statusbar_color, R.drawable.ic_wip};
168+
int[] mToggleDataIconSet = {R.drawable.ic_data, R.drawable.ic_data_dark, R.drawable.ic_data_color, R.drawable.ic_wip};
169+
int[] mDeviceLockedIconSet = {R.drawable.ic_device_locked, R.drawable.ic_device_locked_dark, R.drawable.ic_device_locked_color, R.drawable.ic_wip};
169170

170171
//Set the icons appropriately
171172
//1st level icons
@@ -322,6 +323,7 @@ protected void afterHookedMethod(final MethodHookParam param) throws Throwable {
322323

323324
// III. Remove action items and update positions accordingly
324325
final boolean antiTheftHelperOn = pref.getBoolean("pref_no_locked_off", false);
326+
final boolean hideATHDesc = pref.getBoolean("pref_ath_hide_desc", false);
325327
final boolean removeReboot = pref.getBoolean("pref_remove_reboot", false);
326328
final boolean removeScreenshot = pref.getBoolean("pref_remove_screenshot", false);
327329
final boolean removeAirplane = pref.getBoolean("pref_remove_airplane", false);
@@ -358,7 +360,7 @@ protected void afterHookedMethod(final MethodHookParam param) throws Throwable {
358360

359361
// IV. Add/replace action items and update positions accordingly
360362

361-
if( myKM.inKeyguardRestrictedInputMode()&&antiTheftHelperOn) {
363+
if( myKM.inKeyguardRestrictedInputMode()&&antiTheftHelperOn&&(!hideATHDesc)) {
362364
Object action = Proxy.newProxyInstance(classLoader, new Class<?>[] { actionClass },
363365
new AntiTheftHelperAction(mContext, mDeviceLockedLabel, mDeviceLockedIcon, noLockedOffDialogTitle, noLockedOffDialogMsg));
364366
mItems.add(0, action);

0 commit comments

Comments
 (0)