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

Commit 329011cf authored by Winson's avatar Winson Committed by android-build-merger
Browse files

Removing private system ui flags from status bar flags logic. am: ab216609 am: b7a673ed

am: dccfd439

Change-Id: Ie8bbbfb5c24957f64036e8de23d6a29e6669ea18
parents e69b894f dccfd439
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -355,6 +355,16 @@ interface IWindowManager
     */
    oneway void statusBarVisibilityChanged(int visibility);

    /**
     * Called by System UI to notify of changes to the visibility of Recents.
     */
    oneway void setRecentsVisibility(boolean visible);

    /**
     * Called by System UI to notify of changes to the visibility of PIP.
     */
    oneway void setTvPipVisibility(boolean visible);

    /**
     * Device has a software navigation bar (separate from the status bar).
     */
+0 −14
Original line number Diff line number Diff line
@@ -3095,20 +3095,6 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
     */
    public static final int NAVIGATION_BAR_TRANSLUCENT = 0x80000000;
    /**
     * @hide
     *
     * Whether Recents is visible or not.
     */
    public static final int RECENT_APPS_VISIBLE = 0x00004000;
    /**
     * @hide
     *
     * Whether the TV's picture-in-picture is visible or not.
     */
    public static final int TV_PICTURE_IN_PICTURE_VISIBLE = 0x00010000;
    /**
     * @hide
     *
+10 −0
Original line number Diff line number Diff line
@@ -1310,6 +1310,16 @@ public interface WindowManagerPolicy {
     */
    public int adjustSystemUiVisibilityLw(int visibility);

    /**
     * Called by System UI to notify of changes to the visibility of Recents.
     */
    public void setRecentsVisibilityLw(boolean visible);

    /**
     * Called by System UI to notify of changes to the visibility of PIP.
     */
    public void setTvPipVisibilityLw(boolean visible);

    /**
     * Specifies whether there is an on-screen navigation bar separate from the status bar.
     */
+1 −5
Original line number Diff line number Diff line
@@ -217,11 +217,7 @@ public class RecentsImpl implements ActivityOptions.OnAnimationFinishedListener
     * {@link Recents#onBusEvent(RecentsVisibilityChangedEvent)}.
     */
    public void onVisibilityChanged(Context context, boolean visible) {
        SystemUIApplication app = (SystemUIApplication) context;
        PhoneStatusBar statusBar = app.getComponent(PhoneStatusBar.class);
        if (statusBar != null) {
            statusBar.updateRecentsVisibility(visible);
        }
        Recents.getSystemServices().setRecentsVisibility(visible);
    }

    /**
+25 −0
Original line number Diff line number Diff line
@@ -70,6 +70,7 @@ import android.util.MutableBoolean;
import android.view.Display;
import android.view.IAppTransitionAnimationSpecsFuture;
import android.view.IDockedStackListener;
import android.view.IWindowManager;
import android.view.WindowManager;
import android.view.WindowManager.KeyboardShortcutsReceiver;
import android.view.WindowManagerGlobal;
@@ -121,6 +122,7 @@ public class SystemServicesProxy {
    IPackageManager mIpm;
    AssistUtils mAssistUtils;
    WindowManager mWm;
    IWindowManager mIwm;
    UserManager mUm;
    Display mDisplay;
    String mRecentsPackage;
@@ -208,6 +210,7 @@ public class SystemServicesProxy {
        mIpm = AppGlobals.getPackageManager();
        mAssistUtils = new AssistUtils(context);
        mWm = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE);
        mIwm = WindowManagerGlobal.getWindowManagerService();
        mUm = UserManager.get(context);
        mDisplay = mWm.getDefaultDisplay();
        mRecentsPackage = context.getPackageName();
@@ -1097,6 +1100,28 @@ public class SystemServicesProxy {
        }
    }

    /**
     * Updates the visibility of recents.
     */
    public void setRecentsVisibility(boolean visible) {
        try {
            mIwm.setRecentsVisibility(visible);
        } catch (RemoteException e) {
            Log.e(TAG, "Unable to reach window manager", e);
        }
    }

    /**
     * Updates the visibility of the picture-in-picture.
     */
    public void setTvPipVisibility(boolean visible) {
        try {
            mIwm.setTvPipVisibility(visible);
        } catch (RemoteException e) {
            Log.e(TAG, "Unable to reach window manager", e);
        }
    }

    private final class H extends Handler {
        private static final int ON_TASK_STACK_CHANGED = 1;
        private static final int ON_ACTIVITY_PINNED = 2;
Loading