File tree Expand file tree Collapse file tree 3 files changed +25
-0
lines changed
java/com/programminghoch10/GalaxyWearable Expand file tree Collapse file tree 3 files changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -7,3 +7,4 @@ This is an Xposed variant of [`Linux4/GalaxyWearable`](https://github.com/Linux4
77Additional features:
88* Disable the forced app update prompt when opening the app
99* Disable the required phone permission
10+ * Disable nearby WiFi devices permission
Original file line number Diff line number Diff line change 11com.programminghoch10.GalaxyWearable.DisableForcedUpdateHook
22com.programminghoch10.GalaxyWearable.DisableManufacturerCheckHook
3+ com.programminghoch10.GalaxyWearable.DisableNearbyWifiDevicesPermissionHook
34com.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 DisableNearbyWifiDevicesPermissionHook implements IXposedHookLoadPackage {
10+ /*
11+ I don't know what this app needs nearby WiFi devices for...
12+ */
13+
14+ @ SuppressWarnings ("unchecked" )
15+ @ Override
16+ public void handleLoadPackage (XC_LoadPackage .LoadPackageParam lpparam ) throws Throwable {
17+ if (!lpparam .packageName .equals ("com.samsung.android.app.watchmanager" )) return ;
18+ Class <?> PermissionsUtilsClass =
19+ XposedHelpers .findClass ("com.samsung.android.app.watchmanager.setupwizard.permission.PermissionUtils" , lpparam .classLoader );
20+ ArrayList <String > INITIAL_PERMISSION = (ArrayList <String >) XposedHelpers .getStaticObjectField (PermissionsUtilsClass , "INITIAL_PERMISSION" );
21+ INITIAL_PERMISSION .remove ("android.permission.NEARBY_WIFI_DEVICES" );
22+ }
23+ }
You can’t perform that action at this time.
0 commit comments