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

Commit 3985ceb1 authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Merge cherrypicks of [15873636, 15873851, 15873852, 15873654, 15873655,...

Merge cherrypicks of [15873636, 15873851, 15873852, 15873654, 15873655, 15873656, 15873657, 15873637, 15873638, 15873639, 15873339, 15873340, 15873341, 15873342, 15873343, 15873344, 15873345, 15873346, 15873947, 15873948, 15873949, 15873950, 15873951, 15873952, 15873953, 15873954, 15873955, 15873956, 15873957, 15873958, 15873959, 15873960, 15873961, 15873642, 15873122, 15873323, 15873123, 15873324, 15872698, 15872700, 15873987, 15873962, 15873963, 15873964, 15873965, 15873557, 15873558, 15873816, 15873643, 15873817, 15873660, 15873559, 15873988, 15873644, 15873645, 15873646, 15873325, 15873661, 15873662, 15873663, 15874027, 15874028, 15874029, 15874030, 15874031, 15874032, 15874033, 15874034, 15874035, 15874036, 15874037, 15874038, 15874039, 15874040, 15874041, 15874042, 15873560, 15873561, 15873854, 15873855, 15873562, 15873563, 15873564, 15873565, 15873566, 15874047, 15874048, 15873326, 15873124, 15874043, 15872622, 15872623, 15873857, 15872701, 15872702] into sc-d1-release

Change-Id: I4acca4f7b68beccdf6f0b53bbd0877d3c815f91f
parents d7685815 847a407d
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -31,6 +31,7 @@ import android.util.Log;

import com.android.internal.annotations.GuardedBy;

import java.util.Objects;
import java.util.Set;

/**
@@ -86,6 +87,12 @@ public class Account implements Parcelable {
        if (TextUtils.isEmpty(type)) {
            throw new IllegalArgumentException("the type must not be empty: " + type);
        }
        if (name.length() > 200) {
            throw new IllegalArgumentException("account name is longer than 200 characters");
        }
        if (type.length() > 200) {
            throw new IllegalArgumentException("account type is longer than 200 characters");
        }
        this.name = name;
        this.type = type;
        this.accessId = accessId;
+4 −1
Original line number Diff line number Diff line
@@ -1329,7 +1329,10 @@ public final class BluetoothDevice implements Parcelable, Attributable {
            if (alias == null) {
                return getName();
            }
            return alias;
            return alias
                    .replace('\t', ' ')
                    .replace('\n', ' ')
                    .replace('\r', ' ');
        } catch (RemoteException e) {
            Log.e(TAG, "", e);
        }
+4 −0
Original line number Diff line number Diff line
@@ -98,6 +98,7 @@ public class Surface implements Parcelable {

    private static native int nativeSetFrameRate(
            long nativeObject, float frameRate, int compatibility, int changeFrameRateStrategy);
    private static native void nativeDestroy(long nativeObject);

    public static final @android.annotation.NonNull Parcelable.Creator<Surface> CREATOR =
            new Parcelable.Creator<Surface>() {
@@ -339,6 +340,9 @@ public class Surface implements Parcelable {
     */
    @UnsupportedAppUsage
    public void destroy() {
        if (mNativeObject != 0) {
            nativeDestroy(mNativeObject);
        }
        release();
    }

+1 −1
Original line number Diff line number Diff line
@@ -903,7 +903,7 @@ public class SurfaceView extends View implements ViewRootImpl.SurfaceChangedCall
        mSurfaceAlpha = 1f;

        synchronized (mSurfaceControlLock) {
            mSurface.release();
            mSurface.destroy();
            if (mBlastBufferQueue != null) {
                mBlastBufferQueue.destroy();
                mBlastBufferQueue = null;
+14 −5
Original line number Diff line number Diff line
@@ -50,6 +50,7 @@ import com.android.internal.util.FrameworkStatsLog;

import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.util.concurrent.TimeUnit;

/**
 * A class that allows the app to get the frame metrics from HardwareRendererObserver.
@@ -103,6 +104,7 @@ public class FrameTracker extends SurfaceControl.OnJankDataListener
    private boolean mCancelled = false;
    private FrameTrackerListener mListener;
    private boolean mTracingStarted = false;
    private Runnable mWaitForFinishTimedOut;

    private static class JankInfo {
        long frameVsyncId;
@@ -263,10 +265,16 @@ public class FrameTracker extends SurfaceControl.OnJankDataListener
            if (mListener != null) {
                mListener.onCujEvents(mSession, ACTION_SESSION_END);
            }
        }
            // We don't remove observer here,
            // will remove it when all the frame metrics in this duration are called back.
            // See onFrameMetricsAvailable for the logic of removing the observer.
            // Waiting at most 10 seconds for all callbacks to finish.
            mWaitForFinishTimedOut = () -> {
                Log.e(TAG, "force finish cuj because of time out:" + mSession.getName());
                finish(mJankInfos.size() - 1);
            };
            mHandler.postDelayed(mWaitForFinishTimedOut, TimeUnit.SECONDS.toMillis(10));
        }
    }

    /**
@@ -396,7 +404,8 @@ public class FrameTracker extends SurfaceControl.OnJankDataListener
    }

    private void finish(int indexOnOrAfterEnd) {

        mHandler.removeCallbacks(mWaitForFinishTimedOut);
        mWaitForFinishTimedOut = null;
        mMetricsFinalized = true;

        // The tracing has been ended, remove the observer, see if need to trigger perfetto.
@@ -481,7 +490,7 @@ public class FrameTracker extends SurfaceControl.OnJankDataListener
            }
        }
        if (DEBUG) {
            Log.i(TAG, "FrameTracker: CUJ=" + mSession.getName()
            Log.i(TAG, "finish: CUJ=" + mSession.getName()
                    + " (" + mBeginVsyncId + "," + mEndVsyncId + ")"
                    + " totalFrames=" + totalFramesCount
                    + " missedAppFrames=" + missedAppFramesCount
Loading