[Panlingual] Fix conflict am: 70fe2d1fdd
am: c4603be5b3
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/18181644 Change-Id: I8154923e9e3db1e4984889d648cf0cfa17e65348 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -35,6 +35,7 @@ public class AppLocaleUtil {
|
|||||||
|
|
||||||
public static final Intent LAUNCHER_ENTRY_INTENT =
|
public static final Intent LAUNCHER_ENTRY_INTENT =
|
||||||
new Intent(Intent.ACTION_MAIN).addCategory(Intent.CATEGORY_LAUNCHER);
|
new Intent(Intent.ACTION_MAIN).addCategory(Intent.CATEGORY_LAUNCHER);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Decides the UI display of per app locale.
|
* Decides the UI display of per app locale.
|
||||||
*/
|
*/
|
||||||
@@ -42,9 +43,15 @@ public class AppLocaleUtil {
|
|||||||
@NonNull Context context,
|
@NonNull Context context,
|
||||||
@NonNull String packageName,
|
@NonNull String packageName,
|
||||||
@NonNull List<ResolveInfo> infos) {
|
@NonNull List<ResolveInfo> infos) {
|
||||||
return !isDisallowedPackage(context, packageName)
|
boolean isDisallowedPackage = isDisallowedPackage(context, packageName);
|
||||||
&& !isSignedWithPlatformKey(context, packageName)
|
boolean hasLauncherEntry = hasLauncherEntry(packageName, infos);
|
||||||
&& hasLauncherEntry(packageName, infos);
|
boolean isSignedWithPlatformKey = isSignedWithPlatformKey(context, packageName);
|
||||||
|
Log.i(TAG, "Can display preference - [" + packageName + "] :"
|
||||||
|
+ " isDisallowedPackage : " + isDisallowedPackage
|
||||||
|
+ " / isSignedWithPlatformKey : " + isSignedWithPlatformKey
|
||||||
|
+ " / hasLauncherEntry : " + hasLauncherEntry);
|
||||||
|
|
||||||
|
return !isDisallowedPackage && !isSignedWithPlatformKey && hasLauncherEntry;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static boolean isDisallowedPackage(Context context, String packageName) {
|
private static boolean isDisallowedPackage(Context context, String packageName) {
|
||||||
|
Reference in New Issue
Block a user