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

Commit f6d960ac authored by Dmitry Shmidt's avatar Dmitry Shmidt Committed by android-build-merger
Browse files

Merge "Fix dev settings crash when no OEM unlock service"

am: 44cacaa8

Change-Id: Ica60f5411908a8edb34b9263ee8d6d6b4617587b
parents 64ee868f 44cacaa8
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -396,7 +396,9 @@ public class DevelopmentSettings extends RestrictedSettingsFragment
        mBackupManager = IBackupManager.Stub.asInterface(
                ServiceManager.getService(Context.BACKUP_SERVICE));
        mWebViewUpdateService = WebViewFactory.getUpdateService();
        if (showEnableOemUnlockPreference(getContext())) {
            mOemLockManager = (OemLockManager) getSystemService(Context.OEM_LOCK_SERVICE);
        }
        mTelephonyManager = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);

        mUm = (UserManager) getSystemService(Context.USER_SERVICE);
@@ -1059,7 +1061,7 @@ public class DevelopmentSettings extends RestrictedSettingsFragment
    }

    private static boolean showEnableOemUnlockPreference(Context context) {
        return context.getSystemService(Context.OEM_LOCK_SERVICE) != null;
        return ServiceManager.getService(Context.OEM_LOCK_SERVICE) != null;
    }

    /**