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 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
291 case DOWNLOAD_NOTIFICATION_TYPE_CANCEL: | 291 case DOWNLOAD_NOTIFICATION_TYPE_CANCEL: |
292 mBoundService.notifyDownloadCanceled(info.getDownloadGuid()); | 292 mBoundService.notifyDownloadCanceled(info.getDownloadGuid()); |
293 break; | 293 break; |
294 case DOWNLOAD_NOTIFICATION_TYPE_RESUME_ALL: | 294 case DOWNLOAD_NOTIFICATION_TYPE_RESUME_ALL: |
295 mBoundService.resumeAllPendingDownloads(); | 295 mBoundService.resumeAllPendingDownloads(); |
296 break; | 296 break; |
297 default: | 297 default: |
298 assert false; | 298 assert false; |
299 } | 299 } |
300 | 300 |
301 if (mBoundService != null) mBoundService.hideSummaryNotificationIfNecess
ary(); | 301 // Don't need to expose the notification id to ignore. Cancel will auto
matically call this |
| 302 // method as well and pass it in. |
| 303 if (mBoundService != null) mBoundService.hideSummaryNotificationIfNecess
ary(null); |
302 if (autoRelease) unbindServiceIfNeeded(); | 304 if (autoRelease) unbindServiceIfNeeded(); |
303 } | 305 } |
304 } | 306 } |
OLD | NEW |