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

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

Snap for 8527060 from d70a79df to tm-release

Change-Id: Iebf261f2bb05dd30658c2b31f05f046fd692a2b4
parents 2915afec d70a79df
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -2537,8 +2537,8 @@ public class AppOpsManager {
     * restriction} for a certain app-op.
     */
    private static RestrictionBypass[] sOpAllowSystemRestrictionBypass = new RestrictionBypass[] {
            new RestrictionBypass(true, false), //COARSE_LOCATION
            new RestrictionBypass(true, false), //FINE_LOCATION
            null, //COARSE_LOCATION
            null, //FINE_LOCATION
            null, //GPS
            null, //VIBRATE
            null, //READ_CONTACTS
+0 −16
Original line number Diff line number Diff line
@@ -43,12 +43,6 @@ oneway interface IPinnedTaskListener {
     */
    void onImeVisibilityChanged(boolean imeVisible, int imeHeight);

    /**
     * Called when the set of actions for the current PiP activity changes, or when the listener
     * is first registered to allow the listener to synchronize its state with the controller.
     */
    void onActionsChanged(in ParceledListSlice<RemoteAction> actions, in RemoteAction closeAction);

    /**
     * Called by the window manager to notify the listener that Activity (was or is in pinned mode)
     * is hidden (either stopped or removed). This is generally used as a signal to reset saved
@@ -56,14 +50,4 @@ oneway interface IPinnedTaskListener {
     * {@param componentName} represents the application component of PiP window.
     */
    void onActivityHidden(in ComponentName componentName);

    /**
     * Called by the window manager when the aspect ratio is reset.
     */
    void onAspectRatioChanged(float aspectRatio);

    /**
      * Called by the window manager when the expanded aspect ratio is reset.
    */
    void onExpandedAspectRatioChanged(float aspectRatio);
}
+0 −2
Original line number Diff line number Diff line
@@ -13460,8 +13460,6 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
        mDefaultFocusHighlightEnabled = defaultFocusHighlightEnabled;
    }
    /**
    /**
     * Returns whether this View should use a default focus highlight when it gets focused but
     * doesn't have {@link android.R.attr#state_focused} defined in its background.
+43 −5
Original line number Diff line number Diff line
@@ -321,6 +321,11 @@ public final class ViewRootImpl implements ViewParent,

    private static final int UNSET_SYNC_ID = -1;

    /**
     * Minimum time to wait before reporting changes to keep clear areas.
     */
    private static final int KEEP_CLEAR_AREA_REPORT_RATE_MILLIS = 100;

    @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
    static final ThreadLocal<HandlerActionQueue> sRunQueues = new ThreadLocal<HandlerActionQueue>();

@@ -796,6 +801,8 @@ public final class ViewRootImpl implements ViewParent,
            new ViewRootRectTracker(v -> v.collectPreferKeepClearRects());
    private final ViewRootRectTracker mUnrestrictedKeepClearRectsTracker =
            new ViewRootRectTracker(v -> v.collectUnrestrictedPreferKeepClearRects());
    private List<Rect> mPendingKeepClearAreas;
    private List<Rect> mPendingUnrestrictedKeepClearAreas;

    private IAccessibilityEmbeddedConnection mAccessibilityEmbeddedConnection;

@@ -4824,6 +4831,14 @@ public final class ViewRootImpl implements ViewParent,
                unrestrictedKeepClearRects = Collections.emptyList();
            }

            if (mHandler.hasMessages(MSG_REPORT_KEEP_CLEAR_RECTS)) {
                // Keep clear areas have been reported recently, wait before reporting new set
                // of keep clear areas
                mPendingKeepClearAreas = restrictedKeepClearRects;
                mPendingUnrestrictedKeepClearAreas = unrestrictedKeepClearRects;
            } else {
                mHandler.sendEmptyMessageDelayed(MSG_REPORT_KEEP_CLEAR_RECTS,
                        KEEP_CLEAR_AREA_REPORT_RATE_MILLIS);
                try {
                    mWindowSession.reportKeepClearAreasChanged(mWindow, restrictedKeepClearRects,
                            unrestrictedKeepClearRects);
@@ -4832,6 +4847,25 @@ public final class ViewRootImpl implements ViewParent,
                }
            }
        }
    }

    void reportKeepClearAreasChanged() {
        final List<Rect> restrictedKeepClearRects = mPendingKeepClearAreas;
        final List<Rect> unrestrictedKeepClearRects = mPendingUnrestrictedKeepClearAreas;
        if (restrictedKeepClearRects == null && unrestrictedKeepClearRects == null) {
            return;
        }

        mPendingKeepClearAreas = null;
        mPendingUnrestrictedKeepClearAreas = null;

        try {
            mWindowSession.reportKeepClearAreasChanged(mWindow, restrictedKeepClearRects,
                    unrestrictedKeepClearRects);
        } catch (RemoteException e) {
            throw e.rethrowFromSystemServer();
        }
    }

    /**
     * Requests that the root render node is invalidated next time we perform a draw, such that
@@ -5322,6 +5356,7 @@ public final class ViewRootImpl implements ViewParent,
    private static final int MSG_REQUEST_SCROLL_CAPTURE = 33;
    private static final int MSG_WINDOW_TOUCH_MODE_CHANGED = 34;
    private static final int MSG_KEEP_CLEAR_RECTS_CHANGED = 35;
    private static final int MSG_REPORT_KEEP_CLEAR_RECTS = 36;


    final class ViewRootHandler extends Handler {
@@ -5598,6 +5633,9 @@ public final class ViewRootImpl implements ViewParent,
                case MSG_KEEP_CLEAR_RECTS_CHANGED: {
                    keepClearRectsChanged();
                }   break;
                case MSG_REPORT_KEEP_CLEAR_RECTS: {
                    reportKeepClearAreasChanged();
                }   break;
                case MSG_REQUEST_SCROLL_CAPTURE:
                    handleScrollCaptureRequest((IScrollCaptureResponseListener) msg.obj);
                    break;
+25 −0
Original line number Diff line number Diff line
@@ -180,6 +180,7 @@ static struct {
    jmethodID postDynPolicyEventFromNative;
    jmethodID postRecordConfigEventFromNative;
    jmethodID postRoutingUpdatedFromNative;
    jmethodID postVolRangeInitReqFromNative;
} gAudioPolicyEventHandlerMethods;

jclass gListClass;
@@ -585,6 +586,20 @@ android_media_AudioSystem_routing_callback()
    env->DeleteLocalRef(clazz);
}

static void android_media_AudioSystem_vol_range_init_req_callback()
{
    JNIEnv *env = AndroidRuntime::getJNIEnv();
    if (env == NULL) {
        return;
    }

    // callback into java
    jclass clazz = env->FindClass(kClassPathName);
    env->CallStaticVoidMethod(clazz,
                              gAudioPolicyEventHandlerMethods.postVolRangeInitReqFromNative);
    env->DeleteLocalRef(clazz);
}

static jint android_media_AudioSystem_setDeviceConnectionState(JNIEnv *env, jobject thiz,
                                                               jint state, jobject jParcel,
                                                               jint codec) {
@@ -2063,6 +2078,11 @@ android_media_AudioSystem_registerRoutingCallback(JNIEnv *env, jobject thiz)
    AudioSystem::setRoutingCallback(android_media_AudioSystem_routing_callback);
}

static void android_media_AudioSystem_registerVolRangeInitReqCallback(JNIEnv *env, jobject thiz)
{
    AudioSystem::setVolInitReqCallback(android_media_AudioSystem_vol_range_init_req_callback);
}

void javaAudioFormatToNativeAudioConfig(JNIEnv *env, audio_config_t *nConfig,
                                       const jobject jFormat, bool isInput) {
    *nConfig = AUDIO_CONFIG_INITIALIZER;
@@ -2990,6 +3010,8 @@ static const JNINativeMethod gMethods[] =
          (void *)android_media_AudioSystem_registerRecordingCallback},
         {"native_register_routing_callback", "()V",
          (void *)android_media_AudioSystem_registerRoutingCallback},
         {"native_register_vol_range_init_req_callback", "()V",
          (void *)android_media_AudioSystem_registerVolRangeInitReqCallback},
         {"systemReady", "()I", (void *)android_media_AudioSystem_systemReady},
         {"getStreamVolumeDB", "(III)F", (void *)android_media_AudioSystem_getStreamVolumeDB},
         {"native_get_offload_support", "(IIIII)I",
@@ -3202,6 +3224,9 @@ int register_android_media_AudioSystem(JNIEnv *env)
    gAudioPolicyEventHandlerMethods.postRoutingUpdatedFromNative =
            GetStaticMethodIDOrDie(env, env->FindClass(kClassPathName),
                    "routingCallbackFromNative", "()V");
    gAudioPolicyEventHandlerMethods.postVolRangeInitReqFromNative =
            GetStaticMethodIDOrDie(env, env->FindClass(kClassPathName),
                    "volRangeInitReqCallbackFromNative", "()V");

    jclass audioMixClass = FindClassOrDie(env, "android/media/audiopolicy/AudioMix");
    gAudioMixClass = MakeGlobalRefOrDie(env, audioMixClass);
Loading