mirror of https://github.com/M66B/NetGuard.git
Cleanup
This commit is contained in:
parent
a7a8587fb8
commit
4e5bb71f48
|
@ -218,13 +218,6 @@ public class Receiver extends BroadcastReceiver {
|
||||||
edit_screen_other.apply();
|
edit_screen_other.apply();
|
||||||
|
|
||||||
// TODO: delete unused
|
// TODO: delete unused
|
||||||
} else if (oldVersion < 2016010307) {
|
|
||||||
notifyNewApplication(Util.getSystemUid("com.facebook.katana", context), context);
|
|
||||||
notifyNewApplication(Util.getSystemUid("com.facebook.orca", context), context);
|
|
||||||
notifyNewApplication(Util.getSystemUid("com.google.android.youtube", context), context);
|
|
||||||
notifyNewApplication(Util.getSystemUid("com.skype.raider", context), context);
|
|
||||||
notifyNewApplication(Util.getSystemUid("com.twitter.android", context), context);
|
|
||||||
notifyNewApplication(Util.getSystemUid("com.whatsapp", context), context);
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
editor.putBoolean("whitelist_wifi", false);
|
editor.putBoolean("whitelist_wifi", false);
|
||||||
|
|
|
@ -96,18 +96,6 @@ public class Util {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static int getSystemUid(String packageName, Context context) {
|
|
||||||
try {
|
|
||||||
PackageInfo pInfo = context.getPackageManager().getPackageInfo(packageName, 0);
|
|
||||||
if ((pInfo.applicationInfo.flags & (ApplicationInfo.FLAG_SYSTEM | ApplicationInfo.FLAG_UPDATED_SYSTEM_APP)) != 0)
|
|
||||||
return pInfo.applicationInfo.uid;
|
|
||||||
else
|
|
||||||
return -1;
|
|
||||||
} catch (PackageManager.NameNotFoundException ex) {
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static boolean hasTelephony(Context context) {
|
public static boolean hasTelephony(Context context) {
|
||||||
PackageManager pm = context.getPackageManager();
|
PackageManager pm = context.getPackageManager();
|
||||||
if (pm.hasSystemFeature(PackageManager.FEATURE_TELEPHONY))
|
if (pm.hasSystemFeature(PackageManager.FEATURE_TELEPHONY))
|
||||||
|
|
Loading…
Reference in New Issue