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

Commit f57b7393 authored by Naomi Musgrave's avatar Naomi Musgrave Committed by Automerger Merge Worker
Browse files

[MediaProjection] additional logging to debug resizing issues am: a47ca2cc

parents 16177103 a47ca2cc
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -253,12 +253,6 @@
      "group": "WM_DEBUG_BOOT",
      "at": "com\/android\/server\/wm\/WindowManagerService.java"
    },
    "-1883484959": {
      "message": "Content Recording: Display %d state is now (%d), so update recording?",
      "level": "VERBOSE",
      "group": "WM_DEBUG_CONTENT_RECORDING",
      "at": "com\/android\/server\/wm\/DisplayContent.java"
    },
    "-1872288685": {
      "message": "applyAnimation: anim=%s nextAppTransition=%s transit=%s isEntrance=%b Callers=%s",
      "level": "VERBOSE",
@@ -2365,6 +2359,12 @@
      "group": "WM_DEBUG_RECENTS_ANIMATIONS",
      "at": "com\/android\/server\/wm\/RecentsAnimationController.java"
    },
    "34106798": {
      "message": "Content Recording: Display %d state was (%d), is now (%d), so update recording?",
      "level": "VERBOSE",
      "group": "WM_DEBUG_CONTENT_RECORDING",
      "at": "com\/android\/server\/wm\/DisplayContent.java"
    },
    "34682671": {
      "message": "Not moving display (displayId=%d) to top. Top focused displayId=%d. Reason: FLAG_STEAL_TOP_FOCUS_DISABLED",
      "level": "INFO",
+4 −0
Original line number Diff line number Diff line
@@ -161,6 +161,8 @@ public class VirtualDisplayAdapter extends DisplayAdapter {
            int width, int height, int densityDpi) {
        VirtualDisplayDevice device = mVirtualDisplayDevices.get(appToken);
        if (device != null) {
            Slog.v(TAG, "Resize VirtualDisplay " + device.mName + " to " + width
                    + " " + height);
            device.resizeLocked(width, height, densityDpi);
        }
    }
@@ -177,6 +179,7 @@ public class VirtualDisplayAdapter extends DisplayAdapter {
    public void setVirtualDisplaySurfaceLocked(IBinder appToken, Surface surface) {
        VirtualDisplayDevice device = mVirtualDisplayDevices.get(appToken);
        if (device != null) {
            Slog.v(TAG, "Update surface for VirtualDisplay " + device.mName);
            device.setSurfaceLocked(surface);
        }
    }
@@ -191,6 +194,7 @@ public class VirtualDisplayAdapter extends DisplayAdapter {
    public DisplayDevice releaseVirtualDisplayLocked(IBinder appToken) {
        VirtualDisplayDevice device = mVirtualDisplayDevices.remove(appToken);
        if (device != null) {
            Slog.v(TAG, "Release VirtualDisplay " + device.mName);
            device.destroyLocked(true);
            appToken.unlinkToDeath(device, 0);
        }
+1 −0
Original line number Diff line number Diff line
@@ -956,6 +956,7 @@ public final class MediaProjectionManagerService extends SystemService
            if (callback == null) {
                throw new IllegalArgumentException("callback must not be null");
            }
            Slog.v(TAG, "Start the token instance " + this);
            // Cache result of calling into ActivityManagerService outside of the lock, to prevent
            // deadlock with WindowManagerService.
            final boolean hasFGS = mActivityManagerInternal.hasRunningForegroundService(
+51 −49
Original line number Diff line number Diff line
@@ -141,7 +141,10 @@ final class ContentRecorder implements WindowContainerListener {
     */
    void onConfigurationChanged(@Configuration.Orientation int lastOrientation) {
        // Update surface for MediaProjection, if this DisplayContent is being used for recording.
        if (isCurrentlyRecording() && mLastRecordedBounds != null) {
        if (!isCurrentlyRecording() || mLastRecordedBounds == null) {
            return;
        }

        // Recording has already begun, but update recording since the display is now on.
        if (mRecordedWindowContainer == null) {
            ProtoLog.v(WM_DEBUG_CONTENT_RECORDING,
@@ -197,7 +200,6 @@ final class ContentRecorder implements WindowContainerListener {
            }
        }
    }
    }

    /**
     * Pauses recording on this display content. Note the session does not need to be updated,
+3 −2
Original line number Diff line number Diff line
@@ -6061,8 +6061,9 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp
                mOffTokenAcquirer.release(mDisplayId);
            }
            ProtoLog.v(WM_DEBUG_CONTENT_RECORDING,
                    "Content Recording: Display %d state is now (%d), so update recording?",
                    mDisplayId, displayState);
                    "Content Recording: Display %d state was (%d), is now (%d), so update "
                            + "recording?",
                    mDisplayId, lastDisplayState, displayState);
            if (lastDisplayState != displayState) {
                // If state is on due to surface being added, then start recording.
                // If state is off due to surface being removed, then stop recording.