Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4d93ad69 authored by Edgar Wang's avatar Edgar Wang Committed by Automerger Merge Worker
Browse files

Merge "Fix NPE if default supervisor is not defined" am: 9bc3b6a2

Change-Id: I74e93eca610194d7251c596bb854446bbc3dc129
parents 6ea2228e 9bc3b6a2
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -288,7 +288,7 @@ public class DeviceAdminAdd extends Activity {
            // setup.
            final String supervisor = getString(
                    com.android.internal.R.string.config_defaultSupervisionProfileOwnerComponent);
            if (supervisor == null) {
            if (TextUtils.isEmpty(supervisor)) {
                Log.w(TAG, "Unable to set profile owner post-setup, no default supervisor"
                        + "profile owner defined");
                finish();
@@ -297,7 +297,7 @@ public class DeviceAdminAdd extends Activity {

            final ComponentName supervisorComponent = ComponentName.unflattenFromString(
                    supervisor);
            if (who.compareTo(supervisorComponent) != 0) {
            if (supervisorComponent == null || who.compareTo(supervisorComponent) != 0) {
                Log.w(TAG, "Unable to set non-default profile owner post-setup " + who);
                finish();
                return;