OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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.sync.notifier; | 5 package org.chromium.sync.notifier; |
6 | 6 |
7 import android.accounts.Account; | 7 import android.accounts.Account; |
8 import android.app.PendingIntent; | 8 import android.app.PendingIntent; |
9 import android.content.ContentResolver; | 9 import android.content.ContentResolver; |
10 import android.content.Intent; | 10 import android.content.Intent; |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 * This class is an {@code IntentService}. All methods are assumed to be executi
ng on its single | 48 * This class is an {@code IntentService}. All methods are assumed to be executi
ng on its single |
49 * execution thread. | 49 * execution thread. |
50 * | 50 * |
51 * @author dsmyers@google.com | 51 * @author dsmyers@google.com |
52 */ | 52 */ |
53 public class InvalidationService extends AndroidListener { | 53 public class InvalidationService extends AndroidListener { |
54 /* This class must be public because it is exposed as a service. */ | 54 /* This class must be public because it is exposed as a service. */ |
55 | 55 |
56 /** Notification client typecode. */ | 56 /** Notification client typecode. */ |
57 @VisibleForTesting | 57 @VisibleForTesting |
58 static final int CLIENT_TYPE = ClientType.Type.CHROME_SYNC_ANDROID_VALUE; | 58 static final int CLIENT_TYPE = ClientType.CHROME_SYNC_ANDROID; |
59 | 59 |
60 private static final String TAG = "InvalidationService"; | 60 private static final String TAG = "InvalidationService"; |
61 | 61 |
62 private static final Random RANDOM = new Random(); | 62 private static final Random RANDOM = new Random(); |
63 | 63 |
64 /** | 64 /** |
65 * Whether the underlying notification client has been started. This boolean
is updated when a | 65 * Whether the underlying notification client has been started. This boolean
is updated when a |
66 * start or stop intent is issued to the underlying client, not when the int
ent is actually | 66 * start or stop intent is issued to the underlying client, not when the int
ent is actually |
67 * processed. | 67 * processed. |
68 */ | 68 */ |
(...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
498 } | 498 } |
499 | 499 |
500 private static void setClientId(byte[] clientId) { | 500 private static void setClientId(byte[] clientId) { |
501 sClientId = clientId; | 501 sClientId = clientId; |
502 } | 502 } |
503 | 503 |
504 private static void setIsClientStarted(boolean isStarted) { | 504 private static void setIsClientStarted(boolean isStarted) { |
505 sIsClientStarted = isStarted; | 505 sIsClientStarted = isStarted; |
506 } | 506 } |
507 } | 507 } |
OLD | NEW |