Loading services/core/java/com/android/server/accounts/AccountManagerService.java +11 −7 Original line number Diff line number Diff line Loading @@ -4362,7 +4362,7 @@ public class AccountManagerService * security policy. * * In particular we want to make sure that the Authenticator doesn't try to trick users * into launching aribtrary intents on the device via by tricking to click authenticator * into launching arbitrary intents on the device via by tricking to click authenticator * supplied entries in the system Settings app. */ protected void checkKeyIntent( Loading @@ -4374,12 +4374,9 @@ public class AccountManagerService ResolveInfo resolveInfo = pm.resolveActivityAsUser(intent, 0, mAccounts.userId); ActivityInfo targetActivityInfo = resolveInfo.activityInfo; int targetUid = targetActivityInfo.applicationInfo.uid; if (!GrantCredentialsPermissionActivity.class.getName().equals( targetActivityInfo.getClass().getName()) && !CantAddAccountActivity.class .equals(targetActivityInfo.getClass().getName()) && PackageManager.SIGNATURE_MATCH != pm.checkSignatures(authUid, targetUid)) { if (!isExportedSystemActivity(targetActivityInfo) && (PackageManager.SIGNATURE_MATCH != pm.checkSignatures(authUid, targetUid))) { String pkgName = targetActivityInfo.packageName; String activityName = targetActivityInfo.name; String tmpl = "KEY_INTENT resolved to an Activity (%s) in a package (%s) that " Loading @@ -4392,6 +4389,13 @@ public class AccountManagerService } } private boolean isExportedSystemActivity(ActivityInfo activityInfo) { String className = activityInfo.name; return "android".equals(activityInfo.packageName) && (GrantCredentialsPermissionActivity.class.getName().equals(className) || CantAddAccountActivity.class.getName().equals(className)); } private void close() { synchronized (mSessions) { if (mSessions.remove(toString()) == null) { Loading Loading
services/core/java/com/android/server/accounts/AccountManagerService.java +11 −7 Original line number Diff line number Diff line Loading @@ -4362,7 +4362,7 @@ public class AccountManagerService * security policy. * * In particular we want to make sure that the Authenticator doesn't try to trick users * into launching aribtrary intents on the device via by tricking to click authenticator * into launching arbitrary intents on the device via by tricking to click authenticator * supplied entries in the system Settings app. */ protected void checkKeyIntent( Loading @@ -4374,12 +4374,9 @@ public class AccountManagerService ResolveInfo resolveInfo = pm.resolveActivityAsUser(intent, 0, mAccounts.userId); ActivityInfo targetActivityInfo = resolveInfo.activityInfo; int targetUid = targetActivityInfo.applicationInfo.uid; if (!GrantCredentialsPermissionActivity.class.getName().equals( targetActivityInfo.getClass().getName()) && !CantAddAccountActivity.class .equals(targetActivityInfo.getClass().getName()) && PackageManager.SIGNATURE_MATCH != pm.checkSignatures(authUid, targetUid)) { if (!isExportedSystemActivity(targetActivityInfo) && (PackageManager.SIGNATURE_MATCH != pm.checkSignatures(authUid, targetUid))) { String pkgName = targetActivityInfo.packageName; String activityName = targetActivityInfo.name; String tmpl = "KEY_INTENT resolved to an Activity (%s) in a package (%s) that " Loading @@ -4392,6 +4389,13 @@ public class AccountManagerService } } private boolean isExportedSystemActivity(ActivityInfo activityInfo) { String className = activityInfo.name; return "android".equals(activityInfo.packageName) && (GrantCredentialsPermissionActivity.class.getName().equals(className) || CantAddAccountActivity.class.getName().equals(className)); } private void close() { synchronized (mSessions) { if (mSessions.remove(toString()) == null) { Loading