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

Commit bfec0a86 authored by Jim Miller's avatar Jim Miller
Browse files

Add isSafeModeEnabled() API to WindowManagerService

This adds a means of determining when the device is in safe mode,
as required by keyguard to disabled some features.

Change-Id: I31d357e6738c92e1837f9e0263e5f3f4de66315a
parent bb8abae5
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -254,4 +254,9 @@ interface IWindowManager
     * Gets the infos for all visible windows.
     */
    void getVisibleWindowsForDisplay(int displayId, out List<WindowInfo> outInfos);

    /**
     * Device is in safe mode.
     */
    boolean isSafeModeEnabled();
}
+4 −0
Original line number Diff line number Diff line
@@ -10348,6 +10348,10 @@ public class WindowManagerService extends IWindowManager.Stub
        mPolicy.lockNow(options);
    }
    
    public boolean isSafeModeEnabled() {
        return mSafeMode;
    }

    void dumpPolicyLocked(PrintWriter pw, String[] args, boolean dumpAll) {
        pw.println("WINDOW MANAGER POLICY STATE (dumpsys window policy)");
        mPolicy.dump("    ", pw, args);
+5 −0
Original line number Diff line number Diff line
@@ -447,6 +447,11 @@ public class IWindowManagerImpl implements IWindowManager {
        // TODO Auto-generated method stub
    }
    
    @Override
    public boolean isSafeModeEnabled() {
        return false;
    }

    @Override
    public IBinder getFocusedWindowToken() {
        // TODO Auto-generated method stub