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

Commit d0f485f0 authored by Wei Sheng Shih's avatar Wei Sheng Shih Committed by Automerger Merge Worker
Browse files

Merge "Only initialize Session's package name once." into sc-dev am: fca79abe

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14186074

Change-Id: I4d17722a4c11322cceeb7cc22f89d410169c3216
parents 021e9e2e fca79abe
Loading
Loading
Loading
Loading
+10 −3
Original line number Diff line number Diff line
@@ -640,9 +640,16 @@ class Session extends IWindowSession.Stub implements IBinder.DeathRecipient {
        }
    }

    void windowAddedLocked(String packageName) {
        mPackageName = packageName;
    void windowAddedLocked() {
        if (mPackageName == null) {
            final WindowProcessController wpc = mService.mAtmService.mProcessMap.getProcess(mPid);
            if (wpc != null) {
                mPackageName = wpc.mInfo.packageName;
                mRelayoutTag = "relayoutWindow: " + mPackageName;
            } else {
                Slog.e(TAG_WM, "Unknown process pid=" + mPid);
            }
        }
        if (mSurfaceSession == null) {
            if (DEBUG) {
                Slog.v(TAG_WM, "First window added to " + this + ", creating SurfaceSession");
+1 −1
Original line number Diff line number Diff line
@@ -1140,7 +1140,7 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP

    void attach() {
        if (DEBUG) Slog.v(TAG, "Attaching " + this + " token=" + mToken);
        mSession.windowAddedLocked(mAttrs.packageName);
        mSession.windowAddedLocked();
    }

    /**