Commit c354d469 authored by Min Qin's avatar Min Qin Committed by Commit Bot

Remove the logs we added to diagnose media notification crash

BUG=826998

Change-Id: If087340df35a26ee81f119e2470c96b5521df412
Reviewed-on: https://chromium-review.googlesource.com/1136659Reviewed-by: default avatarYaron Friedman <yfriedman@chromium.org>
Commit-Queue: Min Qin <qinmin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#574974}
parent 132b68d1
......@@ -286,7 +286,6 @@ public class MediaNotificationManager {
// responsible for hiding it afterwards.
private static void finishStartingForegroundService(ListenerService s) {
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.O) return;
Log.i(TAG, "finish starting foreground service, calling startForeground!");
ChromeNotificationBuilder builder =
NotificationBuilderFactory.createChromeNotificationBuilder(
true /* preferCompat */, ChannelDefinitions.CHANNEL_ID_MEDIA);
......@@ -340,7 +339,6 @@ public class MediaNotificationManager {
@Override
public int onStartCommand(Intent intent, int flags, int startId) {
Log.i(TAG, "onStartCommand, intent: " + intent);
if (!processIntent(intent)) {
// The service has been started with startForegroundService() but the
// notification hasn't been shown. On O it will lead to the app crash.
......@@ -361,7 +359,6 @@ public class MediaNotificationManager {
@VisibleForTesting
void stopListenerService() {
Log.i(TAG, "stop listener service!");
// Call stopForeground to guarantee Android unset the foreground bit.
stopForeground(true /* removeNotification */);
stopSelf();
......@@ -373,7 +370,6 @@ public class MediaNotificationManager {
MediaNotificationManager manager = getManager();
if (manager == null || manager.mMediaNotificationInfo == null) return false;
Log.i(TAG, "process intent, intent Action:" + intent.getAction());
if (intent.getAction() == null) {
// The intent comes from {@link AppHooks#startForegroundService}.
......@@ -394,10 +390,8 @@ public class MediaNotificationManager {
// ACTION_MEDIA_BUTTON intents which stores the information about the key event.
if (Intent.ACTION_MEDIA_BUTTON.equals(action)) {
KeyEvent event = (KeyEvent) intent.getParcelableExtra(Intent.EXTRA_KEY_EVENT);
Log.i(TAG, "process action, has key event:" + event);
if (event == null) return;
if (event.getAction() != KeyEvent.ACTION_DOWN) return;
Log.i(TAG, "process key code, key code:" + event.getKeyCode());
switch (event.getKeyCode()) {
case KeyEvent.KEYCODE_MEDIA_PLAY:
manager.onPlay(
......@@ -845,7 +839,6 @@ public class MediaNotificationManager {
if (mService == null) {
updateMediaSession();
updateNotificationBuilder();
Log.i(TAG, "about to show notification, startForegroundService called!");
AppHooks.get().startForegroundService(createIntent());
} else {
updateNotification(false);
......@@ -860,10 +853,6 @@ public class MediaNotificationManager {
@VisibleForTesting
void clearNotification() {
Log.i(TAG,
"clear notification! has mMediaNotificationInfo: "
+ (mMediaNotificationInfo != null) + ", has mMediaSession"
+ (mMediaSession != null) + ", has mService:" + (mService != null));
mThrottler.clearPendingNotifications();
if (mMediaNotificationInfo == null) return;
......@@ -920,7 +909,6 @@ public class MediaNotificationManager {
@VisibleForTesting
void updateNotification(boolean serviceStarting) {
Log.i(TAG, "update notification! serviceStarting = " + serviceStarting);
if (mService == null) return;
if (mMediaNotificationInfo == null) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment