Loading core/api/test-current.txt +0 −1 Original line number Diff line number Diff line Loading @@ -2892,7 +2892,6 @@ package android.view { public final class SurfaceControl implements android.os.Parcelable { ctor public SurfaceControl(@NonNull android.view.SurfaceControl, @NonNull String); method @NonNull public static android.os.IBinder getInternalDisplayToken(); method public boolean isSameSurface(@NonNull android.view.SurfaceControl); } Loading core/java/android/view/DisplayAddress.java +2 −2 Original line number Diff line number Diff line Loading @@ -33,7 +33,7 @@ public abstract class DisplayAddress implements Parcelable { * * @param physicalDisplayId A physical display ID. * @return The {@link Physical} address. * @see SurfaceControl#getPhysicalDisplayIds * @see com.android.server.display.DisplayControl#getPhysicalDisplayIds */ @NonNull public static Physical fromPhysicalDisplayId(long physicalDisplayId) { Loading Loading @@ -83,7 +83,7 @@ public abstract class DisplayAddress implements Parcelable { * Stable display ID combining port and model. * * @return An ID in the range [0, 2^64) interpreted as signed. * @see SurfaceControl#getPhysicalDisplayIds * @see com.android.server.display.DisplayControl#getPhysicalDisplayIds */ public long getPhysicalDisplayId() { return mPhysicalDisplayId; Loading core/java/android/view/SurfaceControl.java +0 −31 Original line number Diff line number Diff line Loading @@ -173,8 +173,6 @@ public final class SurfaceControl implements Parcelable { private static native boolean nativeClearAnimationFrameStats(); private static native boolean nativeGetAnimationFrameStats(WindowAnimationFrameStats outStats); private static native long[] nativeGetPhysicalDisplayIds(); private static native IBinder nativeGetPhysicalDisplayToken(long physicalDisplayId); private static native void nativeSetDisplaySurface(long transactionObj, IBinder displayToken, long nativeSurfaceObject); private static native void nativeSetDisplayLayerStack(long transactionObj, Loading Loading @@ -2034,35 +2032,6 @@ public final class SurfaceControl implements Parcelable { IVirtualDisplayCallback.Stub.asInterface(displayToken)); } /** * @hide */ public static long[] getPhysicalDisplayIds() { return nativeGetPhysicalDisplayIds(); } /** * @hide */ public static IBinder getPhysicalDisplayToken(long physicalDisplayId) { return nativeGetPhysicalDisplayToken(physicalDisplayId); } /** * TODO(b/116025192): Remove this stopgap once framework is display-agnostic. * * @hide */ @TestApi @NonNull public static IBinder getInternalDisplayToken() { final long[] physicalDisplayIds = getPhysicalDisplayIds(); if (physicalDisplayIds.length == 0) { return null; } return getPhysicalDisplayToken(physicalDisplayIds[0]); } /** * Returns whether protected content is supported in GPU composition. * @hide Loading core/jni/android_view_SurfaceControl.cpp +0 −32 Original line number Diff line number Diff line Loading @@ -886,34 +886,6 @@ static void nativeSetDestinationFrame(JNIEnv* env, jclass clazz, jlong transacti transaction->setDestinationFrame(ctrl, crop); } static jlongArray nativeGetPhysicalDisplayIds(JNIEnv* env, jclass clazz) { const auto displayIds = SurfaceComposerClient::getPhysicalDisplayIds(); jlongArray array = env->NewLongArray(displayIds.size()); if (array == nullptr) { jniThrowException(env, "java/lang/OutOfMemoryError", nullptr); return nullptr; } if (displayIds.empty()) { return array; } jlong* values = env->GetLongArrayElements(array, 0); for (size_t i = 0; i < displayIds.size(); ++i) { values[i] = static_cast<jlong>(displayIds[i].value); } env->ReleaseLongArrayElements(array, values, 0); return array; } static jobject nativeGetPhysicalDisplayToken(JNIEnv* env, jclass clazz, jlong physicalDisplayId) { const auto id = DisplayId::fromValue<PhysicalDisplayId>(physicalDisplayId); if (!id) return nullptr; sp<IBinder> token = SurfaceComposerClient::getPhysicalDisplayToken(*id); return javaObjectForIBinder(env, token); } static jobject nativeGetDisplayedContentSamplingAttributes(JNIEnv* env, jclass clazz, jobject tokenObj) { sp<IBinder> token(ibinderForJavaObject(env, tokenObj)); Loading Loading @@ -1992,10 +1964,6 @@ static const JNINativeMethod sSurfaceControlMethods[] = { (void*)nativeSetFrameRate }, {"nativeSetDefaultFrameRateCompatibility", "(JJI)V", (void*)nativeSetDefaultFrameRateCompatibility}, {"nativeGetPhysicalDisplayIds", "()[J", (void*)nativeGetPhysicalDisplayIds }, {"nativeGetPhysicalDisplayToken", "(J)Landroid/os/IBinder;", (void*)nativeGetPhysicalDisplayToken }, {"nativeSetDisplaySurface", "(JLandroid/os/IBinder;J)V", (void*)nativeSetDisplaySurface }, {"nativeSetDisplayLayerStack", "(JLandroid/os/IBinder;I)V", Loading services/core/java/com/android/server/display/DisplayControl.java +16 −0 Original line number Diff line number Diff line Loading @@ -30,6 +30,8 @@ public class DisplayControl { private static native IBinder nativeCreateDisplay(String name, boolean secure); private static native void nativeDestroyDisplay(IBinder displayToken); private static native void nativeOverrideHdrTypes(IBinder displayToken, int[] modes); private static native long[] nativeGetPhysicalDisplayIds(); private static native IBinder nativeGetPhysicalDisplayToken(long physicalDisplayId); /** * Create a display in SurfaceFlinger. Loading Loading @@ -63,4 +65,18 @@ public class DisplayControl { public static void overrideHdrTypes(@NonNull IBinder displayToken, @NonNull int[] modes) { nativeOverrideHdrTypes(displayToken, modes); } /** * Gets all the physical display ids. */ public static long[] getPhysicalDisplayIds() { return nativeGetPhysicalDisplayIds(); } /** * Gets the display's token from the physical display id */ public static IBinder getPhysicalDisplayToken(long physicalDisplayId) { return nativeGetPhysicalDisplayToken(physicalDisplayId); } } Loading
core/api/test-current.txt +0 −1 Original line number Diff line number Diff line Loading @@ -2892,7 +2892,6 @@ package android.view { public final class SurfaceControl implements android.os.Parcelable { ctor public SurfaceControl(@NonNull android.view.SurfaceControl, @NonNull String); method @NonNull public static android.os.IBinder getInternalDisplayToken(); method public boolean isSameSurface(@NonNull android.view.SurfaceControl); } Loading
core/java/android/view/DisplayAddress.java +2 −2 Original line number Diff line number Diff line Loading @@ -33,7 +33,7 @@ public abstract class DisplayAddress implements Parcelable { * * @param physicalDisplayId A physical display ID. * @return The {@link Physical} address. * @see SurfaceControl#getPhysicalDisplayIds * @see com.android.server.display.DisplayControl#getPhysicalDisplayIds */ @NonNull public static Physical fromPhysicalDisplayId(long physicalDisplayId) { Loading Loading @@ -83,7 +83,7 @@ public abstract class DisplayAddress implements Parcelable { * Stable display ID combining port and model. * * @return An ID in the range [0, 2^64) interpreted as signed. * @see SurfaceControl#getPhysicalDisplayIds * @see com.android.server.display.DisplayControl#getPhysicalDisplayIds */ public long getPhysicalDisplayId() { return mPhysicalDisplayId; Loading
core/java/android/view/SurfaceControl.java +0 −31 Original line number Diff line number Diff line Loading @@ -173,8 +173,6 @@ public final class SurfaceControl implements Parcelable { private static native boolean nativeClearAnimationFrameStats(); private static native boolean nativeGetAnimationFrameStats(WindowAnimationFrameStats outStats); private static native long[] nativeGetPhysicalDisplayIds(); private static native IBinder nativeGetPhysicalDisplayToken(long physicalDisplayId); private static native void nativeSetDisplaySurface(long transactionObj, IBinder displayToken, long nativeSurfaceObject); private static native void nativeSetDisplayLayerStack(long transactionObj, Loading Loading @@ -2034,35 +2032,6 @@ public final class SurfaceControl implements Parcelable { IVirtualDisplayCallback.Stub.asInterface(displayToken)); } /** * @hide */ public static long[] getPhysicalDisplayIds() { return nativeGetPhysicalDisplayIds(); } /** * @hide */ public static IBinder getPhysicalDisplayToken(long physicalDisplayId) { return nativeGetPhysicalDisplayToken(physicalDisplayId); } /** * TODO(b/116025192): Remove this stopgap once framework is display-agnostic. * * @hide */ @TestApi @NonNull public static IBinder getInternalDisplayToken() { final long[] physicalDisplayIds = getPhysicalDisplayIds(); if (physicalDisplayIds.length == 0) { return null; } return getPhysicalDisplayToken(physicalDisplayIds[0]); } /** * Returns whether protected content is supported in GPU composition. * @hide Loading
core/jni/android_view_SurfaceControl.cpp +0 −32 Original line number Diff line number Diff line Loading @@ -886,34 +886,6 @@ static void nativeSetDestinationFrame(JNIEnv* env, jclass clazz, jlong transacti transaction->setDestinationFrame(ctrl, crop); } static jlongArray nativeGetPhysicalDisplayIds(JNIEnv* env, jclass clazz) { const auto displayIds = SurfaceComposerClient::getPhysicalDisplayIds(); jlongArray array = env->NewLongArray(displayIds.size()); if (array == nullptr) { jniThrowException(env, "java/lang/OutOfMemoryError", nullptr); return nullptr; } if (displayIds.empty()) { return array; } jlong* values = env->GetLongArrayElements(array, 0); for (size_t i = 0; i < displayIds.size(); ++i) { values[i] = static_cast<jlong>(displayIds[i].value); } env->ReleaseLongArrayElements(array, values, 0); return array; } static jobject nativeGetPhysicalDisplayToken(JNIEnv* env, jclass clazz, jlong physicalDisplayId) { const auto id = DisplayId::fromValue<PhysicalDisplayId>(physicalDisplayId); if (!id) return nullptr; sp<IBinder> token = SurfaceComposerClient::getPhysicalDisplayToken(*id); return javaObjectForIBinder(env, token); } static jobject nativeGetDisplayedContentSamplingAttributes(JNIEnv* env, jclass clazz, jobject tokenObj) { sp<IBinder> token(ibinderForJavaObject(env, tokenObj)); Loading Loading @@ -1992,10 +1964,6 @@ static const JNINativeMethod sSurfaceControlMethods[] = { (void*)nativeSetFrameRate }, {"nativeSetDefaultFrameRateCompatibility", "(JJI)V", (void*)nativeSetDefaultFrameRateCompatibility}, {"nativeGetPhysicalDisplayIds", "()[J", (void*)nativeGetPhysicalDisplayIds }, {"nativeGetPhysicalDisplayToken", "(J)Landroid/os/IBinder;", (void*)nativeGetPhysicalDisplayToken }, {"nativeSetDisplaySurface", "(JLandroid/os/IBinder;J)V", (void*)nativeSetDisplaySurface }, {"nativeSetDisplayLayerStack", "(JLandroid/os/IBinder;I)V", Loading
services/core/java/com/android/server/display/DisplayControl.java +16 −0 Original line number Diff line number Diff line Loading @@ -30,6 +30,8 @@ public class DisplayControl { private static native IBinder nativeCreateDisplay(String name, boolean secure); private static native void nativeDestroyDisplay(IBinder displayToken); private static native void nativeOverrideHdrTypes(IBinder displayToken, int[] modes); private static native long[] nativeGetPhysicalDisplayIds(); private static native IBinder nativeGetPhysicalDisplayToken(long physicalDisplayId); /** * Create a display in SurfaceFlinger. Loading Loading @@ -63,4 +65,18 @@ public class DisplayControl { public static void overrideHdrTypes(@NonNull IBinder displayToken, @NonNull int[] modes) { nativeOverrideHdrTypes(displayToken, modes); } /** * Gets all the physical display ids. */ public static long[] getPhysicalDisplayIds() { return nativeGetPhysicalDisplayIds(); } /** * Gets the display's token from the physical display id */ public static IBinder getPhysicalDisplayToken(long physicalDisplayId) { return nativeGetPhysicalDisplayToken(physicalDisplayId); } }