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

Commit 8fd233b9 authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Snap for 6787280 from 70c29747 to rvc-qpr1-release

Change-Id: I844ed379980c36cb6ebeaa9120e1c1056dbdf917
parents 5cd50bf9 70c29747
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -83,6 +83,8 @@ public final class AppPredictor {
    private final AppPredictionSessionId mSessionId;
    private final ArrayMap<Callback, CallbackWrapper> mRegisteredCallbacks = new ArrayMap<>();

    private final IBinder mToken = new Binder();

    /**
     * Creates a new Prediction client.
     * <p>
@@ -98,7 +100,7 @@ public final class AppPredictor {
        mSessionId = new AppPredictionSessionId(
                context.getPackageName() + ":" + UUID.randomUUID().toString(), context.getUserId());
        try {
            mPredictionManager.createPredictionSession(predictionContext, mSessionId);
            mPredictionManager.createPredictionSession(predictionContext, mSessionId, mToken);
        } catch (RemoteException e) {
            Log.e(TAG, "Failed to create predictor", e);
            e.rethrowAsRuntimeException();
+1 −1
Original line number Diff line number Diff line
@@ -29,7 +29,7 @@ import android.content.pm.ParceledListSlice;
interface IPredictionManager {

    void createPredictionSession(in AppPredictionContext context,
            in AppPredictionSessionId sessionId);
            in AppPredictionSessionId sessionId, in IBinder token);

    void notifyAppTargetEvent(in AppPredictionSessionId sessionId, in AppTargetEvent event);

+7 −0
Original line number Diff line number Diff line
@@ -8965,6 +8965,13 @@ public final class Settings {
         */
        public static final int ACCESSIBILITY_MAGNIFICATION_MODE_WINDOW = 0x2;
        /**
         * Whether the Adaptive connectivity option is enabled.
         *
         * @hide
         */
        public static final String ADAPTIVE_CONNECTIVITY_ENABLED = "adaptive_connectivity_enabled";
        /**
         * Keys we no longer back up under the current schema, but want to continue to
         * process when restoring historical backup datasets.
+13 −4
Original line number Diff line number Diff line
@@ -23,6 +23,7 @@ import android.graphics.BitmapFactory;
import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.Drawable;
import android.net.Uri;
import android.util.Log;

import java.io.IOException;
import java.io.InputStream;
@@ -31,6 +32,7 @@ import java.io.InputStream;
 * A class to extract Bitmaps from a MessagingStyle message.
 */
public class LocalImageResolver {
    private static final String TAG = LocalImageResolver.class.getSimpleName();

    private static final int MAX_SAFE_ICON_SIZE_PX = 480;

@@ -60,11 +62,18 @@ public class LocalImageResolver {

    private static BitmapFactory.Options getBoundsOptionsForImage(Uri uri, Context context)
            throws IOException {
        InputStream input = context.getContentResolver().openInputStream(uri);
        BitmapFactory.Options onlyBoundsOptions = new BitmapFactory.Options();
        try (InputStream input = context.getContentResolver().openInputStream(uri)) {
            if (input == null) {
                throw new IllegalArgumentException();
            }
            onlyBoundsOptions.inJustDecodeBounds = true;
            BitmapFactory.decodeStream(input, null, onlyBoundsOptions);
        input.close();
        } catch (IllegalArgumentException iae) {
            onlyBoundsOptions.outWidth = -1;
            onlyBoundsOptions.outHeight = -1;
            Log.e(TAG, "error loading image", iae);
        }
        return onlyBoundsOptions;
    }

+5 −0
Original line number Diff line number Diff line
@@ -2683,4 +2683,9 @@ enum PageId {
    // CATEGORY: SETTINGS
    // OS: R
    MEDIA_CONTROLS_SETTINGS = 1845;

    // OPEN: Settings > Network & internet > Adaptive connectivity
    // CATEGORY: SETTINGS
    // OS: R QPR
    ADAPTIVE_CONNECTIVITY_CATEGORY = 1850;
}
Loading