Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(593)

Unified Diff: media/capture/content/android/java/src/org/chromium/media/ScreenCapture.java

Issue 2673373003: getUserMeida: report device starting states (Closed)
Patch Set: rebase to Feb 10 Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: media/capture/content/android/java/src/org/chromium/media/ScreenCapture.java
diff --git a/media/capture/content/android/java/src/org/chromium/media/ScreenCapture.java b/media/capture/content/android/java/src/org/chromium/media/ScreenCapture.java
index 2180f2e4538c98ba865a39d190a7ea97c116a43e..4956571caab08f3d39c7e6b8c3f56f96791b3749 100644
--- a/media/capture/content/android/java/src/org/chromium/media/ScreenCapture.java
+++ b/media/capture/content/android/java/src/org/chromium/media/ScreenCapture.java
@@ -279,18 +279,18 @@ public class ScreenCapture extends Fragment {
}
@CalledByNative
- public void startCapture() {
+ public boolean startCapture() {
Log.d(TAG, "startCapture");
synchronized (mCaptureStateLock) {
if (mCaptureState != CaptureState.ALLOWED) {
Log.e(TAG, "startCapture() invoked without user permission.");
- return;
+ return false;
}
}
mMediaProjection = mMediaProjectionManager.getMediaProjection(mResultCode, mResultData);
if (mMediaProjection == null) {
Log.e(TAG, "mMediaProjection is null");
- return;
+ return false;
}
mMediaProjection.registerCallback(new MediaProjectionCallback(), null);
@@ -309,6 +309,7 @@ public class ScreenCapture extends Fragment {
createVirtualDisplay();
changeCaptureStateAndNotify(CaptureState.STARTED);
+ return true;
}
@CalledByNative
« no previous file with comments | « content/renderer/media/video_capture_impl.h ('k') | media/capture/content/android/screen_capture_machine_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698