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

Commit 9b5f20a8 authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Snap for 7450397 from 1a49d4f7 to sc-release

Change-Id: Iac3ac5f4ed8322d7fdb9f5411b4d0705d5bf7216
parents 00c91cff 1a49d4f7
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -28,5 +28,8 @@ package {
sdk {
    name: "media-module-sdk",
    bootclasspath_fragments: ["com.android.media-bootclasspath-fragment"],
    java_sdk_libs: ["service-media-s"],
    java_sdk_libs: [
        "framework-media",
        "service-media-s",
    ],
}
+7 −5
Original line number Diff line number Diff line
@@ -94,6 +94,7 @@ public final class DisplayManagerGlobal {

    // Guarded by mLock
    private boolean mDispatchNativeCallbacks = false;
    private float mNativeCallbackReportedRefreshRate;
    private final Object mLock = new Object();

    @UnsupportedAppUsage
@@ -404,10 +405,11 @@ public final class DisplayManagerGlobal {
                    // We can likely save a binder hop if we attach the refresh rate onto the
                    // listener.
                    DisplayInfo display = getDisplayInfoLocked(displayId);
                    if (display != null) {
                        float refreshRate = display.getRefreshRate();
                    if (display != null
                            && mNativeCallbackReportedRefreshRate != display.getRefreshRate()) {
                        mNativeCallbackReportedRefreshRate = display.getRefreshRate();
                        // Signal native callbacks if we ever set a refresh rate.
                        nSignalNativeCallbacks(refreshRate);
                        nSignalNativeCallbacks(mNativeCallbackReportedRefreshRate);
                    }
                }
            }
@@ -1055,8 +1057,8 @@ public final class DisplayManagerGlobal {
            if (display != null) {
                // We need to tell AChoreographer instances the current refresh rate so that apps
                // can get it for free once a callback first registers.
                float refreshRate = display.getRefreshRate();
                nSignalNativeCallbacks(refreshRate);
                mNativeCallbackReportedRefreshRate = display.getRefreshRate();
                nSignalNativeCallbacks(mNativeCallbackReportedRefreshRate);
            }
        }
    }
+6 −0
Original line number Diff line number Diff line
@@ -286,6 +286,12 @@ public abstract class DisplayManagerInternal {
     */
    public abstract void ignoreProximitySensorUntilChanged();

    /**
     * Returns the refresh rate switching type.
     */
    @DisplayManager.SwitchingType
    public abstract int getRefreshRateSwitchingType();

    /**
     * Describes the requested power state of the display.
     *
+5 −7
Original line number Diff line number Diff line
@@ -953,8 +953,7 @@ public class ViewDebug {
        private final Callable<OutputStream> mCallback;
        private final Executor mExecutor;
        private final ReentrantLock mLock = new ReentrantLock(false);
        private final ArrayDeque<byte[]> mQueue = new ArrayDeque<>(3);
        private final ByteArrayOutputStream mByteStream = new ByteArrayOutputStream();
        private final ArrayDeque<Picture> mQueue = new ArrayDeque<>(3);
        private boolean mStopListening;
        private Thread mRenderThread;

@@ -990,9 +989,7 @@ public class ViewDebug {
                mQueue.removeLast();
                needsInvoke = false;
            }
            picture.writeToStream(mByteStream);
            mQueue.add(mByteStream.toByteArray());
            mByteStream.reset();
            mQueue.add(picture);
            mLock.unlock();

            if (needsInvoke) {
@@ -1003,7 +1000,7 @@ public class ViewDebug {
        @Override
        public void run() {
            mLock.lock();
            final byte[] picture = mQueue.poll();
            final Picture picture = mQueue.poll();
            final boolean isStopped = mStopListening;
            mLock.unlock();
            if (Thread.currentThread() == mRenderThread) {
@@ -1024,7 +1021,8 @@ public class ViewDebug {
            }
            if (stream != null) {
                try {
                    stream.write(picture);
                    picture.writeToStream(stream);
                    stream.flush();
                } catch (IOException ex) {
                    Log.w("ViewDebug", "Aborting rendering commands capture "
                            + "due to IOException writing to output stream", ex);
+3 −1
Original line number Diff line number Diff line
@@ -814,7 +814,9 @@ public class RemoteViews implements Parcelable, Filter {
                // The PendingIntent template is stored in the view's tag.
                OnItemClickListener listener = (parent, view, position, id) -> {
                    RemoteResponse response = findRemoteResponseTag(view);
                    if (response != null) {
                        response.handleViewInteraction(view, handler);
                    }
                };
                av.setOnItemClickListener(listener);
                av.setTag(pendingIntentTemplate);
Loading