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

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

Snap for 7633965 from ccdb3242 to sc-release

Change-Id: I59d1aa9bf89cf29d59e72207d4e8e5900c4d5666
parents 1cb4fdb1 ccdb3242
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -387,6 +387,13 @@ public abstract class Service extends ContextWrapper implements ComponentCallbac
     * <p>This mode makes sense for things that will be explicitly started
     * and stopped to run for arbitrary periods of time, such as a service
     * performing background music playback.
     *
     * <p>Since Android version {@link Build.VERSION_CODES#S}, apps
     * targeting {@link Build.VERSION_CODES#S} or above are disallowed
     * to start a foreground service from the background, but the restriction
     * doesn't impact <em>restarts</em> of a sticky foreground service. However,
     * when apps start a sticky foreground service from the background,
     * the same restriction still applies.
     */
    public static final int START_STICKY = 1;
    
+17 −1
Original line number Diff line number Diff line
@@ -1084,6 +1084,12 @@ public class Location implements Parcelable {
        mExtras = (extras == null) ? null : new Bundle(extras);
    }

    /**
     * Location equality is provided primarily for test purposes. Comparing locations for equality
     * in production may indicate incorrect assumptions, and should be avoided whenever possible.
     *
     * <p>{@inheritDoc}
     */
    @Override
    public boolean equals(Object o) {
        if (this == o) {
@@ -1121,7 +1127,17 @@ public class Location implements Parcelable {
                && (!hasBearingAccuracy() || Float.compare(location.mBearingAccuracyDegrees,
                mBearingAccuracyDegrees) == 0)
                && Objects.equals(mProvider, location.mProvider)
                && Objects.equals(mExtras, location.mExtras);
                && areExtrasEqual(mExtras, location.mExtras);
    }

    private static boolean areExtrasEqual(@Nullable Bundle extras1, @Nullable Bundle extras2) {
        if ((extras1 == null || extras1.isEmpty()) && (extras2 == null || extras2.isEmpty())) {
            return true;
        } else if (extras1 == null || extras2 == null) {
            return false;
        } else {
            return extras1.kindofEquals(extras2);
        }
    }

    @Override
+1 −29
Original line number Diff line number Diff line
@@ -15,7 +15,6 @@
 */
package com.android.settingslib.media;

import static android.media.MediaRoute2Info.FEATURE_REMOTE_GROUP_PLAYBACK;
import static android.media.MediaRoute2Info.TYPE_BLUETOOTH_A2DP;
import static android.media.MediaRoute2Info.TYPE_BUILTIN_SPEAKER;
import static android.media.MediaRoute2Info.TYPE_DOCK;
@@ -388,35 +387,8 @@ public class InfoMediaManager extends MediaManager {

    @TargetApi(Build.VERSION_CODES.R)
    boolean shouldEnableVolumeSeekBar(RoutingSessionInfo sessionInfo) {
        if (sessionInfo == null) {
            Log.w(TAG, "shouldEnableVolumeSeekBar() package name is null or empty!");
        return false;
    }
        final List<MediaRoute2Info> mediaRoute2Infos =
                mRouterManager.getSelectedRoutes(sessionInfo);
        // More than one selected route
        if (mediaRoute2Infos.size() > 1) {
            if (DEBUG) {
                Log.d(TAG, "shouldEnableVolumeSeekBar() package name : "
                        + sessionInfo.getClientPackageName()
                        + ", mediaRoute2Infos.size() " + mediaRoute2Infos.size());
            }
            return false;
        }
        // Route contains group feature
        for (MediaRoute2Info mediaRoute2Info : mediaRoute2Infos) {
            final List<String> features = mediaRoute2Info.getFeatures();
            if (features.contains(FEATURE_REMOTE_GROUP_PLAYBACK)) {
                if (DEBUG) {
                    Log.d(TAG, "shouldEnableVolumeSeekBar() package name : "
                            + mediaRoute2Info.getClientPackageName()
                            + "contain group playback ");
                }
                return false;
            }
        }
        return true;
    }

    private void refreshDevices() {
        mMediaDevices.clear();
+3 −1
Original line number Diff line number Diff line
@@ -146,7 +146,9 @@ public class KeyguardSecurityContainerController extends ViewController<Keyguard
                    try {
                        Thread.sleep(5000);
                    } catch (InterruptedException ignored) { }
                    Runtime.getRuntime().gc();
                    System.gc();
                    System.runFinalization();
                    System.gc();
                });
            } else {
                SysUiStatsLog.write(SysUiStatsLog.KEYGUARD_BOUNCER_PASSWORD_ENTERED,
+1 −1
Original line number Diff line number Diff line
@@ -466,7 +466,7 @@ public class MediaOutputController implements LocalMediaManager.DeviceCallback {
    }

    boolean isVolumeControlEnabled(@NonNull MediaDevice device) {
        return !device.getFeatures().contains(MediaRoute2Info.FEATURE_REMOTE_GROUP_PLAYBACK);
        return !isActiveRemoteDevice(device);
    }

    private final MediaController.Callback mCb = new MediaController.Callback() {
Loading