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

Commit a2ac2762 authored by Jessica Wagantall's avatar Jessica Wagantall
Browse files

Merge tag 'android-5.1.1_r33' into HEAD

Ticket: CYNGNOS-1404
Android 5.1.1 release 33

Change-Id: I2421f9fbed37d5a973c31bb147b639b423f4cebc
parents babe2c6f a7ff2e95
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -309,7 +309,11 @@ public class DevelopmentSettings extends SettingsPreferenceFragment
        mUsbManager = (UsbManager)getActivity().getSystemService(Context.USB_SERVICE);

        if (android.os.Process.myUserHandle().getIdentifier() != UserHandle.USER_OWNER
                || mUm.hasUserRestriction(UserManager.DISALLOW_DEBUGGING_FEATURES)) {
                || mUm.hasUserRestriction(UserManager.DISALLOW_DEBUGGING_FEATURES)
                || Settings.Global.getInt(getActivity().getContentResolver(),
                        Settings.Global.DEVICE_PROVISIONED, 0) == 0) {
            // Block access to developer options if the user is not the owner, if user policy
            // restricts it, or if the device has not been provisioned
            mUnavailable = true;
            setPreferenceScreen(new PreferenceScreen(getActivity(), null));
            return;
+6 −0
Original line number Diff line number Diff line
@@ -262,6 +262,12 @@ public class DeviceInfoSettings extends SettingsPreferenceFragment implements In
            // Don't enable developer options for secondary users.
            if (UserHandle.myUserId() != UserHandle.USER_OWNER) return true;

            // Don't enable developer options until device has been provisioned
            if (Settings.Global.getInt(getActivity().getContentResolver(),
                    Settings.Global.DEVICE_PROVISIONED, 0) == 0) {
                return true;
            }

            final UserManager um = (UserManager) getSystemService(Context.USER_SERVICE);
            if (um.hasUserRestriction(UserManager.DISALLOW_DEBUGGING_FEATURES)) return true;

+1 −0
Original line number Diff line number Diff line
@@ -27,6 +27,7 @@ import android.content.Context;
import android.content.DialogInterface;
import android.content.pm.ActivityInfo;
import android.os.AsyncTask;
import android.provider.Settings;
import android.service.persistentdata.PersistentDataBlockManager;
import android.view.LayoutInflater;
import android.view.View;