Loading src/com/android/settings/applications/specialaccess/deviceadmin/DeviceAdminAdd.java +7 −4 Original line number Diff line number Diff line Loading @@ -311,11 +311,13 @@ public class DeviceAdminAdd extends CollapsingToolbarBaseActivity { return; } // othewise, only the defined default supervision profile owner can be set after user // setup. // otherwise, only the defined default supervision profile owner or holder of // supersvision role can be set after user setup. final String supervisor = getString( com.android.internal.R.string.config_defaultSupervisionProfileOwnerComponent); if (TextUtils.isEmpty(supervisor)) { final String supervisionRolePackage = getString( com.android.internal.R.string.config_systemSupervision); if (TextUtils.isEmpty(supervisor) && TextUtils.isEmpty(supervisionRolePackage)) { Log.w(TAG, "Unable to set profile owner post-setup, no default supervisor" + "profile owner defined"); finish(); Loading @@ -324,7 +326,8 @@ public class DeviceAdminAdd extends CollapsingToolbarBaseActivity { final ComponentName supervisorComponent = ComponentName.unflattenFromString( supervisor); if (supervisorComponent == null || who.compareTo(supervisorComponent) != 0) { if (!who.equals(supervisorComponent) && !who.getPackageName().equals(supervisionRolePackage)) { Log.w(TAG, "Unable to set non-default profile owner post-setup " + who); finish(); return; Loading Loading
src/com/android/settings/applications/specialaccess/deviceadmin/DeviceAdminAdd.java +7 −4 Original line number Diff line number Diff line Loading @@ -311,11 +311,13 @@ public class DeviceAdminAdd extends CollapsingToolbarBaseActivity { return; } // othewise, only the defined default supervision profile owner can be set after user // setup. // otherwise, only the defined default supervision profile owner or holder of // supersvision role can be set after user setup. final String supervisor = getString( com.android.internal.R.string.config_defaultSupervisionProfileOwnerComponent); if (TextUtils.isEmpty(supervisor)) { final String supervisionRolePackage = getString( com.android.internal.R.string.config_systemSupervision); if (TextUtils.isEmpty(supervisor) && TextUtils.isEmpty(supervisionRolePackage)) { Log.w(TAG, "Unable to set profile owner post-setup, no default supervisor" + "profile owner defined"); finish(); Loading @@ -324,7 +326,8 @@ public class DeviceAdminAdd extends CollapsingToolbarBaseActivity { final ComponentName supervisorComponent = ComponentName.unflattenFromString( supervisor); if (supervisorComponent == null || who.compareTo(supervisorComponent) != 0) { if (!who.equals(supervisorComponent) && !who.getPackageName().equals(supervisionRolePackage)) { Log.w(TAG, "Unable to set non-default profile owner post-setup " + who); finish(); return; Loading