OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 package org.chromium.chrome.browser.download; | 5 package org.chromium.chrome.browser.download; |
6 | 6 |
7 import android.content.ComponentName; | 7 import android.content.ComponentName; |
8 import android.content.Context; | 8 import android.content.Context; |
9 import android.content.Intent; | 9 import android.content.Intent; |
10 import android.content.ServiceConnection; | 10 import android.content.ServiceConnection; |
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
292 case DOWNLOAD_NOTIFICATION_TYPE_CANCEL: | 292 case DOWNLOAD_NOTIFICATION_TYPE_CANCEL: |
293 mBoundService.notifyDownloadCanceled(info.getDownloadGuid()); | 293 mBoundService.notifyDownloadCanceled(info.getDownloadGuid()); |
294 break; | 294 break; |
295 case DOWNLOAD_NOTIFICATION_TYPE_RESUME_ALL: | 295 case DOWNLOAD_NOTIFICATION_TYPE_RESUME_ALL: |
296 mBoundService.resumeAllPendingDownloads(); | 296 mBoundService.resumeAllPendingDownloads(); |
297 break; | 297 break; |
298 default: | 298 default: |
299 assert false; | 299 assert false; |
300 } | 300 } |
301 | 301 |
302 if (mBoundService != null) mBoundService.hideSummaryNotificationIfNecess
ary(); | 302 // Don't need to expose the notification id to ignore. Cancel will auto
matically call this |
| 303 // method as well and pass it in. |
| 304 if (mBoundService != null) mBoundService.hideSummaryNotificationIfNecess
ary(null); |
303 if (autoRelease) unbindServiceIfNeeded(); | 305 if (autoRelease) unbindServiceIfNeeded(); |
304 } | 306 } |
305 } | 307 } |
OLD | NEW |