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

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

Merge cherrypicks of [16065658, 16033980, 16105251, 16117045, 16086468,...

Merge cherrypicks of [16065658, 16033980, 16105251, 16117045, 16086468, 15960214, 16077739, 16211938, 16222839, 16191693, 16091135, 16220980, 16214442, 16233501, 16286398, 16333337] into sc-qpr1-release.

Change-Id: I961e3b46e89863311915418d1d4b092d7d970d0e
parents 1de01b35 f5fbc4aa
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -77,7 +77,6 @@ import android.os.IBinder;
import android.os.Looper;
import android.os.Parcelable;
import android.os.PersistableBundle;
import android.os.PowerManager;
import android.os.Process;
import android.os.RemoteException;
import android.os.ServiceManager.ServiceNotFoundException;
@@ -8788,9 +8787,7 @@ public class Activity extends ContextThemeWrapper
     * the activity is visible after the screen is turned on when the lockscreen is up. In addition,
     * if this flag is set and the activity calls {@link
     * KeyguardManager#requestDismissKeyguard(Activity, KeyguardManager.KeyguardDismissCallback)}
     * the screen will turn on. If the screen is off and device is not secured, this flag can turn
     * screen on and dismiss keyguard to make this activity visible and resume, which can be used to
     * replace {@link PowerManager#ACQUIRE_CAUSES_WAKEUP}
     * the screen will turn on.
     *
     * @param turnScreenOn {@code true} to turn on the screen; {@code false} otherwise.
     *
+8 −0
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@

package android.app.admin;

import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.UserIdInt;
import android.content.ComponentName;
@@ -76,6 +77,13 @@ public abstract class DevicePolicyManagerInternal {
    public abstract void addOnCrossProfileWidgetProvidersChangeListener(
            OnCrossProfileWidgetProvidersChangeListener listener);

    /**
     * @param userHandle the handle of the user whose profile owner is being fetched.
     * @return the configured supervision app if it exists and is the device owner or policy owner.
     */
    public abstract @Nullable ComponentName getProfileOwnerOrDeviceOwnerSupervisionComponent(
            @NonNull UserHandle userHandle);

    /**
     * Checks if an app with given uid is an active device owner of its user.
     *
+10 −5
Original line number Diff line number Diff line
@@ -782,8 +782,8 @@ public class NetworkTemplate implements Parcelable {
    }

    /**
     * Examine the given template and normalize if it refers to a "merged"
     * mobile subscriber. We pick the "lowest" merged subscriber as the primary
     * Examine the given template and normalize it.
     * We pick the "lowest" merged subscriber as the primary
     * for key purposes, and expand the template to match all other merged
     * subscribers.
     * <p>
@@ -798,8 +798,8 @@ public class NetworkTemplate implements Parcelable {
    }

    /**
     * Examine the given template and normalize if it refers to a "merged"
     * mobile subscriber. We pick the "lowest" merged subscriber as the primary
     * Examine the given template and normalize it.
     * We pick the "lowest" merged subscriber as the primary
     * for key purposes, and expand the template to match all other merged
     * subscribers.
     *
@@ -811,7 +811,12 @@ public class NetworkTemplate implements Parcelable {
     * A, but also matches B.
     */
    public static NetworkTemplate normalize(NetworkTemplate template, List<String[]> mergedList) {
        if (!template.isMatchRuleMobile()) return template;
        // Now there are several types of network which uses SubscriberId to store network
        // information. For instances:
        // The TYPE_WIFI with subscriberId means that it is a merged carrier wifi network.
        // The TYPE_CARRIER means that the network associate to specific carrier network.

        if (template.mSubscriberId == null) return template;

        for (String[] merged : mergedList) {
            if (ArrayUtils.contains(merged, template.mSubscriberId)) {
+24 −12
Original line number Diff line number Diff line
@@ -800,11 +800,7 @@ public final class ViewRootImpl implements ViewParent,
                context);
        mCompatibleVisibilityInfo = new SystemUiVisibilityInfo();
        mAccessibilityManager = AccessibilityManager.getInstance(context);
        mAccessibilityManager.addAccessibilityStateChangeListener(
                mAccessibilityInteractionConnectionManager, mHandler);
        mHighContrastTextManager = new HighContrastTextManager();
        mAccessibilityManager.addHighTextContrastStateChangeListener(
                mHighContrastTextManager, mHandler);
        mViewConfiguration = ViewConfiguration.get(context);
        mDensity = context.getResources().getDisplayMetrics().densityDpi;
        mNoncompatDensity = context.getResources().getDisplayMetrics().noncompatDensityDpi;
@@ -1004,8 +1000,6 @@ public final class ViewRootImpl implements ViewParent,
                mView = view;

                mAttachInfo.mDisplayState = mDisplay.getState();
                mDisplayManager.registerDisplayListener(mDisplayListener, mHandler);

                mViewLayoutDirectionInitial = mView.getRawLayoutDirection();
                mFallbackEventHandler.setView(view);
                mWindowAttributes.copyFrom(attrs);
@@ -1198,6 +1192,7 @@ public final class ViewRootImpl implements ViewParent,
                            "Unable to add window -- unknown error code " + res);
                }

                registerListeners();
                if ((res & WindowManagerGlobal.ADD_FLAG_USE_BLAST) != 0) {
                    mUseBLASTAdapter = true;
                }
@@ -1254,6 +1249,28 @@ public final class ViewRootImpl implements ViewParent,
        }
    }

    /**
     * Register any kind of listeners if setView was success.
     */
    private void registerListeners() {
        mAccessibilityManager.addAccessibilityStateChangeListener(
                mAccessibilityInteractionConnectionManager, mHandler);
        mAccessibilityManager.addHighTextContrastStateChangeListener(
                mHighContrastTextManager, mHandler);
        mDisplayManager.registerDisplayListener(mDisplayListener, mHandler);
    }

    /**
     * Unregister all listeners while detachedFromWindow.
     */
    private void unregisterListeners() {
        mAccessibilityManager.removeAccessibilityStateChangeListener(
                mAccessibilityInteractionConnectionManager);
        mAccessibilityManager.removeHighTextContrastStateChangeListener(
                mHighContrastTextManager);
        mDisplayManager.unregisterDisplayListener(mDisplayListener);
    }

    private void setTag() {
        final String[] split = mWindowAttributes.getTitle().toString().split("\\.");
        if (split.length > 0) {
@@ -4979,10 +4996,6 @@ public final class ViewRootImpl implements ViewParent,
        }

        mAccessibilityInteractionConnectionManager.ensureNoConnection();
        mAccessibilityManager.removeAccessibilityStateChangeListener(
                mAccessibilityInteractionConnectionManager);
        mAccessibilityManager.removeHighTextContrastStateChangeListener(
                mHighContrastTextManager);
        removeSendWindowContentChangedCallback();

        destroyHardwareRenderer();
@@ -5015,8 +5028,7 @@ public final class ViewRootImpl implements ViewParent,
            mInputEventReceiver = null;
        }

        mDisplayManager.unregisterDisplayListener(mDisplayListener);

        unregisterListeners();
        unscheduleTraversals();
    }

+3 −2
Original line number Diff line number Diff line
@@ -1908,8 +1908,9 @@
         STREAM_MUSIC as if it's on TV platform. -->
    <bool name="config_single_volume">false</bool>

    <!-- Flag indicating whether the volume panel should show remote sessions. -->
    <bool name="config_volumeShowRemoteSessions">true</bool>
    <!-- Flag indicating whether platform level volume adjustments are enabled for remote sessions
         on grouped devices. -->
    <bool name="config_volumeAdjustmentForRemoteGroupSessions">true</bool>

    <!-- Flag indicating that an outbound call must have a call capable phone account
         that has declared it can process the call's handle. -->
Loading