Loading media/java/android/media/projection/MediaProjectionManager.java +2 −0 Original line number Diff line number Diff line Loading @@ -90,6 +90,8 @@ public final class MediaProjectionManager { * int, android.content.Intent)} * @param resultData The resulting data from {@link android.app.Activity#onActivityResult(int, * int, android.content.Intent)} * @throws IllegalStateException on pre-Q devices if a previously gotten MediaProjection * from the same {@code resultData} has not yet been stopped */ public MediaProjection getMediaProjection(int resultCode, @NonNull Intent resultData) { if (resultCode != Activity.RESULT_OK || resultData == null) { Loading services/core/java/com/android/server/media/projection/MediaProjectionManagerService.java +3 −2 Original line number Diff line number Diff line Loading @@ -396,8 +396,9 @@ public final class MediaProjectionManagerService extends SystemService } synchronized (mLock) { if (isValidMediaProjection(asBinder())) { throw new IllegalStateException( "Cannot start already started MediaProjection"); Slog.w(TAG, "UID " + Binder.getCallingUid() + " attempted to start already started MediaProjection"); return; } mCallback = callback; registerCallback(mCallback); Loading Loading
media/java/android/media/projection/MediaProjectionManager.java +2 −0 Original line number Diff line number Diff line Loading @@ -90,6 +90,8 @@ public final class MediaProjectionManager { * int, android.content.Intent)} * @param resultData The resulting data from {@link android.app.Activity#onActivityResult(int, * int, android.content.Intent)} * @throws IllegalStateException on pre-Q devices if a previously gotten MediaProjection * from the same {@code resultData} has not yet been stopped */ public MediaProjection getMediaProjection(int resultCode, @NonNull Intent resultData) { if (resultCode != Activity.RESULT_OK || resultData == null) { Loading
services/core/java/com/android/server/media/projection/MediaProjectionManagerService.java +3 −2 Original line number Diff line number Diff line Loading @@ -396,8 +396,9 @@ public final class MediaProjectionManagerService extends SystemService } synchronized (mLock) { if (isValidMediaProjection(asBinder())) { throw new IllegalStateException( "Cannot start already started MediaProjection"); Slog.w(TAG, "UID " + Binder.getCallingUid() + " attempted to start already started MediaProjection"); return; } mCallback = callback; registerCallback(mCallback); Loading