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.notifications; | 5 package org.chromium.chrome.browser.notifications; |
6 | 6 |
7 import android.app.Notification; | 7 import android.app.Notification; |
8 import android.content.Context; | 8 import android.content.Context; |
9 import android.os.Build; | 9 import android.os.Build; |
10 | 10 |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 for (Action action : mActions) { | 49 for (Action action : mActions) { |
50 addActionToBuilder(builder, action); | 50 addActionToBuilder(builder, action); |
51 } | 51 } |
52 if (mSettingsAction != null) { | 52 if (mSettingsAction != null) { |
53 addActionToBuilder(builder, mSettingsAction); | 53 addActionToBuilder(builder, mSettingsAction); |
54 } | 54 } |
55 builder.setDefaults(mDefaults); | 55 builder.setDefaults(mDefaults); |
56 builder.setVibrate(mVibratePattern); | 56 builder.setVibrate(mVibratePattern); |
57 builder.setWhen(mTimestamp); | 57 builder.setWhen(mTimestamp); |
58 builder.setOnlyAlertOnce(!mRenotify); | 58 builder.setOnlyAlertOnce(!mRenotify); |
| 59 setGroupOnBuilder(builder, mOrigin); |
59 if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { | 60 if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { |
60 // Notification.Builder.setPublicVersion was added in Android L. | 61 // Notification.Builder.setPublicVersion was added in Android L. |
61 builder.setPublicVersion(createPublicNotification(mContext)); | 62 builder.setPublicVersion(createPublicNotification(mContext)); |
62 } | 63 } |
63 return builder.build(); | 64 return builder.build(); |
64 } | 65 } |
65 } | 66 } |
OLD | NEW |