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

Commit 4404976a authored by android-build-team Robot's avatar android-build-team Robot
Browse files

release-request-81b48854-d0e0-49af-bcf2-857273cbb8dc-for-git_oc-mr1-release-43...

release-request-81b48854-d0e0-49af-bcf2-857273cbb8dc-for-git_oc-mr1-release-4306444 snap-temp-L17300000097872583

Change-Id: I8bc0accb8d46bec2bdb4e48272b619da16988b20
parents 59d10ef7 102e9e78
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -1603,11 +1603,12 @@ public class WallpaperManager {
    /**
     * Clear the wallpaper for a specific user.  The caller must hold the
     * INTERACT_ACROSS_USERS_FULL permission to clear another user's
     * wallpaper.
     * wallpaper, and must hold the SET_WALLPAPER permission in all
     * circumstances.
     * @hide
     */
    @SystemApi
    @RequiresPermission(android.Manifest.permission.SET_WALLPAPER)
    @RequiresPermission(android.Manifest.permission.INTERACT_ACROSS_USERS_FULL)
    public void clearWallpaper(@SetWallpaperFlags int which, int userId) {
        if (sGlobals.mService == null) {
            Log.w(TAG, "WallpaperService not running");
+9 −1
Original line number Diff line number Diff line
@@ -344,6 +344,7 @@ public final class BluetoothLeScanner {
        private List<List<ResultStorageDescriptor>> mResultStorages;

        // mLeHandle 0: not registered
        // -2: registration failed because app is scanning to frequently
        // -1: scan stopped or registration failed
        // > 0: registered and scan started
        private int mScannerId;
@@ -364,7 +365,7 @@ public final class BluetoothLeScanner {
        public void startRegistration() {
            synchronized (this) {
                // Scan stopped.
                if (mScannerId == -1) return;
                if (mScannerId == -1 || mScannerId == -2) return;
                try {
                    mBluetoothGatt.registerScanner(this, mWorkSource);
                    wait(REGISTRATION_CALLBACK_TIMEOUT_MILLIS);
@@ -378,6 +379,10 @@ public final class BluetoothLeScanner {
                    // Registration timed out or got exception, reset scannerId to -1 so no
                    // subsequent operations can proceed.
                    if (mScannerId == 0) mScannerId = -1;

                    // If scanning too frequently, don't report anything to the app.
                    if (mScannerId == -2) return;

                    postCallbackError(mScanCallback,
                            ScanCallback.SCAN_FAILED_APPLICATION_REGISTRATION_FAILED);
                }
@@ -437,6 +442,9 @@ public final class BluetoothLeScanner {
                        Log.e(TAG, "fail to start le scan: " + e);
                        mScannerId = -1;
                    }
                } else if (status == ScanCallback.SCAN_FAILED_SCANNING_TOO_FREQUENTLY) {
                    // applicaiton was scanning too frequently
                    mScannerId = -2;
                } else {
                    // registration failed
                    mScannerId = -1;
+6 −0
Original line number Diff line number Diff line
@@ -50,6 +50,12 @@ public abstract class ScanCallback {
     */
    public static final int SCAN_FAILED_OUT_OF_HARDWARE_RESOURCES = 5;

    /**
     * Fails to start scan as application tries to scan too frequently.
     * @hide
     */
    public static final int SCAN_FAILED_SCANNING_TOO_FREQUENTLY = 6;

    static final int NO_ERROR = 0;

    /**
+8 −3
Original line number Diff line number Diff line
@@ -21,7 +21,6 @@ import android.content.pm.ApplicationInfo;
import android.content.pm.PackageItemInfo;
import android.content.pm.PackageManager;
import android.content.res.Resources;
import android.graphics.Color;
import android.graphics.drawable.Drawable;
import android.os.UserHandle;
import android.os.UserManager;
@@ -68,8 +67,7 @@ public class IconDrawableFactory {
            return icon;
        }

        // Before badging, add shadow to adaptive icon if needed.
        icon = mLauncherIcons.wrapIconDrawableWithShadow(icon);
        icon = getShadowedIcon(icon);
        if (appInfo.isInstantApp()) {
            int badgeColor = Resources.getSystem().getColor(
                    com.android.internal.R.color.instant_app_badge, null);
@@ -85,6 +83,13 @@ public class IconDrawableFactory {
        return icon;
    }

    /**
     * Add shadow to the icon if {@link AdaptiveIconDrawable}
     */
    public Drawable getShadowedIcon(Drawable icon) {
        return mLauncherIcons.wrapIconDrawableWithShadow(icon);
    }

    // Should have enough colors to cope with UserManagerService.getMaxManagedProfiles()
    @VisibleForTesting
    public static final int[] CORP_BADGE_COLORS = new int[] {
+15 −2
Original line number Diff line number Diff line
@@ -13249,6 +13249,9 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
                    && ((privateFlags & PFLAG_FOCUSED) != 0)) {
                /* Give up focus if we are no longer focusable */
                clearFocus();
                if (mParent instanceof ViewGroup) {
                    ((ViewGroup) mParent).clearFocusedInCluster();
                }
            } else if (((old & FOCUSABLE) == NOT_FOCUSABLE)
                    && ((privateFlags & PFLAG_FOCUSED) == 0)) {
                /*
@@ -13296,7 +13299,12 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
            requestLayout();
            if (((mViewFlags & VISIBILITY_MASK) == GONE)) {
                if (hasFocus()) clearFocus();
                if (hasFocus()) {
                    clearFocus();
                    if (mParent instanceof ViewGroup) {
                        ((ViewGroup) mParent).clearFocusedInCluster();
                    }
                }
                clearAccessibilityFocus();
                destroyDrawingCache();
                if (mParent instanceof View) {
@@ -13324,7 +13332,12 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
            if (((mViewFlags & VISIBILITY_MASK) == INVISIBLE)) {
                // root view becoming invisible shouldn't clear focus and accessibility focus
                if (getRootView() != this) {
                    if (hasFocus()) clearFocus();
                    if (hasFocus()) {
                        clearFocus();
                        if (mParent instanceof ViewGroup) {
                            ((ViewGroup) mParent).clearFocusedInCluster();
                        }
                    }
                    clearAccessibilityFocus();
                }
            }
Loading