Loading core/java/android/hardware/display/DisplayManager.java +11 −0 Original line number Diff line number Diff line Loading @@ -1205,6 +1205,17 @@ public final class DisplayManager { mGlobal.setRefreshRateSwitchingType(newValue); } /** * Returns whether the specified display supports DISPLAY_DECORATION. * * @param displayId The display to query support. * * @hide */ public boolean getDisplayDecorationSupport(int displayId) { return mGlobal.getDisplayDecorationSupport(displayId); } /** * Returns the user preference for "Match content frame rate". * <p> Loading core/java/android/hardware/display/DisplayManagerGlobal.java +15 −0 Original line number Diff line number Diff line Loading @@ -811,6 +811,21 @@ public final class DisplayManagerGlobal { } } /** * Report whether the display supports DISPLAY_DECORATION. * * @param displayId The display whose support is being queried. * * @hide */ public boolean getDisplayDecorationSupport(int displayId) { try { return mDm.getDisplayDecorationSupport(displayId); } catch (RemoteException ex) { throw ex.rethrowFromSystemServer(); } } /** * Gets the brightness of the display. * Loading core/java/android/hardware/display/IDisplayManager.aidl +3 −0 Original line number Diff line number Diff line Loading @@ -180,4 +180,7 @@ interface IDisplayManager { // Returns the refresh rate switching type. int getRefreshRateSwitchingType(); // Query for DISPLAY_DECORATION support. boolean getDisplayDecorationSupport(int displayId); } core/java/android/view/SurfaceControl.java +15 −0 Original line number Diff line number Diff line Loading @@ -231,6 +231,7 @@ public final class SurfaceControl implements Parcelable { float shadowRadius); private static native void nativeSetGlobalShadowSettings(@Size(4) float[] ambientColor, @Size(4) float[] spotColor, float lightPosY, float lightPosZ, float lightRadius); private static native boolean nativeGetDisplayDecorationSupport(IBinder displayToken); private static native void nativeSetFrameRate(long transactionObj, long nativeObject, float frameRate, int compatibility, int changeFrameRateStrategy); Loading Loading @@ -2650,6 +2651,20 @@ public final class SurfaceControl implements Parcelable { nativeSetGlobalShadowSettings(ambientColor, spotColor, lightPosY, lightPosZ, lightRadius); } /** * Returns whether a display supports DISPLAY_DECORATION. * * @param displayToken * The token for the display. * * @return Whether the display supports DISPLAY_DECORATION. * * @hide */ public static boolean getDisplayDecorationSupport(IBinder displayToken) { return nativeGetDisplayDecorationSupport(displayToken); } /** * Adds a callback to be informed about SF's jank classification for a specific surface. * @hide Loading core/jni/android_view_SurfaceControl.cpp +11 −0 Original line number Diff line number Diff line Loading @@ -1768,6 +1768,15 @@ static void nativeSetGlobalShadowSettings(JNIEnv* env, jclass clazz, jfloatArray client->setGlobalShadowSettings(ambientColor, spotColor, lightPosY, lightPosZ, lightRadius); } static jboolean nativeGetDisplayDecorationSupport(JNIEnv* env, jclass clazz, jobject displayTokenObject) { sp<IBinder> displayToken(ibinderForJavaObject(env, displayTokenObject)); if (displayToken == nullptr) { return JNI_FALSE; } return static_cast<jboolean>(SurfaceComposerClient::getDisplayDecorationSupport(displayToken)); } static jlong nativeGetHandle(JNIEnv* env, jclass clazz, jlong nativeObject) { SurfaceControl *surfaceControl = reinterpret_cast<SurfaceControl*>(nativeObject); return reinterpret_cast<jlong>(surfaceControl->getHandle().get()); Loading Loading @@ -2092,6 +2101,8 @@ static const JNINativeMethod sSurfaceControlMethods[] = { (void*)nativeMirrorSurface }, {"nativeSetGlobalShadowSettings", "([F[FFFF)V", (void*)nativeSetGlobalShadowSettings }, {"nativeGetDisplayDecorationSupport", "(Landroid/os/IBinder;)Z", (void*)nativeGetDisplayDecorationSupport}, {"nativeGetHandle", "(J)J", (void*)nativeGetHandle }, {"nativeSetFixedTransformHint", "(JJI)V", Loading Loading
core/java/android/hardware/display/DisplayManager.java +11 −0 Original line number Diff line number Diff line Loading @@ -1205,6 +1205,17 @@ public final class DisplayManager { mGlobal.setRefreshRateSwitchingType(newValue); } /** * Returns whether the specified display supports DISPLAY_DECORATION. * * @param displayId The display to query support. * * @hide */ public boolean getDisplayDecorationSupport(int displayId) { return mGlobal.getDisplayDecorationSupport(displayId); } /** * Returns the user preference for "Match content frame rate". * <p> Loading
core/java/android/hardware/display/DisplayManagerGlobal.java +15 −0 Original line number Diff line number Diff line Loading @@ -811,6 +811,21 @@ public final class DisplayManagerGlobal { } } /** * Report whether the display supports DISPLAY_DECORATION. * * @param displayId The display whose support is being queried. * * @hide */ public boolean getDisplayDecorationSupport(int displayId) { try { return mDm.getDisplayDecorationSupport(displayId); } catch (RemoteException ex) { throw ex.rethrowFromSystemServer(); } } /** * Gets the brightness of the display. * Loading
core/java/android/hardware/display/IDisplayManager.aidl +3 −0 Original line number Diff line number Diff line Loading @@ -180,4 +180,7 @@ interface IDisplayManager { // Returns the refresh rate switching type. int getRefreshRateSwitchingType(); // Query for DISPLAY_DECORATION support. boolean getDisplayDecorationSupport(int displayId); }
core/java/android/view/SurfaceControl.java +15 −0 Original line number Diff line number Diff line Loading @@ -231,6 +231,7 @@ public final class SurfaceControl implements Parcelable { float shadowRadius); private static native void nativeSetGlobalShadowSettings(@Size(4) float[] ambientColor, @Size(4) float[] spotColor, float lightPosY, float lightPosZ, float lightRadius); private static native boolean nativeGetDisplayDecorationSupport(IBinder displayToken); private static native void nativeSetFrameRate(long transactionObj, long nativeObject, float frameRate, int compatibility, int changeFrameRateStrategy); Loading Loading @@ -2650,6 +2651,20 @@ public final class SurfaceControl implements Parcelable { nativeSetGlobalShadowSettings(ambientColor, spotColor, lightPosY, lightPosZ, lightRadius); } /** * Returns whether a display supports DISPLAY_DECORATION. * * @param displayToken * The token for the display. * * @return Whether the display supports DISPLAY_DECORATION. * * @hide */ public static boolean getDisplayDecorationSupport(IBinder displayToken) { return nativeGetDisplayDecorationSupport(displayToken); } /** * Adds a callback to be informed about SF's jank classification for a specific surface. * @hide Loading
core/jni/android_view_SurfaceControl.cpp +11 −0 Original line number Diff line number Diff line Loading @@ -1768,6 +1768,15 @@ static void nativeSetGlobalShadowSettings(JNIEnv* env, jclass clazz, jfloatArray client->setGlobalShadowSettings(ambientColor, spotColor, lightPosY, lightPosZ, lightRadius); } static jboolean nativeGetDisplayDecorationSupport(JNIEnv* env, jclass clazz, jobject displayTokenObject) { sp<IBinder> displayToken(ibinderForJavaObject(env, displayTokenObject)); if (displayToken == nullptr) { return JNI_FALSE; } return static_cast<jboolean>(SurfaceComposerClient::getDisplayDecorationSupport(displayToken)); } static jlong nativeGetHandle(JNIEnv* env, jclass clazz, jlong nativeObject) { SurfaceControl *surfaceControl = reinterpret_cast<SurfaceControl*>(nativeObject); return reinterpret_cast<jlong>(surfaceControl->getHandle().get()); Loading Loading @@ -2092,6 +2101,8 @@ static const JNINativeMethod sSurfaceControlMethods[] = { (void*)nativeMirrorSurface }, {"nativeSetGlobalShadowSettings", "([F[FFFF)V", (void*)nativeSetGlobalShadowSettings }, {"nativeGetDisplayDecorationSupport", "(Landroid/os/IBinder;)Z", (void*)nativeGetDisplayDecorationSupport}, {"nativeGetHandle", "(J)J", (void*)nativeGetHandle }, {"nativeSetFixedTransformHint", "(JJI)V", Loading