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

Commit 380ee459 authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 9032824 from 486626b5 to tm-qpr1-release

Change-Id: I7e3bb0dd1f7245903a93ab82c152b15c6f4e813d
parents fc57413d 486626b5
Loading
Loading
Loading
Loading
+27 −0
Original line number Diff line number Diff line
@@ -934,6 +934,12 @@ public final class Bundle extends BaseBundle implements Cloneable, Parcelable {
     * you must call {@link #setClassLoader(ClassLoader)} with the proper {@link ClassLoader} first.
     * Otherwise, this method might throw an exception or return {@code null}.
     *
     * <p><b>Warning: </b> the class that implements {@link Parcelable} has to be the immediately
     * enclosing class of the runtime type of its CREATOR field (that is,
     * {@link Class#getEnclosingClass()} has to return the parcelable implementing class),
     * otherwise this method might throw an exception. If the Parcelable class does not enclose the
     * CREATOR, use the deprecated {@link #getParcelable(String)} instead.
     *
     * @param key a String, or {@code null}
     * @param clazz The type of the object expected
     * @return a Parcelable value, or {@code null}
@@ -990,6 +996,13 @@ public final class Bundle extends BaseBundle implements Cloneable, Parcelable {
     * you must call {@link #setClassLoader(ClassLoader)} with the proper {@link ClassLoader} first.
     * Otherwise, this method might throw an exception or return {@code null}.
     *
     * <p><b>Warning: </b> if the list contains items implementing the {@link Parcelable} interface,
     * the class that implements {@link Parcelable} has to be the immediately
     * enclosing class of the runtime type of its CREATOR field (that is,
     * {@link Class#getEnclosingClass()} has to return the parcelable implementing class),
     * otherwise this method might throw an exception. If the Parcelable class does not enclose the
     * CREATOR, use the deprecated {@link #getParcelableArray(String)} instead.
     *
     * @param key a String, or {@code null}
     * @param clazz The type of the items inside the array. This is only verified when unparceling.
     * @return a Parcelable[] value, or {@code null}
@@ -1054,6 +1067,13 @@ public final class Bundle extends BaseBundle implements Cloneable, Parcelable {
     * you must call {@link #setClassLoader(ClassLoader)} with the proper {@link ClassLoader} first.
     * Otherwise, this method might throw an exception or return {@code null}.
     *
     * <p><b>Warning: </b> if the list contains items implementing the {@link Parcelable} interface,
     * the class that implements {@link Parcelable} has to be the immediately
     * enclosing class of the runtime type of its CREATOR field (that is,
     * {@link Class#getEnclosingClass()} has to return the parcelable implementing class),
     * otherwise this method might throw an exception. If the Parcelable class does not enclose the
     * CREATOR, use the deprecated {@link #getParcelableArrayList(String)} instead.
     *
     * @param key   a String, or {@code null}
     * @param clazz The type of the items inside the array list. This is only verified when
     *     unparceling.
@@ -1105,6 +1125,13 @@ public final class Bundle extends BaseBundle implements Cloneable, Parcelable {
     *     <li>The object is not of type {@code clazz}.
     * </ul>
     *
     * <p><b>Warning: </b> if the list contains items implementing the {@link Parcelable} interface,
     * the class that implements {@link Parcelable} has to be the immediately
     * enclosing class of the runtime type of its CREATOR field (that is,
     * {@link Class#getEnclosingClass()} has to return the parcelable implementing class),
     * otherwise this method might throw an exception. If the Parcelable class does not enclose the
     * CREATOR, use the deprecated {@link #getSparseParcelableArray(String)} instead.
     *
     * @param key a String, or null
     * @param clazz The type of the items inside the sparse array. This is only verified when
     *     unparceling.
+53 −0
Original line number Diff line number Diff line
@@ -3235,6 +3235,13 @@ public final class Parcel {
     * Same as {@link #readList(List, ClassLoader)} but accepts {@code clazz} parameter as
     * the type required for each item.
     *
     * <p><b>Warning: </b> if the list contains items implementing the {@link Parcelable} interface,
     * the class that implements {@link Parcelable} has to be the immediately
     * enclosing class of the runtime type of its CREATOR field (that is,
     * {@link Class#getEnclosingClass()} has to return the parcelable implementing class),
     * otherwise this method might throw an exception. If the Parcelable class does not enclose the
     * CREATOR, use the deprecated {@link #readList(List, ClassLoader)} instead.
     *
     * @throws BadParcelableException Throws BadParcelableException if the item to be deserialized
     * is not an instance of that class or any of its children classes or there was an error
     * trying to instantiate an element.
@@ -3463,6 +3470,13 @@ public final class Parcel {
     * Same as {@link #readArrayList(ClassLoader)} but accepts {@code clazz} parameter as
     * the type required for each item.
     *
     * <p><b>Warning: </b> if the list contains items implementing the {@link Parcelable} interface,
     * the class that implements {@link Parcelable} has to be the immediately
     * enclosing class of the runtime type of its CREATOR field (that is,
     * {@link Class#getEnclosingClass()} has to return the parcelable implementing class),
     * otherwise this method might throw an exception. If the Parcelable class does not enclose the
     * CREATOR, use the deprecated {@link #readArrayList(ClassLoader)} instead.
     *
     * @throws BadParcelableException Throws BadParcelableException if the item to be deserialized
     * is not an instance of that class or any of its children classes or there was an error
     * trying to instantiate an element.
@@ -3497,6 +3511,13 @@ public final class Parcel {
     * Same as {@link #readArray(ClassLoader)} but accepts {@code clazz} parameter as
     * the type required for each item.
     *
     * <p><b>Warning: </b> if the list contains items implementing the {@link Parcelable} interface,
     * the class that implements {@link Parcelable} has to be the immediately
     * enclosing class of the runtime type of its CREATOR field (that is,
     * {@link Class#getEnclosingClass()} has to return the parcelable implementing class),
     * otherwise this method might throw an exception. If the Parcelable class does not enclose the
     * CREATOR, use the deprecated {@link #readArray(ClassLoader)} instead.
     *
     * @throws BadParcelableException Throws BadParcelableException if the item to be deserialized
     * is not an instance of that class or any of its children classes or there was an error
     * trying to instantiate an element.
@@ -3530,6 +3551,13 @@ public final class Parcel {
     * Same as {@link #readSparseArray(ClassLoader)} but accepts {@code clazz} parameter as
     * the type required for each item.
     *
     * <p><b>Warning: </b> if the list contains items implementing the {@link Parcelable} interface,
     * the class that implements {@link Parcelable} has to be the immediately
     * enclosing class of the runtime type of its CREATOR field (that is,
     * {@link Class#getEnclosingClass()} has to return the parcelable implementing class),
     * otherwise this method might throw an exception. If the Parcelable class does not enclose the
     * CREATOR, use the deprecated {@link #readSparseArray(ClassLoader)} instead.
     *
     * @throws BadParcelableException Throws BadParcelableException if the item to be deserialized
     * is not an instance of that class or any of its children classes or there was an error
     * trying to instantiate an element.
@@ -3847,6 +3875,13 @@ public final class Parcel {
     * Same as {@link #readParcelableList(List, ClassLoader)} but accepts {@code clazz} parameter as
     * the type required for each item.
     *
     * <p><b>Warning: </b> if the list contains items implementing the {@link Parcelable} interface,
     * the class that implements {@link Parcelable} has to be the immediately
     * enclosing class of the runtime type of its CREATOR field (that is,
     * {@link Class#getEnclosingClass()} has to return the parcelable implementing class),
     * otherwise this method might throw an exception. If the Parcelable class does not enclose the
     * CREATOR, use the deprecated {@link #readParcelableList(List, ClassLoader)} instead.
     *
     * @throws BadParcelableException Throws BadParcelableException if the item to be deserialized
     * is not an instance of that class or any of its children classes or there was an error
     * trying to instantiate an element.
@@ -4744,6 +4779,12 @@ public final class Parcel {
     * Same as {@link #readParcelable(ClassLoader)} but accepts {@code clazz} parameter as the type
     * required for each item.
     *
     * <p><b>Warning: </b> the class that implements {@link Parcelable} has to be the immediately
     * enclosing class of the runtime type of its CREATOR field (that is,
     * {@link Class#getEnclosingClass()} has to return the parcelable implementing class),
     * otherwise this method might throw an exception. If the Parcelable class does not enclose the
     * CREATOR, use the deprecated {@link #readParcelable(ClassLoader)} instead.
     *
     * @throws BadParcelableException Throws BadParcelableException if the item to be deserialized
     * is not an instance of that class or any of its children classes or there was an error
     * trying to instantiate an element.
@@ -4812,6 +4853,12 @@ public final class Parcel {
     * Same as {@link #readParcelableCreator(ClassLoader)} but accepts {@code clazz} parameter
     * as the required type.
     *
     * <p><b>Warning: </b> the class that implements {@link Parcelable} has to be the immediately
     * enclosing class of the runtime type of its CREATOR field (that is,
     * {@link Class#getEnclosingClass()} has to return the parcelable implementing class),
     * otherwise this method might throw an exception. If the Parcelable class does not enclose the
     * CREATOR, use the deprecated {@link #readParcelableCreator(ClassLoader) instead.
     *
     * @throws BadParcelableException Throws BadParcelableException if the item to be deserialized
     * is not an instance of that class or any of its children classes or there there was an error
     * trying to read the {@link Parcelable.Creator}.
@@ -4939,6 +4986,12 @@ public final class Parcel {
     * Same as {@link #readParcelableArray(ClassLoader)}  but accepts {@code clazz} parameter as
     * the type required for each item.
     *
     * <p><b>Warning: </b> the class that implements {@link Parcelable} has to be the immediately
     * enclosing class of the runtime type of its CREATOR field (that is,
     * {@link Class#getEnclosingClass()} has to return the parcelable implementing class),
     * otherwise this method might throw an exception. If the Parcelable class does not enclose the
     * CREATOR, use the deprecated {@link #readParcelableArray(ClassLoader)} instead.
     *
     * @throws BadParcelableException Throws BadParcelableException if the item to be deserialized
     * is not an instance of that class or any of its children classes or there was an error
     * trying to instantiate an element.
+1 −1
Original line number Diff line number Diff line
@@ -284,7 +284,7 @@ public final class ViewRootImpl implements ViewParent,
     * @hide
     */
    public static final boolean LOCAL_LAYOUT =
            SystemProperties.getBoolean("persist.debug.local_layout", true);
            SystemProperties.getBoolean("persist.debug.local_layout", false);

    /**
     * Set this system property to true to force the view hierarchy to render
+17 −2
Original line number Diff line number Diff line
@@ -63,6 +63,7 @@ import android.database.DataSetObserver;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Insets;
import android.graphics.Paint;
import android.graphics.Path;
import android.graphics.drawable.AnimatedVectorDrawable;
@@ -146,6 +147,7 @@ import java.util.Comparator;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.function.Supplier;

/**
@@ -281,6 +283,7 @@ public class ChooserActivity extends ResolverActivity implements
    private long mQueriedSharingShortcutsTimeMs;

    private int mCurrAvailableWidth = 0;
    private Insets mLastAppliedInsets = null;
    private int mLastNumberOfChildren = -1;
    private int mMaxTargetsPerRow = 1;

@@ -1619,6 +1622,8 @@ public class ChooserActivity extends ResolverActivity implements
        if (mChooserMultiProfilePagerAdapter.getInactiveListAdapter() != null) {
            mChooserMultiProfilePagerAdapter.getInactiveListAdapter().destroyAppPredictor();
        }
        mPersonalAppPredictor = null;
        mWorkAppPredictor = null;
    }

    @Override // ResolverListCommunicator
@@ -2531,7 +2536,11 @@ public class ChooserActivity extends ResolverActivity implements
                || gridAdapter.calculateChooserTargetWidth(availableWidth)
                || recyclerView.getAdapter() == null
                || availableWidth != mCurrAvailableWidth;

        boolean insetsChanged = !Objects.equals(mLastAppliedInsets, mSystemWindowInsets);

        if (isLayoutUpdated
                || insetsChanged
                || mLastNumberOfChildren != recyclerView.getChildCount()) {
            mCurrAvailableWidth = availableWidth;
            if (isLayoutUpdated) {
@@ -2552,7 +2561,7 @@ public class ChooserActivity extends ResolverActivity implements
                return;
            }

            if (mLastNumberOfChildren == recyclerView.getChildCount()) {
            if (mLastNumberOfChildren == recyclerView.getChildCount() && !insetsChanged) {
                return;
            }

@@ -2563,6 +2572,7 @@ public class ChooserActivity extends ResolverActivity implements
                int offset = calculateDrawerOffset(top, bottom, recyclerView, gridAdapter);
                mResolverDrawerLayout.setCollapsibleHeightReserved(offset);
                mEnterTransitionAnimationDelegate.markOffsetCalculated();
                mLastAppliedInsets = mSystemWindowInsets;
            });
        }
    }
@@ -3055,7 +3065,12 @@ public class ChooserActivity extends ResolverActivity implements
            mChooserMultiProfilePagerAdapter.setupContainerPadding(
                    getActiveEmptyStateView().findViewById(R.id.resolver_empty_state_container));
        }
        return super.onApplyWindowInsets(v, insets);

        WindowInsets result = super.onApplyWindowInsets(v, insets);
        if (mResolverDrawerLayout != null) {
            mResolverDrawerLayout.requestLayout();
        }
        return result;
    }

    private void setHorizontalScrollingEnabled(boolean enabled) {
+2 −3
Original line number Diff line number Diff line
@@ -1567,8 +1567,7 @@
    <bool name="config_enableIdleScreenBrightnessMode">false</bool>

    <!-- Array of desired screen brightness in nits corresponding to the lux values
         in the config_autoBrightnessLevels array. As with config_screenBrightnessMinimumNits and
         config_screenBrightnessMaximumNits, the display brightness is defined as the measured
         in the config_autoBrightnessLevels array. The display brightness is defined as the measured
         brightness of an all-white image.

         If this is defined then:
@@ -1589,7 +1588,7 @@
    <array name="config_autoBrightnessDisplayValuesNitsIdle">
    </array>

    <!-- Array of output values for button backlight corresponding to the luX values
    <!-- Array of output values for button backlight corresponding to the lux values
         in the config_autoBrightnessLevels array.  This array should have size one greater
         than the size of the config_autoBrightnessLevels array.
         The brightness values must be between 0 and 255 and be non-decreasing.
Loading