File tree Expand file tree Collapse file tree
java/com/programminghoch10/GalaxyWearable Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -4,4 +4,6 @@ Enables running Samsung's GalaxyWearable app and companions on modded Samsung de
44
55This is an Xposed variant of [ ` Linux4/GalaxyWearable ` ] ( https://github.com/Linux4/GalaxyWearable ) .
66
7- Additionally disables the forced app update prompt when opening the app.
7+ Additional features:
8+ * Disable the forced app update prompt when opening the app
9+ * Disable the required phone permission
Original file line number Diff line number Diff line change 11com.programminghoch10.GalaxyWearable.DisableForcedUpdateHook
22com.programminghoch10.GalaxyWearable.DisableManufacturerCheckHook
3+ com.programminghoch10.GalaxyWearable.DisableTelephonyPermissionHook
Original file line number Diff line number Diff line change 1+ package com .programminghoch10 .GalaxyWearable ;
2+
3+ import java .util .ArrayList ;
4+
5+ import de .robv .android .xposed .IXposedHookLoadPackage ;
6+ import de .robv .android .xposed .XposedHelpers ;
7+ import de .robv .android .xposed .callbacks .XC_LoadPackage ;
8+
9+ public class DisableTelephonyPermissionHook implements IXposedHookLoadPackage {
10+ /*
11+ The app says the phone permission is used to "synchronize contacts".
12+ I think this is wrong, since contacts aren't requested,
13+ instead I think read-only access to the phone number and the phone state are used
14+ to automatically enable transparency mode while the user is in a call.
15+ Either way, this should be an optional permission.
16+ */
17+
18+ @ SuppressWarnings ("unchecked" )
19+ @ Override
20+ public void handleLoadPackage (XC_LoadPackage .LoadPackageParam lpparam ) throws Throwable {
21+ if (!lpparam .packageName .equals ("com.samsung.android.app.watchmanager" )) return ;
22+ Class <?> PermissionsUtilsClass =
23+ XposedHelpers .findClass ("com.samsung.android.app.watchmanager.setupwizard.permission.PermissionUtils" , lpparam .classLoader );
24+ ArrayList <String > INITIAL_PERMISSION = (ArrayList <String >) XposedHelpers .getStaticObjectField (PermissionsUtilsClass , "INITIAL_PERMISSION" );
25+ INITIAL_PERMISSION .remove ("android.permission.READ_PHONE_STATE" );
26+ INITIAL_PERMISSION .remove ("android.permission.READ_PHONE_NUMBERS" );
27+ }
28+ }
You can’t perform that action at this time.
0 commit comments