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.sync; | 5 package org.chromium.chrome.browser.sync; |
6 | 6 |
7 import android.app.Activity; | 7 import android.app.Activity; |
8 import android.app.Fragment; | 8 import android.app.Fragment; |
9 import android.content.ComponentName; | 9 import android.content.ComponentName; |
10 import android.content.Context; | 10 import android.content.Context; |
11 import android.content.Intent; | 11 import android.content.Intent; |
12 import android.provider.Settings; | 12 import android.provider.Settings; |
13 import android.util.Log; | 13 import android.util.Log; |
14 | 14 |
15 import org.chromium.base.ThreadUtils; | 15 import org.chromium.base.ThreadUtils; |
16 import org.chromium.chrome.R; | 16 import org.chromium.chrome.R; |
17 import org.chromium.chrome.browser.notifications.GoogleServicesNotificationContr
oller; | 17 import org.chromium.chrome.browser.notifications.GoogleServicesNotificationContr
oller; |
18 import org.chromium.chrome.browser.notifications.NotificationConstants; | 18 import org.chromium.chrome.browser.notifications.NotificationConstants; |
19 import org.chromium.chrome.browser.preferences.PreferencesLauncher; | 19 import org.chromium.chrome.browser.preferences.PreferencesLauncher; |
20 import org.chromium.sync.AndroidSyncSettings; | 20 import org.chromium.components.sync.AndroidSyncSettings; |
21 | 21 |
22 /** | 22 /** |
23 * {@link SyncNotificationController} provides functionality for displaying Andr
oid notifications | 23 * {@link SyncNotificationController} provides functionality for displaying Andr
oid notifications |
24 * regarding the user sync status. | 24 * regarding the user sync status. |
25 */ | 25 */ |
26 public class SyncNotificationController implements ProfileSyncService.SyncStateC
hangedListener { | 26 public class SyncNotificationController implements ProfileSyncService.SyncStateC
hangedListener { |
27 private static final String TAG = "SyncNotificationController"; | 27 private static final String TAG = "SyncNotificationController"; |
28 private final Context mApplicationContext; | 28 private final Context mApplicationContext; |
29 private final GoogleServicesNotificationController mNotificationController; | 29 private final GoogleServicesNotificationController mNotificationController; |
30 private final Class<? extends Activity> mPassphraseRequestActivity; | 30 private final Class<? extends Activity> mPassphraseRequestActivity; |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 Intent intent = new Intent(Intent.ACTION_MAIN); | 141 Intent intent = new Intent(Intent.ACTION_MAIN); |
142 intent.setComponent(new ComponentName(mApplicationContext, mPassphraseRe
questActivity)); | 142 intent.setComponent(new ComponentName(mApplicationContext, mPassphraseRe
questActivity)); |
143 intent.addCategory(Intent.CATEGORY_LAUNCHER); | 143 intent.addCategory(Intent.CATEGORY_LAUNCHER); |
144 // This activity will become the start of a new task on this history sta
ck. | 144 // This activity will become the start of a new task on this history sta
ck. |
145 intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); | 145 intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); |
146 // Clears the task stack above this activity if it already exists. | 146 // Clears the task stack above this activity if it already exists. |
147 intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); | 147 intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); |
148 return intent; | 148 return intent; |
149 } | 149 } |
150 } | 150 } |
OLD | NEW |