Merge "Avoid getting app locale config for each app" into tm-dev
This commit is contained in:
@@ -49,17 +49,17 @@ public class AppLocaleUtil {
|
|||||||
boolean isDisallowedPackage = isDisallowedPackage(context, packageName);
|
boolean isDisallowedPackage = isDisallowedPackage(context, packageName);
|
||||||
boolean hasLauncherEntry = hasLauncherEntry(packageName, infos);
|
boolean hasLauncherEntry = hasLauncherEntry(packageName, infos);
|
||||||
boolean isSignedWithPlatformKey = isSignedWithPlatformKey(context, packageName);
|
boolean isSignedWithPlatformKey = isSignedWithPlatformKey(context, packageName);
|
||||||
boolean isAppLocaleSupported = isAppLocaleSupported(context, packageName);
|
boolean canDisplay = !isDisallowedPackage
|
||||||
|
&& !isSignedWithPlatformKey
|
||||||
|
&& hasLauncherEntry
|
||||||
|
&& isAppLocaleSupported(context, packageName);
|
||||||
|
|
||||||
Log.i(TAG, "Can display preference - [" + packageName + "] :"
|
Log.i(TAG, "Can display preference - [" + packageName + "] :"
|
||||||
+ " isDisallowedPackage : " + isDisallowedPackage
|
+ " isDisallowedPackage : " + isDisallowedPackage
|
||||||
+ " / isSignedWithPlatformKey : " + isSignedWithPlatformKey
|
+ " / isSignedWithPlatformKey : " + isSignedWithPlatformKey
|
||||||
+ " / hasLauncherEntry : " + hasLauncherEntry
|
+ " / hasLauncherEntry : " + hasLauncherEntry
|
||||||
+ " / isAppLocaleSupported : " + isAppLocaleSupported);
|
+ " / canDisplay : " + canDisplay);
|
||||||
|
return canDisplay;
|
||||||
return !isDisallowedPackage
|
|
||||||
&& !isSignedWithPlatformKey
|
|
||||||
&& hasLauncherEntry
|
|
||||||
&& isAppLocaleSupported;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static boolean isDisallowedPackage(Context context, String packageName) {
|
private static boolean isDisallowedPackage(Context context, String packageName) {
|
||||||
|
Reference in New Issue
Block a user