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

Commit 02c0e986 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Dispatch overlay change to WindowManager"

parents ec8f4aeb 2f1a90b7
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -25345,6 +25345,10 @@ public class ActivityManagerService extends IActivityManager.Stub
                }
            }
        }
        if (updateFrameworkRes && mWindowManager != null) {
            ActivityThread.currentActivityThread().getExecutor().execute(
                    mWindowManager::onOverlayChanged);
        }
    }
    /**
+6 −0
Original line number Diff line number Diff line
@@ -161,6 +161,7 @@ import android.app.StatusBarManager;
import android.app.UiModeManager;
import android.content.ActivityNotFoundException;
import android.content.BroadcastReceiver;
import android.content.ComponentCallbacks;
import android.content.ComponentName;
import android.content.ContentResolver;
import android.content.Context;
@@ -2740,6 +2741,11 @@ public class PhoneWindowManager implements WindowManagerPolicy {
        }
    }

    @Override
    public void onOverlayChangedLw() {
        onConfigurationChanged();
    }

    @Override
    public void onConfigurationChanged() {
        // TODO(multi-display): Define policy for secondary displays.
+5 −0
Original line number Diff line number Diff line
@@ -175,6 +175,11 @@ public interface WindowManagerPolicy extends WindowManagerPolicyConstants {
     */
    void onKeyguardOccludedChangedLw(boolean occluded);

    /**
     * Called when the resource overlays change.
     */
    default void onOverlayChangedLw() {}

    /**
     * Interface to the Window Manager state associated with a particular
     * window.  You can hold on to an instance of this interface from the call
+7 −0
Original line number Diff line number Diff line
@@ -6596,6 +6596,13 @@ public class WindowManagerService extends IWindowManager.Stub
        }
    }

    public void onOverlayChanged() {
        synchronized (mWindowMap) {
            mPolicy.onOverlayChangedLw();
            requestTraversal();
        }
    }

    public void onDisplayChanged(int displayId) {
        synchronized (mWindowMap) {
            final DisplayContent displayContent = mRoot.getDisplayContentOrCreate(displayId);