Remove frame rate flexibility token
Remove the frame rate flexiblity token which can be replaced with
DisplayManager.setRefreshRateSwitchingType(
DisplayManager.SWITCHING_TYPE_ACROSS_AND_WITHIN_GROUPS);
DisplayManager.setShouldAlwaysRespectAppRequestedMode(true);
Bug: 175371491
Test: m
Change-Id: Ifde95dcdb936e39f894a0ca225ec49f39ca04e62
This commit is contained in:
@@ -2811,11 +2811,9 @@ package android.view {
|
||||
|
||||
public final class SurfaceControl implements android.os.Parcelable {
|
||||
ctor public SurfaceControl(@NonNull android.view.SurfaceControl, @NonNull String);
|
||||
method public static long acquireFrameRateFlexibilityToken();
|
||||
method @NonNull public static android.os.IBinder getInternalDisplayToken();
|
||||
method public boolean isSameSurface(@NonNull android.view.SurfaceControl);
|
||||
method public static void overrideHdrTypes(@NonNull android.os.IBinder, @NonNull int[]);
|
||||
method public static void releaseFrameRateFlexibilityToken(long);
|
||||
}
|
||||
|
||||
public class SurfaceControlViewHost {
|
||||
|
||||
@@ -230,8 +230,6 @@ public final class SurfaceControl implements Parcelable {
|
||||
float frameRate, int compatibility, int changeFrameRateStrategy);
|
||||
private static native long nativeGetHandle(long nativeObject);
|
||||
|
||||
private static native long nativeAcquireFrameRateFlexibilityToken();
|
||||
private static native void nativeReleaseFrameRateFlexibilityToken(long token);
|
||||
private static native void nativeSetFixedTransformHint(long transactionObj, long nativeObject,
|
||||
int transformHint);
|
||||
private static native void nativeSetFocusedWindow(long transactionObj, IBinder toToken,
|
||||
@@ -3708,27 +3706,6 @@ public final class SurfaceControl implements Parcelable {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Acquire a frame rate flexibility token, which allows surface flinger to freely switch display
|
||||
* frame rates. This is used by CTS tests to put the device in a consistent state. See
|
||||
* ISurfaceComposer::acquireFrameRateFlexibilityToken(). The caller must have the
|
||||
* ACCESS_SURFACE_FLINGER permission, or else the call will fail, returning 0.
|
||||
* @hide
|
||||
*/
|
||||
@TestApi
|
||||
public static long acquireFrameRateFlexibilityToken() {
|
||||
return nativeAcquireFrameRateFlexibilityToken();
|
||||
}
|
||||
|
||||
/**
|
||||
* Release a frame rate flexibility token.
|
||||
* @hide
|
||||
*/
|
||||
@TestApi
|
||||
public static void releaseFrameRateFlexibilityToken(long token) {
|
||||
nativeReleaseFrameRateFlexibilityToken(token);
|
||||
}
|
||||
|
||||
/**
|
||||
* This is a refactoring utility function to enable lower levels of code to be refactored
|
||||
* from using the global transaction (and instead use a passed in Transaction) without
|
||||
|
||||
@@ -888,23 +888,6 @@ static void nativeSetFrameRate(JNIEnv* env, jclass clazz, jlong transactionObj,
|
||||
static_cast<int8_t>(changeFrameRateStrategy));
|
||||
}
|
||||
|
||||
static jlong nativeAcquireFrameRateFlexibilityToken(JNIEnv* env, jclass clazz) {
|
||||
sp<ISurfaceComposer> composer = ComposerService::getComposerService();
|
||||
sp<IBinder> token;
|
||||
status_t result = composer->acquireFrameRateFlexibilityToken(&token);
|
||||
if (result < 0) {
|
||||
ALOGE("Failed acquiring frame rate flexibility token: %s (%d)", strerror(-result), result);
|
||||
return 0;
|
||||
}
|
||||
token->incStrong((void*)nativeAcquireFrameRateFlexibilityToken);
|
||||
return reinterpret_cast<jlong>(token.get());
|
||||
}
|
||||
|
||||
static void nativeReleaseFrameRateFlexibilityToken(JNIEnv* env, jclass clazz, jlong tokenLong) {
|
||||
sp<IBinder> token(reinterpret_cast<IBinder*>(tokenLong));
|
||||
token->decStrong((void*)nativeAcquireFrameRateFlexibilityToken);
|
||||
}
|
||||
|
||||
static void nativeSetFixedTransformHint(JNIEnv* env, jclass clazz, jlong transactionObj,
|
||||
jlong nativeObject, jint transformHint) {
|
||||
auto transaction = reinterpret_cast<SurfaceComposerClient::Transaction*>(transactionObj);
|
||||
@@ -1956,10 +1939,6 @@ static const JNINativeMethod sSurfaceControlMethods[] = {
|
||||
(void*)nativeSetShadowRadius },
|
||||
{"nativeSetFrameRate", "(JJFII)V",
|
||||
(void*)nativeSetFrameRate },
|
||||
{"nativeAcquireFrameRateFlexibilityToken", "()J",
|
||||
(void*)nativeAcquireFrameRateFlexibilityToken },
|
||||
{"nativeReleaseFrameRateFlexibilityToken", "(J)V",
|
||||
(void*)nativeReleaseFrameRateFlexibilityToken },
|
||||
{"nativeGetPhysicalDisplayIds", "()[J",
|
||||
(void*)nativeGetPhysicalDisplayIds },
|
||||
{"nativeGetPrimaryPhysicalDisplayId", "()J",
|
||||
|
||||
Reference in New Issue
Block a user