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

Commit 37da93ce authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Snap for 46534713 from 3ce667a4 to pi-release

Change-Id: I610bcc02f5b8885fd5d376013b6eb2497276848b
parents f4dc60bd 3ce667a4
Loading
Loading
Loading
Loading
+100 −15
Original line number Diff line number Diff line
@@ -116,6 +116,26 @@ public class TextViewPrecomputedTextPerfTest {
        }
    }

    @Test
    public void testNewLayout_RandomText_Selectable() {
        final BenchmarkState state = mPerfStatusReporter.getBenchmarkState();
        BoringLayout.Metrics metrics = new BoringLayout.Metrics();
        while (state.keepRunning()) {
            state.pauseTiming();
            final CharSequence text = mTextUtil.nextRandomParagraph(WORD_LENGTH, NO_STYLE_TEXT);
            final TextView textView = new TextView(getContext());
            textView.setTextIsSelectable(true);
            textView.setBreakStrategy(Layout.BREAK_STRATEGY_BALANCED);
            textView.setHyphenationFrequency(Layout.HYPHENATION_FREQUENCY_NORMAL);
            textView.setText(text);
            Canvas.freeTextLayoutCaches();
            state.resumeTiming();

            textView.makeNewLayout(TEXT_WIDTH, TEXT_WIDTH, UNKNOWN_BORING, UNKNOWN_BORING,
                TEXT_WIDTH, false);
        }
    }

    @Test
    public void testNewLayout_PrecomputedText() {
        final BenchmarkState state = mPerfStatusReporter.getBenchmarkState();
@@ -178,6 +198,24 @@ public class TextViewPrecomputedTextPerfTest {
        }
    }

    @Test
    public void testSetText_RandomText_Selectable() {
        final BenchmarkState state = mPerfStatusReporter.getBenchmarkState();
        BoringLayout.Metrics metrics = new BoringLayout.Metrics();
        while (state.keepRunning()) {
            state.pauseTiming();
            final CharSequence text = mTextUtil.nextRandomParagraph(WORD_LENGTH, NO_STYLE_TEXT);
            final TextView textView = new TextView(getContext());
            textView.setTextIsSelectable(true);
            textView.setBreakStrategy(Layout.BREAK_STRATEGY_BALANCED);
            textView.setHyphenationFrequency(Layout.HYPHENATION_FREQUENCY_NORMAL);
            Canvas.freeTextLayoutCaches();
            state.resumeTiming();

            textView.setText(text);
        }
    }

    @Test
    public void testSetText_PrecomputedText() {
        final BenchmarkState state = mPerfStatusReporter.getBenchmarkState();
@@ -222,8 +260,8 @@ public class TextViewPrecomputedTextPerfTest {
    @Test
    public void testOnMeasure_RandomText() {
        final BenchmarkState state = mPerfStatusReporter.getBenchmarkState();
        int width = MeasureSpec.makeMeasureSpec(MeasureSpec.AT_MOST, TEXT_WIDTH);
        int height = MeasureSpec.makeMeasureSpec(MeasureSpec.UNSPECIFIED, 0);
        int width = MeasureSpec.makeMeasureSpec(TEXT_WIDTH, MeasureSpec.AT_MOST);
        int height = MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED);
        while (state.keepRunning()) {
            state.pauseTiming();
            final CharSequence text = mTextUtil.nextRandomParagraph(WORD_LENGTH, NO_STYLE_TEXT);
@@ -239,11 +277,32 @@ public class TextViewPrecomputedTextPerfTest {
        }
    }

    @Test
    public void testOnMeasure_RandomText_Selectable() {
        final BenchmarkState state = mPerfStatusReporter.getBenchmarkState();
        int width = MeasureSpec.makeMeasureSpec(TEXT_WIDTH, MeasureSpec.AT_MOST);
        int height = MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED);
        while (state.keepRunning()) {
            state.pauseTiming();
            final CharSequence text = mTextUtil.nextRandomParagraph(WORD_LENGTH, NO_STYLE_TEXT);
            final TestableTextView textView = new TestableTextView(getContext());
            textView.setTextIsSelectable(true);
            textView.setBreakStrategy(Layout.BREAK_STRATEGY_BALANCED);
            textView.setHyphenationFrequency(Layout.HYPHENATION_FREQUENCY_NORMAL);
            textView.setText(text);
            textView.nullLayouts();
            Canvas.freeTextLayoutCaches();
            state.resumeTiming();

            textView.onMeasure(width, height);
        }
    }

    @Test
    public void testOnMeasure_PrecomputedText() {
        final BenchmarkState state = mPerfStatusReporter.getBenchmarkState();
        int width = MeasureSpec.makeMeasureSpec(MeasureSpec.AT_MOST, TEXT_WIDTH);
        int height = MeasureSpec.makeMeasureSpec(MeasureSpec.UNSPECIFIED, 0);
        int width = MeasureSpec.makeMeasureSpec(TEXT_WIDTH, MeasureSpec.AT_MOST);
        int height = MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED);
        while (state.keepRunning()) {
            state.pauseTiming();
            final PrecomputedText.Params params = new PrecomputedText.Params.Builder(PAINT)
@@ -265,8 +324,8 @@ public class TextViewPrecomputedTextPerfTest {
    @Test
    public void testOnMeasure_PrecomputedText_Selectable() {
        final BenchmarkState state = mPerfStatusReporter.getBenchmarkState();
        int width = MeasureSpec.makeMeasureSpec(MeasureSpec.AT_MOST, TEXT_WIDTH);
        int height = MeasureSpec.makeMeasureSpec(MeasureSpec.UNSPECIFIED, 0);
        int width = MeasureSpec.makeMeasureSpec(TEXT_WIDTH, MeasureSpec.AT_MOST);
        int height = MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED);
        while (state.keepRunning()) {
            state.pauseTiming();
            final PrecomputedText.Params params = new PrecomputedText.Params.Builder(PAINT)
@@ -289,8 +348,8 @@ public class TextViewPrecomputedTextPerfTest {
    @Test
    public void testOnDraw_RandomText() {
        final BenchmarkState state = mPerfStatusReporter.getBenchmarkState();
        int width = MeasureSpec.makeMeasureSpec(MeasureSpec.AT_MOST, TEXT_WIDTH);
        int height = MeasureSpec.makeMeasureSpec(MeasureSpec.UNSPECIFIED, 0);
        int width = MeasureSpec.makeMeasureSpec(TEXT_WIDTH, MeasureSpec.AT_MOST);
        int height = MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED);
        final RenderNode node = RenderNode.create("benchmark", null);
        while (state.keepRunning()) {
            state.pauseTiming();
@@ -299,8 +358,34 @@ public class TextViewPrecomputedTextPerfTest {
            textView.setBreakStrategy(Layout.BREAK_STRATEGY_BALANCED);
            textView.setHyphenationFrequency(Layout.HYPHENATION_FREQUENCY_NORMAL);
            textView.setText(text);
            textView.measure(width, height);
            textView.layout(0, 0, textView.getMeasuredWidth(), textView.getMeasuredHeight());
            final DisplayListCanvas c = node.start(
                textView.getMeasuredWidth(), textView.getMeasuredHeight());
            textView.nullLayouts();
            textView.onMeasure(width, height);
            Canvas.freeTextLayoutCaches();
            state.resumeTiming();

            textView.onDraw(c);
        }
    }

    @Test
    public void testOnDraw_RandomText_Selectable() {
        final BenchmarkState state = mPerfStatusReporter.getBenchmarkState();
        int width = MeasureSpec.makeMeasureSpec(TEXT_WIDTH, MeasureSpec.AT_MOST);
        int height = MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED);
        final RenderNode node = RenderNode.create("benchmark", null);
        while (state.keepRunning()) {
            state.pauseTiming();
            final CharSequence text = mTextUtil.nextRandomParagraph(WORD_LENGTH, NO_STYLE_TEXT);
            final TestableTextView textView = new TestableTextView(getContext());
            textView.setTextIsSelectable(true);
            textView.setBreakStrategy(Layout.BREAK_STRATEGY_BALANCED);
            textView.setHyphenationFrequency(Layout.HYPHENATION_FREQUENCY_NORMAL);
            textView.setText(text);
            textView.measure(width, height);
            textView.layout(0, 0, textView.getMeasuredWidth(), textView.getMeasuredHeight());
            final DisplayListCanvas c = node.start(
                textView.getMeasuredWidth(), textView.getMeasuredHeight());
            textView.nullLayouts();
@@ -314,8 +399,8 @@ public class TextViewPrecomputedTextPerfTest {
    @Test
    public void testOnDraw_PrecomputedText() {
        final BenchmarkState state = mPerfStatusReporter.getBenchmarkState();
        int width = MeasureSpec.makeMeasureSpec(MeasureSpec.AT_MOST, TEXT_WIDTH);
        int height = MeasureSpec.makeMeasureSpec(MeasureSpec.UNSPECIFIED, 0);
        int width = MeasureSpec.makeMeasureSpec(TEXT_WIDTH, MeasureSpec.AT_MOST);
        int height = MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED);
        final RenderNode node = RenderNode.create("benchmark", null);
        while (state.keepRunning()) {
            state.pauseTiming();
@@ -327,8 +412,8 @@ public class TextViewPrecomputedTextPerfTest {
            final TestableTextView textView = new TestableTextView(getContext());
            textView.setTextMetricsParams(params);
            textView.setText(text);
            textView.nullLayouts();
            textView.onMeasure(width, height);
            textView.measure(width, height);
            textView.layout(0, 0, textView.getMeasuredWidth(), textView.getMeasuredHeight());
            final DisplayListCanvas c = node.start(
                textView.getMeasuredWidth(), textView.getMeasuredHeight());
            textView.nullLayouts();
@@ -356,8 +441,8 @@ public class TextViewPrecomputedTextPerfTest {
            textView.setTextIsSelectable(true);
            textView.setTextMetricsParams(params);
            textView.setText(text);
            textView.nullLayouts();
            textView.onMeasure(width, height);
            textView.measure(width, height);
            textView.layout(0, 0, textView.getMeasuredWidth(), textView.getMeasuredHeight());
            final DisplayListCanvas c = node.start(
                textView.getMeasuredWidth(), textView.getMeasuredHeight());
            textView.nullLayouts();
+1 −1
Original line number Diff line number Diff line
@@ -7278,7 +7278,6 @@ package android.app.slice {
  public abstract class SliceProvider extends android.content.ContentProvider {
    ctor public SliceProvider();
    method public final int delete(android.net.Uri, java.lang.String, java.lang.String[]);
    method public final java.lang.String getBindingPackage();
    method public final java.lang.String getType(android.net.Uri);
    method public final android.net.Uri insert(android.net.Uri, android.content.ContentValues);
    method public android.app.slice.Slice onBindSlice(android.net.Uri, java.util.List<android.app.slice.SliceSpec>);
@@ -14437,6 +14436,7 @@ package android.graphics {
    method public static android.graphics.Typeface createFromFile(java.lang.String);
    method public static android.graphics.Typeface defaultFromStyle(int);
    method public int getStyle();
    method public int getWeight();
    method public final boolean isBold();
    method public final boolean isItalic();
    field public static final int BOLD = 1; // 0x1
+11 −4
Original line number Diff line number Diff line
@@ -261,6 +261,7 @@ package android.app {

  public class AppOpsManager {
    method public static java.lang.String[] getOpStrs();
    method public void setMode(java.lang.String, int, java.lang.String, int);
    method public void setUidMode(java.lang.String, int, int);
    field public static final java.lang.String OPSTR_ACCEPT_HANDOVER = "android:accept_handover";
    field public static final java.lang.String OPSTR_ACCESS_NOTIFICATIONS = "android:access_notifications";
@@ -5261,12 +5262,13 @@ package android.telephony {
  }

  public class UiccSlotInfo implements android.os.Parcelable {
    ctor public UiccSlotInfo(boolean, boolean, java.lang.String, int, int);
    ctor public UiccSlotInfo(boolean, boolean, java.lang.String, int, int, boolean);
    method public int describeContents();
    method public java.lang.String getCardId();
    method public int getCardStateInfo();
    method public boolean getIsActive();
    method public boolean getIsEuicc();
    method public boolean getIsExtendedApduSupported();
    method public int getLogicalSlotIdx();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final int CARD_STATE_INFO_ABSENT = 1; // 0x1
@@ -6127,19 +6129,24 @@ package android.telephony.ims.stub {
  }

  public final class ImsFeatureConfiguration implements android.os.Parcelable {
    ctor public ImsFeatureConfiguration();
    method public int describeContents();
    method public int[] getServiceFeatures();
    method public java.util.Set<android.telephony.ims.stub.ImsFeatureConfiguration.FeatureSlotPair> getServiceFeatures();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.telephony.ims.stub.ImsFeatureConfiguration> CREATOR;
  }

  public static class ImsFeatureConfiguration.Builder {
    ctor public ImsFeatureConfiguration.Builder();
    method public android.telephony.ims.stub.ImsFeatureConfiguration.Builder addFeature(int);
    method public android.telephony.ims.stub.ImsFeatureConfiguration.Builder addFeature(int, int);
    method public android.telephony.ims.stub.ImsFeatureConfiguration build();
  }

  public static final class ImsFeatureConfiguration.FeatureSlotPair {
    ctor public ImsFeatureConfiguration.FeatureSlotPair(int, int);
    field public final int featureType;
    field public final int slotId;
  }

  public class ImsMultiEndpointImplBase {
    ctor public ImsMultiEndpointImplBase();
    method public final void onImsExternalCallStateUpdate(java.util.List<android.telephony.ims.ImsExternalCallState>);
+9 −0
Original line number Diff line number Diff line
package android {

  public static final class Manifest.permission {
    field public static final java.lang.String BRIGHTNESS_SLIDER_USAGE = "android.permission.BRIGHTNESS_SLIDER_USAGE";
    field public static final java.lang.String CONFIGURE_DISPLAY_BRIGHTNESS = "android.permission.CONFIGURE_DISPLAY_BRIGHTNESS";
  }

}

package android.animation {

  public class ValueAnimator extends android.animation.Animator {
+168 −0
Original line number Diff line number Diff line
@@ -23,6 +23,7 @@ option java_outer_classname = "AtomsProto";

import "frameworks/base/cmds/statsd/src/atom_field_options.proto";
import "frameworks/base/core/proto/android/app/enums.proto";
import "frameworks/base/core/proto/android/bluetooth/enums.proto";
import "frameworks/base/core/proto/android/os/enums.proto";
import "frameworks/base/core/proto/android/server/enums.proto";
import "frameworks/base/core/proto/android/telecomm/enums.proto";
@@ -106,6 +107,14 @@ message Atom {
        KeyguardBouncerPasswordEntered keyguard_bouncer_password_entered = 64;
        AppDied app_died=65;
        ResourceConfigurationChanged resource_configuration_changed = 66;
        BluetoothEnabledStateChanged bluetooth_enabled_state_changed = 67;
        BluetoothConnectionStateChanged bluetooth_connection_state_changed = 68;
        BluetoothA2dpAudioStateChanged bluetooth_a2dp_audio_state_changed = 69;
        UsbConnectorStateChanged usb_connector_changed = 70;
        SpeakerImpedanceReported speaker_impedance_reported = 71;
        HardwareFailed hardware_failed = 72;
        PhysicalDropDetected physical_drop_detected = 73;
        ChargeCyclesReported charge_cycles_reported = 74;
        // TODO: Reorder the numbering so that the most frequent occur events occur in the first 15.
    }

@@ -903,6 +912,165 @@ message ResourceConfigurationChanged {
    optional int32 uiMode = 17;
}

/**
 * Logs when Bluetooth is enabled and disabled.
 *
 * Logged from:
 *   services/core/java/com/android/server/BluetoothManagerService.java
 */
message BluetoothEnabledStateChanged {
    repeated AttributionNode attribution_node = 1;
    // Whether or not bluetooth is enabled on the device.
    enum State {
        UNKNOWN = 0;
        ENABLED = 1;
        DISABLED = 2;
    }
    optional State state = 2;
    // The reason for being enabled/disabled.
    // Eg. Airplane mode, crash, application request.
    optional android.bluetooth.EnableDisableReasonEnum reason = 3;
    // If the reason is an application request, this will be the package name.
    optional string pkgName = 4;
}

/**
 * Logs when a Bluetooth device connects and disconnects.
 *
 * Logged from:
 *    packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterProperties.java
 */
message BluetoothConnectionStateChanged {
    // The state of the connection.
    // Eg: CONNECTING, CONNECTED, DISCONNECTING, DISCONNECTED.
    optional android.bluetooth.ConnectionStateEnum state = 1;
    // An identifier that can be used to match connect and disconnect events.
    // Currently is last two bytes of a hash of a device level ID and
    // the mac address of the bluetooth device that is connected.
    optional int32 obfuscated_id = 2;
    // The profile that is connected. Eg. GATT, A2DP, HEADSET.
    // From android.bluetooth.BluetoothAdapter.java
    optional int32 bt_profile = 3;
}

/**
 * Logs when Bluetooth A2dp audio streaming state changes.
 *
 * Logged from:
 *    TODO(b/73971848)
 */
message BluetoothA2dpAudioStateChanged {
    // Whether or not audio is being played using Bluetooth A2dp.
    enum State {
        UNKNOWN = 0;
        PLAY = 1;
        STOP = 2;
    }
    optional State state = 1;
}

/**
 * Logs when something is plugged into or removed from the USB-C connector.
 *
 * Logged from:
 *  Vendor USB HAL.
 */
message UsbConnectorStateChanged {
    enum State {
      DISCONNECTED = 0;
      CONNECTED = 1;
    }
    optional State state = 1;
}

/**
 * Logs the reported speaker impedance.
 *
 * Logged from:
 *  Vendor audio implementation.
 */
message SpeakerImpedanceReported {
    optional int32 speaker_location = 1;
    optional int32 impedance = 2;
}

/**
 * Logs the report of a failed hardware.
 *
 * Logged from:
 *  Vendor HALs.
 *
 */
message HardwareFailed {
    enum HardwareType {
        HARDWARE_FAILED_UNKNOWN = 0;
        HARDWARE_FAILED_MICROPHONE = 1;
        HARDWARE_FAILED_CODEC = 2;
        HARDWARE_FAILED_SPEAKER = 3;
        HARDWARE_FAILED_FINGERPRINT = 4;
    }
    optional HardwareType hardware_type = 1;

    /* hardware_location allows vendors to differentiate between multiple instances of
    * the same hardware_type.  The specific locations are vendor defined integers,
    * referring to board-specific numbering schemes.
    */
    optional int32 hardware_location = 2;

    /* failure_code is specific to the HardwareType of the failed hardware.
     * It should use the enum values defined below.
     */
    enum MicrophoneFailureCode {
        MICROPHONE_FAILURE_COMPLETE = 0;
    }
    enum CodecFailureCode {
        CODEC_FAILURE_COMPLETE = 0;
    }
    enum SpeakerFailureCode {
        SPEAKER_FAILURE_COMPLETE = 0;
        SPEAKER_FAILURE_HIGH_Z = 1;
        SPEAKER_FAILURE_SHORT = 2;
    }
    enum FingerprintFailureCode {
        FINGERPRINT_FAILURE_COMPLETE = 0;
        FINGERPRINT_SENSOR_BROKEN = 1;
        FINGERPRINT_TOO_MANY_DEAD_PIXELS = 2;
    }
    optional int32 failure_code = 3;
}

/**
 * Log an event when the device has been physically dropped.
 * Reported from the /vendor partition.
 */
message PhysicalDropDetected {
    // Confidence that the event was actually a drop, 0 -> 100
    optional int32 confidence_pctg = 1;
    // Peak acceleration of the drop, in 1/1000s of a g.
    optional int32 accel_peak_thousandths_g = 2;
}

/**
 * Log bucketed battery charge cycles.
 *
 * Each bucket represents cycles of the battery past
 * a given charge point.  For example, bucket 1 is the
 * lowest 1/8th of the battery, and bucket 8 is 100%.
 *
 * Logged from:
 * /sys/class/power_supply/bms/cycle_count, via Vendor.
 */
message ChargeCyclesReported {
    optional int32 cycle_bucket_1 = 1;
    optional int32 cycle_bucket_2 = 2;
    optional int32 cycle_bucket_3 = 3;
    optional int32 cycle_bucket_4 = 4;
    optional int32 cycle_bucket_5 = 5;
    optional int32 cycle_bucket_6 = 6;
    optional int32 cycle_bucket_7 = 7;
    optional int32 cycle_bucket_8 = 8;
}

/**
 * Logs the duration of a davey (jank of >=700ms) when it occurs
 *
Loading