Loading core/java/android/app/AppOpsManager.java +2 −2 Original line number Diff line number Diff line Loading @@ -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 Loading core/java/android/view/IPinnedTaskListener.aidl +0 −16 Original line number Diff line number Diff line Loading @@ -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 Loading @@ -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); } core/java/android/view/View.java +0 −2 Original line number Diff line number Diff line Loading @@ -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. core/java/android/view/ViewRootImpl.java +43 −5 Original line number Diff line number Diff line Loading @@ -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>(); Loading Loading @@ -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; Loading Loading @@ -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); Loading @@ -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 Loading Loading @@ -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 { Loading Loading @@ -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; Loading core/jni/android_media_AudioSystem.cpp +25 −0 Original line number Diff line number Diff line Loading @@ -180,6 +180,7 @@ static struct { jmethodID postDynPolicyEventFromNative; jmethodID postRecordConfigEventFromNative; jmethodID postRoutingUpdatedFromNative; jmethodID postVolRangeInitReqFromNative; } gAudioPolicyEventHandlerMethods; jclass gListClass; Loading Loading @@ -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) { Loading Loading @@ -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; Loading Loading @@ -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", Loading Loading @@ -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 Loading
core/java/android/app/AppOpsManager.java +2 −2 Original line number Diff line number Diff line Loading @@ -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 Loading
core/java/android/view/IPinnedTaskListener.aidl +0 −16 Original line number Diff line number Diff line Loading @@ -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 Loading @@ -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); }
core/java/android/view/View.java +0 −2 Original line number Diff line number Diff line Loading @@ -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.
core/java/android/view/ViewRootImpl.java +43 −5 Original line number Diff line number Diff line Loading @@ -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>(); Loading Loading @@ -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; Loading Loading @@ -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); Loading @@ -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 Loading Loading @@ -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 { Loading Loading @@ -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; Loading
core/jni/android_media_AudioSystem.cpp +25 −0 Original line number Diff line number Diff line Loading @@ -180,6 +180,7 @@ static struct { jmethodID postDynPolicyEventFromNative; jmethodID postRecordConfigEventFromNative; jmethodID postRoutingUpdatedFromNative; jmethodID postVolRangeInitReqFromNative; } gAudioPolicyEventHandlerMethods; jclass gListClass; Loading Loading @@ -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) { Loading Loading @@ -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; Loading Loading @@ -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", Loading Loading @@ -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