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

Issue 1431023004: [Media, Android] Fix lockscreen and other remote controls on KK- (Closed)

Created:
5 years, 1 month ago by whywhat
Modified:
5 years, 1 month ago
CC:
chromium-reviews, feature-media-reviews_chromium.org, mcasas+watch_chromium.org, posciak+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[Media, Android] Fix lockscreen and other remote controls on KK- The cause of the crash is the following: - user starts playback on KK - user tries to use remote control, e.g. lock screen - the service gets an intent without the notification id and stops itself - onServiceDestroy gets called with an invalid notification id so it doesn't clean up the manager - next time the playback is started, the manager calls getIntent() with an invalid notification id - the method returns null in this case The fix: use distinct MediaButtonReceiver subclasses for the two supported notification ids to pass the right one with the intent MediaButtonReceiver sends to the service. BUG==551411 Committed: https://crrev.com/da7a2629e7e54be4d8f8238cb81917ccbdb11b7d Cr-Commit-Position: refs/heads/master@{#358714}

Patch Set 1 #

Patch Set 2 : Better solution #

Total comments: 8

Patch Set 3 : Addressed comments #

Patch Set 4 : Handle invalid intent. Remove an else. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+67 lines, -6 lines) Patch
M chrome/android/java/AndroidManifest.xml View 1 1 chunk +6 lines, -1 line 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/media/ui/MediaButtonReceiver.java View 1 2 chunks +6 lines, -1 line 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/media/ui/MediaNotificationManager.java View 1 2 3 7 chunks +55 lines, -4 lines 0 comments Download

Messages

Total messages: 31 (11 generated)
whywhat
PTaL
5 years, 1 month ago (2015-11-06 16:29:45 UTC) #3
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1431023004/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1431023004/1
5 years, 1 month ago (2015-11-06 16:30:03 UTC) #4
mlamouri (slow - plz ping)
Does that happen when the intent goes trough the MediaButtonReceiver? Is the intent received there ...
5 years, 1 month ago (2015-11-06 16:36:46 UTC) #5
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 1 month ago (2015-11-06 17:17:25 UTC) #7
whywhat
Better solution
5 years, 1 month ago (2015-11-06 17:32:29 UTC) #8
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1431023004/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1431023004/20001
5 years, 1 month ago (2015-11-06 17:32:52 UTC) #10
whywhat
+Bernhard for the manifest change. PTaL, modified as discussed.
5 years, 1 month ago (2015-11-06 17:35:02 UTC) #13
mlamouri (slow - plz ping)
lgtm with comments applied. Thanks! :) https://codereview.chromium.org/1431023004/diff/20001/chrome/android/java/src/org/chromium/chrome/browser/media/ui/MediaNotificationManager.java File chrome/android/java/src/org/chromium/chrome/browser/media/ui/MediaNotificationManager.java (right): https://codereview.chromium.org/1431023004/diff/20001/chrome/android/java/src/org/chromium/chrome/browser/media/ui/MediaNotificationManager.java#newcode102 chrome/android/java/src/org/chromium/chrome/browser/media/ui/MediaNotificationManager.java:102: && mNotificationId != ...
5 years, 1 month ago (2015-11-06 18:01:08 UTC) #14
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 1 month ago (2015-11-06 18:07:38 UTC) #16
whywhat
Addressed comments
5 years, 1 month ago (2015-11-08 13:10:21 UTC) #17
whywhat
PTaL https://codereview.chromium.org/1431023004/diff/20001/chrome/android/java/src/org/chromium/chrome/browser/media/ui/MediaNotificationManager.java File chrome/android/java/src/org/chromium/chrome/browser/media/ui/MediaNotificationManager.java (right): https://codereview.chromium.org/1431023004/diff/20001/chrome/android/java/src/org/chromium/chrome/browser/media/ui/MediaNotificationManager.java#newcode102 chrome/android/java/src/org/chromium/chrome/browser/media/ui/MediaNotificationManager.java:102: && mNotificationId != MediaNotificationInfo.INVALID_ID) { On 2015/11/06 at ...
5 years, 1 month ago (2015-11-08 13:11:51 UTC) #18
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1431023004/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1431023004/40001
5 years, 1 month ago (2015-11-08 13:12:24 UTC) #20
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 1 month ago (2015-11-08 13:47:25 UTC) #22
Bernhard Bauer
https://codereview.chromium.org/1431023004/diff/20001/chrome/android/java/src/org/chromium/chrome/browser/media/ui/MediaNotificationManager.java File chrome/android/java/src/org/chromium/chrome/browser/media/ui/MediaNotificationManager.java (right): https://codereview.chromium.org/1431023004/diff/20001/chrome/android/java/src/org/chromium/chrome/browser/media/ui/MediaNotificationManager.java#newcode102 chrome/android/java/src/org/chromium/chrome/browser/media/ui/MediaNotificationManager.java:102: && mNotificationId != MediaNotificationInfo.INVALID_ID) { On 2015/11/08 13:11:51, whywhat ...
5 years, 1 month ago (2015-11-08 23:43:13 UTC) #23
whywhat
Handle invalid intent. Remove an else.
5 years, 1 month ago (2015-11-09 00:45:02 UTC) #24
whywhat
PTaL https://codereview.chromium.org/1431023004/diff/20001/chrome/android/java/src/org/chromium/chrome/browser/media/ui/MediaNotificationManager.java File chrome/android/java/src/org/chromium/chrome/browser/media/ui/MediaNotificationManager.java (right): https://codereview.chromium.org/1431023004/diff/20001/chrome/android/java/src/org/chromium/chrome/browser/media/ui/MediaNotificationManager.java#newcode102 chrome/android/java/src/org/chromium/chrome/browser/media/ui/MediaNotificationManager.java:102: && mNotificationId != MediaNotificationInfo.INVALID_ID) { On 2015/11/08 at ...
5 years, 1 month ago (2015-11-09 00:47:54 UTC) #25
Bernhard Bauer
lgtm
5 years, 1 month ago (2015-11-09 22:27:26 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1431023004/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1431023004/60001
5 years, 1 month ago (2015-11-09 23:16:28 UTC) #29
commit-bot: I haz the power
Committed patchset #4 (id:60001)
5 years, 1 month ago (2015-11-10 00:29:12 UTC) #30
commit-bot: I haz the power
5 years, 1 month ago (2015-11-10 00:30:02 UTC) #31
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/da7a2629e7e54be4d8f8238cb81917ccbdb11b7d
Cr-Commit-Position: refs/heads/master@{#358714}

Powered by Google App Engine
This is Rietveld 408576698