Merge "Mark MediaProjection#getMediaProjection as Nullable" into main
diff --git a/core/api/current.txt b/core/api/current.txt
index 9ad8dd3..0f23721 100644
--- a/core/api/current.txt
+++ b/core/api/current.txt
@@ -26593,7 +26593,7 @@
public final class MediaProjectionManager {
method @NonNull public android.content.Intent createScreenCaptureIntent();
method @NonNull public android.content.Intent createScreenCaptureIntent(@NonNull android.media.projection.MediaProjectionConfig);
- method public android.media.projection.MediaProjection getMediaProjection(int, @NonNull android.content.Intent);
+ method @Nullable public android.media.projection.MediaProjection getMediaProjection(int, @NonNull android.content.Intent);
}
}
diff --git a/media/java/android/media/projection/MediaProjectionManager.java b/media/java/android/media/projection/MediaProjectionManager.java
index 4013d84..7a7137a 100644
--- a/media/java/android/media/projection/MediaProjectionManager.java
+++ b/media/java/android/media/projection/MediaProjectionManager.java
@@ -263,6 +263,7 @@
* @see <a href="/guide/topics/large-screens/media-projection">
* Media projection developer guide</a>
*/
+ @Nullable
public MediaProjection getMediaProjection(int resultCode, @NonNull Intent resultData) {
if (resultCode != Activity.RESULT_OK || resultData == null) {
return null;