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

Commit 7b461fb9 authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 14027281 from cad1071c to 25Q4-release

Change-Id: I6189d39f6dd427b393036e54e0a0198644ffab99
parents 20b3a705 cad1071c
Loading
Loading
Loading
Loading
+7 −8
Original line number Diff line number Diff line
@@ -45,6 +45,9 @@

    <metrics_collector class="com.android.tradefed.device.metric.FilePullerLogCollector">
        <option name="pull-pattern-keys" value="perfetto_file_path" />
        <option name="pull-pattern-keys" value="simpleperf_profiling_file_path"/>
        <option name="pull-pattern-keys" value="simpleperf_report_file_path"/>
        <option name="collect-on-run-ended-only" value="false"/>
    </metrics_collector>

    <!-- Needed for storing the perfetto files in external storage-->
@@ -54,7 +57,7 @@
        <option name="package" value="com.android.perftests.core" />
        <option name="hidden-api-checks" value="false"/>

        <option name="device-listeners" value="android.device.collectors.ProcLoadListener,android.device.collectors.PerfettoListener" />
        <option name="device-listeners" value="android.device.collectors.ProcLoadListener,android.device.collectors.PerfettoListener,android.device.collectors.SimpleperfListener" />
        <!-- ProcLoadListener related arguments -->
        <!-- Wait for device last minute threshold to reach 3 with 2 minute timeout before starting the test run -->
        <option name="instrumentation-arg" key="procload-collector:per_run" value="true" />
@@ -69,15 +72,11 @@
        <option name="instrumentation-arg" key="newRunListenerMode" value="true" />

        <!-- Listener related args for collecting the traces and waiting for the device to stabilize. -->
        <option name="device-listeners" value="android.device.collectors.ProcLoadListener,android.device.collectors.SimpleperfListener" />

        <option name="instrumentation-arg" key="profiling-iterations" value="525" />
        <option name="instrumentation-arg" key="profiling-iterations" value="1" />

        <!-- SimpleperfListener related arguments -->
        <option name="instrumentation-arg" key="record" value="false"/>
        <option name="instrumentation-arg" key="report" value="true" />
        <option name="instrumentation-arg" key="arguments" value="-g" />
        <option name="instrumentation-arg" key="events_to_record" value="cpu-cycles" />
        <option name="instrumentation-arg" key="processes_to_record" value="com.android.perftests.core" />
        <option name="instrumentation-arg" key="simpleperf-collector:events_to_record" value="cpu-cycles" />
        <option name="instrumentation-arg" key="simpleperf-collector:processes_to_record" value="com.android.perftests.core" />
    </test>
</configuration>
+0 −41
Original line number Diff line number Diff line
@@ -32,8 +32,6 @@ import androidx.test.InstrumentationRegistry;
import androidx.test.filters.LargeTest;
import androidx.test.runner.AndroidJUnit4;

import com.android.helpers.SimpleperfHelper;

import org.junit.After;
import org.junit.Before;
import org.junit.Rule;
@@ -41,9 +39,6 @@ import org.junit.Test;
import org.junit.rules.TestName;
import org.junit.runner.RunWith;

import java.io.File;
import java.io.IOException;
import java.nio.file.Path;
import java.util.ArrayList;
import java.util.Random;
import java.util.concurrent.CountDownLatch;
@@ -58,53 +53,17 @@ public class MessageQueuePerfTest {
    private static final int TOTAL_MESSAGE_COUNT = PER_THREAD_MESSAGE_COUNT * THREAD_COUNT;
    private static final int DEFAULT_MESSAGE_WHAT = 2;

    private SimpleperfHelper mSimpleperfHelper = new SimpleperfHelper();
    private boolean mEnableSimpleperf = true;

    @Rule public TestName mTestName = new TestName();

    /** Start simpleperf sampling. */
    public void startSimpleperf(String subcommand, String arguments) {
        if (!mSimpleperfHelper.startCollecting(subcommand, arguments)) {
            Log.e(TAG, "Simpleperf did not start successfully.");
        }
    }

    /** Stop simpleperf sampling and dump the collected file into the given path. */
    private void stopSimpleperf(Path path) {
        if (!mSimpleperfHelper.stopCollecting(path.toString())) {
            Log.e(TAG, "Failed to collect the simpleperf output.");
        }
    }

    @Before
    public void setUp() {
        mHandlerThread = new HandlerThread("MessageQueuePerfTest");
        mHandlerThread.start();

        Bundle arguments = androidx.test.platform.app.InstrumentationRegistry.getArguments();
        if (arguments != null && arguments.getString("no-simpleperf") != null) {
            mEnableSimpleperf = false;
        }

        if (mEnableSimpleperf) {
            String args =
                    "-o /data/local/tmp/perf.data -g -e cpu-cycles -p "
                            + mSimpleperfHelper.getPID("com.android.perftests.core");
            startSimpleperf("record", args);
        }
    }

    @After
    public void tearDown() {
        mHandlerThread.quitSafely();

        if (mEnableSimpleperf) {
            final File outputDir = InstrumentationRegistry.getContext().getExternalFilesDir(null);
            final Path outputPath =
                    new File(outputDir, mTestName.getMethodName() + ".perf.data").toPath();
            stopSimpleperf(outputPath);
        }
    }

    static class EnqueueThread extends Thread {
+6 −6
Original line number Diff line number Diff line
@@ -51,6 +51,7 @@ import org.junit.runner.RunWith;
import java.io.IOException;
import java.nio.file.Path;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;

@LargeTest
@@ -79,7 +80,10 @@ public class SurfaceFlingerPerfTest {
    private static String sImmersiveModeConfirmationValue;
    /** Start simpleperf sampling. */
    public void startSimpleperf(String subcommand, String arguments) {
        if (!mSimpleperfHelper.startCollecting(subcommand, arguments)) {
        List<String> commandArgsList = new ArrayList<>();
        commandArgsList.add(subcommand);
        commandArgsList.add(arguments);
        if (!mSimpleperfHelper.startCollecting(commandArgsList)) {
            Log.e(TAG, "Simpleperf did not start successfully.");
        }
    }
@@ -166,11 +170,7 @@ public class SurfaceFlingerPerfTest {

    @After
    public void teardown() {
        try {
            mSimpleperfHelper.stopSimpleperf();
        } catch (IOException e) {
            Log.e(TAG, "Failed to stop simpleperf", e);
        }
        mSimpleperfHelper.stopCollecting("/sdcard/test_results/perf.data");
        mSurfaceControls.forEach(SurfaceControl::release);
        mBufferTrackers.forEach(BufferFlinger::freeBuffers);
    }
+2 −1
Original line number Diff line number Diff line
@@ -448,7 +448,6 @@ MissingGetterMatchingBuilder: android.content.AttributionSource.Builder#setNextA
MissingGetterMatchingBuilder: android.os.RemoteCallbackList.Builder#setInterfaceDiedCallback(android.os.RemoteCallbackList.Builder.InterfaceDiedCallback<E>):
    android.os.RemoteCallbackList does not declare a `getInterfaceDiedCallback()` method matching method android.os.RemoteCallbackList.Builder.setInterfaceDiedCallback(android.os.RemoteCallbackList.Builder.InterfaceDiedCallback<E>)


PublicTypedef: android.telecom.Call.AudioProcessingUseCase:
    Don't expose @IntDef: AduioProcessingUseCase must be hidden.

@@ -1045,6 +1044,8 @@ RequiresPermission: android.telephony.TelephonyManager#getSubscriberId():
    Method 'getSubscriberId' documentation mentions permissions already declared by @RequiresPermission
RequiresPermission: android.telephony.TelephonyManager#getSupportedRadioAccessFamily():
    Method 'getSupportedRadioAccessFamily' documentation mentions permissions already declared by @RequiresPermission
RequiresPermission: android.telephony.TelephonyManager#getUiccCardsInfo():
    Method 'getUiccCardsInfo' documentation duplicates auto-generated documentation by @RequiresPermission. If the permissions are only required under certain circumstances use conditional=true to suppress the auto-documentation
RequiresPermission: android.telephony.TelephonyManager#getVisualVoicemailPackageName():
    Method 'getVisualVoicemailPackageName' documentation mentions permissions already declared by @RequiresPermission
RequiresPermission: android.telephony.TelephonyManager#getVoiceMailAlphaTag():
+24 −6
Original line number Diff line number Diff line
@@ -1322,6 +1322,27 @@ package android.content.res {
    method public void setResourceResolutionLoggingEnabled(boolean);
  }

  public final class CameraCompatibilityInfo implements android.os.Parcelable {
    method public void applyToConfigurationIfNeeded(@NonNull android.content.res.Configuration);
    method public int describeContents();
    method public int getDisplayRotationSandbox();
    method public int getRotateAndCropRotation();
    method public static boolean isCameraCompatModeActive(@NonNull android.content.res.CameraCompatibilityInfo);
    method public boolean shouldLetterboxForCameraCompat();
    method public boolean shouldOverrideSensorOrientation();
    method public void writeToParcel(@NonNull android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.content.res.CameraCompatibilityInfo> CREATOR;
  }

  public static final class CameraCompatibilityInfo.Builder {
    ctor public CameraCompatibilityInfo.Builder();
    method public android.content.res.CameraCompatibilityInfo build();
    method public android.content.res.CameraCompatibilityInfo.Builder setDisplayRotationSandbox(int);
    method public android.content.res.CameraCompatibilityInfo.Builder setRotateAndCropRotation(int);
    method public android.content.res.CameraCompatibilityInfo.Builder setShouldLetterboxForCameraCompat(boolean);
    method public android.content.res.CameraCompatibilityInfo.Builder setShouldOverrideSensorOrientation(boolean);
  }

  public final class Configuration implements java.lang.Comparable<android.content.res.Configuration> android.os.Parcelable {
    field public int assetsSeq;
    field public final android.app.WindowConfiguration windowConfiguration;
@@ -1594,9 +1615,9 @@ package android.graphics.fonts {
package android.hardware {

  @Deprecated public class Camera {
    method @Deprecated public static void getCameraInfo(int, @NonNull android.content.Context, int, android.hardware.Camera.CameraInfo);
    method @Deprecated public static void getCameraInfo(int, @NonNull android.content.Context, android.content.res.CameraCompatibilityInfo, android.hardware.Camera.CameraInfo);
    method @Deprecated public static int getNumberOfCameras(@NonNull android.content.Context);
    method @Deprecated public static android.hardware.Camera open(int, @NonNull android.content.Context, int);
    method @Deprecated public static android.hardware.Camera open(int, @NonNull android.content.Context, @NonNull android.content.res.CameraCompatibilityInfo);
    method @Deprecated public final void setPreviewSurface(android.view.Surface) throws java.io.IOException;
  }

@@ -1691,14 +1712,11 @@ package android.hardware.camera2 {
  public final class CameraManager {
    method @NonNull public android.hardware.camera2.CameraCharacteristics getCameraCharacteristics(@NonNull String, boolean) throws android.hardware.camera2.CameraAccessException;
    method public String[] getCameraIdListNoLazy() throws android.hardware.camera2.CameraAccessException;
    method public static int getRotationOverride(@Nullable android.content.Context, @Nullable android.content.pm.PackageManager, @Nullable String);
    method public static android.content.res.CameraCompatibilityInfo getRotationOverride(@Nullable android.content.Context, @Nullable android.content.pm.PackageManager, @Nullable String);
    method @RequiresPermission(android.Manifest.permission.CAMERA) public void openCamera(@NonNull String, boolean, @Nullable android.os.Handler, @NonNull android.hardware.camera2.CameraDevice.StateCallback) throws android.hardware.camera2.CameraAccessException;
    method @RequiresPermission(allOf={android.Manifest.permission.SYSTEM_CAMERA, android.Manifest.permission.CAMERA}) public void openCamera(@NonNull String, int, @NonNull java.util.concurrent.Executor, @NonNull android.hardware.camera2.CameraDevice.StateCallback) throws android.hardware.camera2.CameraAccessException;
    field public static final String LANDSCAPE_TO_PORTRAIT_PROP = "camera.enable_landscape_to_portrait";
    field public static final long OVERRIDE_CAMERA_LANDSCAPE_TO_PORTRAIT = 250678880L; // 0xef10e60L
    field @FlaggedApi("com.android.window.flags.enable_camera_compat_for_desktop_windowing") public static final int ROTATION_OVERRIDE_NONE = 0; // 0x0
    field @FlaggedApi("com.android.window.flags.enable_camera_compat_for_desktop_windowing") public static final int ROTATION_OVERRIDE_OVERRIDE_TO_PORTRAIT = 1; // 0x1
    field @FlaggedApi("com.android.window.flags.enable_camera_compat_for_desktop_windowing") public static final int ROTATION_OVERRIDE_ROTATION_ONLY = 2; // 0x2
  }

  public abstract static class CameraManager.AvailabilityCallback {
Loading