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

Commit 6ce0fb8d authored by Wale Ogunwale's avatar Wale Ogunwale
Browse files

Fixed issue with ordering of non-app token windows

We tried to fix this issue in I83357975c87c704af9d0702c939ca99984462365
but the fix introduced other problems. So, we are going to have sys-ui
create a separate binder for object for each type of window it adds.
Long term we want to allow one binder object to map to multiple window
tokens on the same display in window manager.

Change-Id: Iee53b8bf95b87f79ab7a1b574a54111c678f7413
Fixes: 33567674
Fixes: 33538278
Test: bit FrameworksServicesTests:com.android.server.wm.DisplayContentTests
parent 29b639c0
Loading
Loading
Loading
Loading
+2 −0
Original line number Original line Diff line number Diff line
@@ -13,6 +13,7 @@ import android.content.pm.PackageManager;
import android.content.res.Resources;
import android.content.res.Resources;
import android.graphics.PixelFormat;
import android.graphics.PixelFormat;
import android.os.AsyncTask;
import android.os.AsyncTask;
import android.os.Binder;
import android.os.Bundle;
import android.os.Bundle;
import android.os.Handler;
import android.os.Handler;
import android.os.IBinder;
import android.os.IBinder;
@@ -155,6 +156,7 @@ public class AssistManager {
                        | WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE
                        | WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE
                        | WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE,
                        | WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE,
                PixelFormat.TRANSLUCENT);
                PixelFormat.TRANSLUCENT);
        lp.token = new Binder();
        if (ActivityManager.isHighEndGfx()) {
        if (ActivityManager.isHighEndGfx()) {
            lp.flags |= WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED;
            lp.flags |= WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED;
        }
        }
+2 −0
Original line number Original line Diff line number Diff line
@@ -27,6 +27,7 @@ import android.content.res.Configuration;
import android.graphics.PixelFormat;
import android.graphics.PixelFormat;
import android.graphics.Rect;
import android.graphics.Rect;
import android.graphics.drawable.ColorDrawable;
import android.graphics.drawable.ColorDrawable;
import android.os.Binder;
import android.os.RemoteException;
import android.os.RemoteException;
import android.util.DisplayMetrics;
import android.util.DisplayMetrics;
import android.view.Gravity;
import android.view.Gravity;
@@ -106,6 +107,7 @@ public class ScreenPinningRequest implements View.OnClickListener {
                        | WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED
                        | WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED
                ,
                ,
                PixelFormat.TRANSLUCENT);
                PixelFormat.TRANSLUCENT);
        lp.token = new Binder();
        lp.privateFlags |= WindowManager.LayoutParams.PRIVATE_FLAG_SHOW_FOR_ALL_USERS;
        lp.privateFlags |= WindowManager.LayoutParams.PRIVATE_FLAG_SHOW_FOR_ALL_USERS;
        lp.setTitle("ScreenPinningConfirmation");
        lp.setTitle("ScreenPinningConfirmation");
        lp.gravity = Gravity.FILL;
        lp.gravity = Gravity.FILL;
+2 −0
Original line number Original line Diff line number Diff line
@@ -18,6 +18,7 @@ package com.android.systemui.stackdivider;


import android.content.Context;
import android.content.Context;
import android.graphics.PixelFormat;
import android.graphics.PixelFormat;
import android.os.Binder;
import android.view.View;
import android.view.View;
import android.view.WindowManager;
import android.view.WindowManager;


@@ -51,6 +52,7 @@ public class DividerWindowManager {
                FLAG_NOT_FOCUSABLE | FLAG_NOT_TOUCH_MODAL
                FLAG_NOT_FOCUSABLE | FLAG_NOT_TOUCH_MODAL
                        | FLAG_WATCH_OUTSIDE_TOUCH | FLAG_SPLIT_TOUCH | FLAG_SLIPPERY,
                        | FLAG_WATCH_OUTSIDE_TOUCH | FLAG_SPLIT_TOUCH | FLAG_SLIPPERY,
                PixelFormat.TRANSLUCENT);
                PixelFormat.TRANSLUCENT);
        mLp.token = new Binder();
        mLp.setTitle(WINDOW_TITLE);
        mLp.setTitle(WINDOW_TITLE);
        mLp.privateFlags |= PRIVATE_FLAG_NO_MOVE_ANIMATION;
        mLp.privateFlags |= PRIVATE_FLAG_NO_MOVE_ANIMATION;
        view.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
        view.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
+2 −0
Original line number Original line Diff line number Diff line
@@ -74,6 +74,7 @@ import android.media.session.MediaSessionManager;
import android.media.session.PlaybackState;
import android.media.session.PlaybackState;
import android.net.Uri;
import android.net.Uri;
import android.os.AsyncTask;
import android.os.AsyncTask;
import android.os.Binder;
import android.os.Bundle;
import android.os.Bundle;
import android.os.Handler;
import android.os.Handler;
import android.os.HandlerThread;
import android.os.HandlerThread;
@@ -1531,6 +1532,7 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
                    | WindowManager.LayoutParams.FLAG_SPLIT_TOUCH
                    | WindowManager.LayoutParams.FLAG_SPLIT_TOUCH
                    | WindowManager.LayoutParams.FLAG_SLIPPERY,
                    | WindowManager.LayoutParams.FLAG_SLIPPERY,
                PixelFormat.TRANSLUCENT);
                PixelFormat.TRANSLUCENT);
        lp.token = new Binder();
        // this will allow the navbar to run in an overlay on devices that support this
        // this will allow the navbar to run in an overlay on devices that support this
        if (ActivityManager.isHighEndGfx()) {
        if (ActivityManager.isHighEndGfx()) {
            lp.flags |= WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED;
            lp.flags |= WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED;
+2 −0
Original line number Original line Diff line number Diff line
@@ -22,6 +22,7 @@ import android.content.Context;
import android.content.pm.ActivityInfo;
import android.content.pm.ActivityInfo;
import android.content.res.Resources;
import android.content.res.Resources;
import android.graphics.PixelFormat;
import android.graphics.PixelFormat;
import android.os.Binder;
import android.os.RemoteException;
import android.os.RemoteException;
import android.os.SystemProperties;
import android.os.SystemProperties;
import android.os.Trace;
import android.os.Trace;
@@ -97,6 +98,7 @@ public class StatusBarWindowManager implements RemoteInputController.Callback {
                        | WindowManager.LayoutParams.FLAG_WATCH_OUTSIDE_TOUCH
                        | WindowManager.LayoutParams.FLAG_WATCH_OUTSIDE_TOUCH
                        | WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS,
                        | WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS,
                PixelFormat.TRANSLUCENT);
                PixelFormat.TRANSLUCENT);
        mLp.token = new Binder();
        mLp.flags |= WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED;
        mLp.flags |= WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED;
        mLp.gravity = Gravity.TOP;
        mLp.gravity = Gravity.TOP;
        mLp.softInputMode = WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE;
        mLp.softInputMode = WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE;
Loading