Loading core/jni/android_view_SurfaceControl.cpp +2 −1 Original line number Original line Diff line number Diff line Loading @@ -438,8 +438,9 @@ static jobject nativeGetDisplayedContentSamplingAttributes(JNIEnv* env, jclass c static jboolean nativeSetDisplayedContentSamplingEnabled(JNIEnv* env, jclass clazz, static jboolean nativeSetDisplayedContentSamplingEnabled(JNIEnv* env, jclass clazz, jobject tokenObj, jboolean enable, jint componentMask, jint maxFrames) { jobject tokenObj, jboolean enable, jint componentMask, jint maxFrames) { sp<IBinder> token(ibinderForJavaObject(env, tokenObj)); sp<IBinder> token(ibinderForJavaObject(env, tokenObj)); return SurfaceComposerClient::setDisplayContentSamplingEnabled( status_t rc = SurfaceComposerClient::setDisplayContentSamplingEnabled( token, enable, componentMask, maxFrames); token, enable, componentMask, maxFrames); return rc == OK; } } static jobject nativeGetDisplayedContentSample(JNIEnv* env, jclass clazz, jobject tokenObj, static jobject nativeGetDisplayedContentSample(JNIEnv* env, jclass clazz, jobject tokenObj, Loading services/tests/servicestests/src/com/android/server/display/DisplayManagerServiceTest.java +1 −1 Original line number Original line Diff line number Diff line Loading @@ -389,7 +389,7 @@ public class DisplayManagerServiceTest { if (attr == null) return; //sampling not supported on device, skip remainder of test. if (attr == null) return; //sampling not supported on device, skip remainder of test. boolean enabled = displayManager.setDisplayedContentSamplingEnabledInternal(0, true, 0, 0); boolean enabled = displayManager.setDisplayedContentSamplingEnabledInternal(0, true, 0, 0); assertTrue(!enabled); assertTrue(enabled); displayManager.setDisplayedContentSamplingEnabledInternal(0, false, 0, 0); displayManager.setDisplayedContentSamplingEnabledInternal(0, false, 0, 0); DisplayedContentSample sample = displayManager.getDisplayedContentSampleInternal(0, 0, 0); DisplayedContentSample sample = displayManager.getDisplayedContentSampleInternal(0, 0, 0); Loading Loading
core/jni/android_view_SurfaceControl.cpp +2 −1 Original line number Original line Diff line number Diff line Loading @@ -438,8 +438,9 @@ static jobject nativeGetDisplayedContentSamplingAttributes(JNIEnv* env, jclass c static jboolean nativeSetDisplayedContentSamplingEnabled(JNIEnv* env, jclass clazz, static jboolean nativeSetDisplayedContentSamplingEnabled(JNIEnv* env, jclass clazz, jobject tokenObj, jboolean enable, jint componentMask, jint maxFrames) { jobject tokenObj, jboolean enable, jint componentMask, jint maxFrames) { sp<IBinder> token(ibinderForJavaObject(env, tokenObj)); sp<IBinder> token(ibinderForJavaObject(env, tokenObj)); return SurfaceComposerClient::setDisplayContentSamplingEnabled( status_t rc = SurfaceComposerClient::setDisplayContentSamplingEnabled( token, enable, componentMask, maxFrames); token, enable, componentMask, maxFrames); return rc == OK; } } static jobject nativeGetDisplayedContentSample(JNIEnv* env, jclass clazz, jobject tokenObj, static jobject nativeGetDisplayedContentSample(JNIEnv* env, jclass clazz, jobject tokenObj, Loading
services/tests/servicestests/src/com/android/server/display/DisplayManagerServiceTest.java +1 −1 Original line number Original line Diff line number Diff line Loading @@ -389,7 +389,7 @@ public class DisplayManagerServiceTest { if (attr == null) return; //sampling not supported on device, skip remainder of test. if (attr == null) return; //sampling not supported on device, skip remainder of test. boolean enabled = displayManager.setDisplayedContentSamplingEnabledInternal(0, true, 0, 0); boolean enabled = displayManager.setDisplayedContentSamplingEnabledInternal(0, true, 0, 0); assertTrue(!enabled); assertTrue(enabled); displayManager.setDisplayedContentSamplingEnabledInternal(0, false, 0, 0); displayManager.setDisplayedContentSamplingEnabledInternal(0, false, 0, 0); DisplayedContentSample sample = displayManager.getDisplayedContentSampleInternal(0, 0, 0); DisplayedContentSample sample = displayManager.getDisplayedContentSampleInternal(0, 0, 0); Loading