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

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

Snap for 7732468 from e7f5a375 to sc-qpr1-release

Change-Id: I60afc436112426859c95013785101b49c97725c8
parents 5823fb2e e7f5a375
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -143,7 +143,7 @@ public class AppWidgetProviderInfo implements Parcelable {
    public ComponentName provider;

    /**
     * The default height of the widget when added to a host, in dp. The widget will get
     * The default height of the widget when added to a host, in px. The widget will get
     * at least this width, and will often be given more, depending on the host.
     *
     * <p>This field corresponds to the <code>android:minWidth</code> attribute in
@@ -152,7 +152,7 @@ public class AppWidgetProviderInfo implements Parcelable {
    public int minWidth;

    /**
     * The default height of the widget when added to a host, in dp. The widget will get
     * The default height of the widget when added to a host, in px. The widget will get
     * at least this height, and will often be given more, depending on the host.
     *
     * <p>This field corresponds to the <code>android:minHeight</code> attribute in
@@ -161,7 +161,7 @@ public class AppWidgetProviderInfo implements Parcelable {
    public int minHeight;

    /**
     * Minimum width (in dp) which the widget can be resized to. This field has no effect if it
     * Minimum width (in px) which the widget can be resized to. This field has no effect if it
     * is greater than minWidth or if horizontal resizing isn't enabled (see {@link #resizeMode}).
     *
     * <p>This field corresponds to the <code>android:minResizeWidth</code> attribute in
@@ -170,7 +170,7 @@ public class AppWidgetProviderInfo implements Parcelable {
    public int minResizeWidth;

    /**
     * Minimum height (in dp) which the widget can be resized to. This field has no effect if it
     * Minimum height (in px) which the widget can be resized to. This field has no effect if it
     * is greater than minHeight or if vertical resizing isn't enabled (see {@link #resizeMode}).
     *
     * <p>This field corresponds to the <code>android:minResizeHeight</code> attribute in
@@ -179,7 +179,7 @@ public class AppWidgetProviderInfo implements Parcelable {
    public int minResizeHeight;

    /**
     * Maximum width (in dp) which the widget can be resized to. This field has no effect if it is
     * Maximum width (in px) which the widget can be resized to. This field has no effect if it is
     * smaller than minWidth or if horizontal resizing isn't enabled (see {@link #resizeMode}).
     *
     * <p>This field corresponds to the <code>android:maxResizeWidth</code> attribute in the
@@ -189,7 +189,7 @@ public class AppWidgetProviderInfo implements Parcelable {
    public int maxResizeWidth;

    /**
     * Maximum height (in dp) which the widget can be resized to. This field has no effect if it is
     * Maximum height (in px) which the widget can be resized to. This field has no effect if it is
     * smaller than minHeight or if vertical resizing isn't enabled (see {@link #resizeMode}).
     *
     * <p>This field corresponds to the <code>android:maxResizeHeight</code> attribute in the
+1 −1
Original line number Diff line number Diff line
@@ -436,7 +436,7 @@ public class StatusBarNotification implements Parcelable {
            try {
                ApplicationInfo ai = context.getPackageManager()
                        .getApplicationInfoAsUser(pkg, PackageManager.MATCH_UNINSTALLED_PACKAGES,
                                getUserId());
                                getNormalizedUserId());
                mContext = context.createApplicationContext(ai,
                        Context.CONTEXT_RESTRICTED);
            } catch (PackageManager.NameNotFoundException e) {
+18 −0
Original line number Diff line number Diff line
@@ -17,6 +17,8 @@
package android.service.notification;

import static junit.framework.Assert.assertEquals;
import static junit.framework.Assert.assertNotNull;
import static junit.framework.Assert.assertNotSame;
import static junit.framework.Assert.assertNull;

import static org.junit.Assert.assertFalse;
@@ -51,6 +53,7 @@ public class StatusBarNotificationTest {

    private final Context mMockContext = mock(Context.class);
    @Mock
    private Context mRealContext;
    private PackageManager mPm;

    private static final String PKG = "com.example.o";
@@ -75,6 +78,8 @@ public class StatusBarNotificationTest {
                InstrumentationRegistry.getContext().getResources());
        when(mMockContext.getPackageManager()).thenReturn(mPm);
        when(mMockContext.getApplicationInfo()).thenReturn(new ApplicationInfo());

        mRealContext = InstrumentationRegistry.getContext();
    }

    @Test
@@ -199,6 +204,19 @@ public class StatusBarNotificationTest {

    }

    @Test
    public void testGetPackageContext_worksWithUserAll() {
        String pkg = "com.android.systemui";
        int uid = 1000;
        Notification notification = getNotificationBuilder(GROUP_ID_1, CHANNEL_ID).build();
        StatusBarNotification sbn = new StatusBarNotification(
                pkg, pkg, ID, TAG, uid, uid, notification, UserHandle.ALL, null, UID);
        Context resultContext = sbn.getPackageContext(mRealContext);
        assertNotNull(resultContext);
        assertNotSame(mRealContext, resultContext);
        assertEquals(pkg, resultContext.getPackageName());
    }

    private StatusBarNotification getNotification(String pkg, String group, String channelId) {
        return getNotification(pkg, getNotificationBuilder(group, channelId));
    }
+1 −1
Original line number Diff line number Diff line
@@ -20,7 +20,7 @@
    android:id="@+id/udfps_view"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    systemui:sensorTouchAreaCoefficient="0.75"
    systemui:sensorTouchAreaCoefficient="1.0"
    android:contentDescription="@string/accessibility_fingerprint_label">

    <ViewStub
+8 −0
Original line number Diff line number Diff line
@@ -213,6 +213,14 @@ public class DozeLog implements Dumpable {
        mLogger.logStateChangedSent(state);
    }

    /**
     * Appends display state delayed by UDFPS event to the logs
     * @param delayedDisplayState the display screen state that was delayed
     */
    public void traceDisplayStateDelayedByUdfps(int delayedDisplayState) {
        mLogger.logDisplayStateDelayedByUdfps(delayedDisplayState);
    }

    /**
     * Appends display state changed event to the logs
     * @param displayState new DozeMachine state
Loading