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

Commit 7abd7ba0 authored by Benjamin Franz's avatar Benjamin Franz Committed by android-build-merger
Browse files

Merge \"DO NOT MERGE Block the user from entering safe boot mode\" into mnc-dev

am: 3e582390

Change-Id: Ibb90e151746d405e1cc8a1eb889ffa91aca35bc8
parents a09b6ee1 3e582390
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -65,6 +65,7 @@ import android.os.SystemProperties;
import android.os.SystemService;
import android.os.Trace;
import android.os.UserHandle;
import android.os.UserManager;
import android.os.WorkSource;
import android.provider.Settings;
import android.util.ArraySet;
@@ -7613,6 +7614,12 @@ public class WindowManagerService extends IWindowManager.Stub
                   + " milliseconds before attempting to detect safe mode.");
        }

        UserManager um = (UserManager) mContext.getSystemService(Context.USER_SERVICE);
        if (um != null && um.hasUserRestriction(UserManager.DISALLOW_SAFE_BOOT)) {
            mSafeMode = false;
            return false;
        }

        int menuState = mInputManager.getKeyCodeState(-1, InputDevice.SOURCE_ANY,
                KeyEvent.KEYCODE_MENU);
        int sState = mInputManager.getKeyCodeState(-1, InputDevice.SOURCE_ANY, KeyEvent.KEYCODE_S);