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

Issue 2857743003: Android screencapture: fix possible hang in stopCapture() (Closed)

Created:
3 years, 7 months ago by braveyao
Modified:
3 years, 7 months ago
Reviewers:
miu
CC:
chromium-reviews, chfremer+watch_chromium.org, jam, feature-media-reviews_chromium.org, darin-cc_chromium.org, agrieve+watch_chromium.org, xjz+watch_chromium.org, miu+watch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Android screencapture: fix possible hang in stopCapture() When user denies screencapture by clicking 'Cancel' in OS permission dialog, Chrome will stop the capture after receiving the OnError() report. At this point, the |mMediaProjection| is not created yet and |mCaptureState| has moved to |ATTACHED|. So the capture state won't be |STOPPED| which will keep stopCapture() waiting at [1]. The fix is to change the capture state to |STOPPED| for such a scenario. [1]: https://cs.chromium.org/chromium/src/media/capture/content/android/java/src/org/chromium/media/ScreenCapture.java?l=324 BUG=718082 Review-Url: https://codereview.chromium.org/2857743003 Cr-Commit-Position: refs/heads/master@{#469255} Committed: https://chromium.googlesource.com/chromium/src/+/8c6cff65cbe641a213c46a086fd7efb939b0e355

Patch Set 1 #

Total comments: 2

Patch Set 2 : address nit #

Unified diffs Side-by-side diffs Delta from patch set Stats (+8 lines, -6 lines) Patch
M media/capture/content/android/java/src/org/chromium/media/ScreenCapture.java View 1 1 chunk +8 lines, -6 lines 0 comments Download

Messages

Total messages: 19 (14 generated)
braveyao
Hi miu@, Please take a look.
3 years, 7 months ago (2017-05-03 18:50:02 UTC) #7
miu
lgtm % one nit: https://codereview.chromium.org/2857743003/diff/1/media/capture/content/android/java/src/org/chromium/media/ScreenCapture.java File media/capture/content/android/java/src/org/chromium/media/ScreenCapture.java (right): https://codereview.chromium.org/2857743003/diff/1/media/capture/content/android/java/src/org/chromium/media/ScreenCapture.java#newcode326 media/capture/content/android/java/src/org/chromium/media/ScreenCapture.java:326: while (mCaptureState != CaptureState.STOPPED) { ...
3 years, 7 months ago (2017-05-03 21:43:14 UTC) #8
braveyao
https://codereview.chromium.org/2857743003/diff/1/media/capture/content/android/java/src/org/chromium/media/ScreenCapture.java File media/capture/content/android/java/src/org/chromium/media/ScreenCapture.java (right): https://codereview.chromium.org/2857743003/diff/1/media/capture/content/android/java/src/org/chromium/media/ScreenCapture.java#newcode326 media/capture/content/android/java/src/org/chromium/media/ScreenCapture.java:326: while (mCaptureState != CaptureState.STOPPED) { On 2017/05/03 21:43:14, miu ...
3 years, 7 months ago (2017-05-04 03:04:10 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2857743003/20001
3 years, 7 months ago (2017-05-04 03:04:55 UTC) #16
commit-bot: I haz the power
3 years, 7 months ago (2017-05-04 03:09:23 UTC) #19
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as
https://chromium.googlesource.com/chromium/src/+/8c6cff65cbe641a213c46a086fd7...

Powered by Google App Engine
This is Rietveld 408576698