| 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.physicalweb; | 5 package org.chromium.chrome.browser.physicalweb; |
| 6 | 6 |
| 7 import android.app.AlarmManager; | 7 import android.app.AlarmManager; |
| 8 import android.app.Notification; | 8 import android.app.Notification; |
| 9 import android.app.NotificationManager; | 9 import android.app.NotificationManager; |
| 10 import android.app.PendingIntent; | 10 import android.app.PendingIntent; |
| (...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 477 @VisibleForTesting | 477 @VisibleForTesting |
| 478 void overridePwsClientForTesting(PwsClient pwsClient) { | 478 void overridePwsClientForTesting(PwsClient pwsClient) { |
| 479 mPwsClient = pwsClient; | 479 mPwsClient = pwsClient; |
| 480 } | 480 } |
| 481 | 481 |
| 482 @VisibleForTesting | 482 @VisibleForTesting |
| 483 void overrideNotificationManagerForTesting( | 483 void overrideNotificationManagerForTesting( |
| 484 NotificationManagerProxy notificationManager) { | 484 NotificationManagerProxy notificationManager) { |
| 485 mNotificationManager = notificationManager; | 485 mNotificationManager = notificationManager; |
| 486 } | 486 } |
| 487 |
| 488 @VisibleForTesting |
| 489 static void clearPrefsForTesting(Context context) { |
| 490 PreferenceManager.getDefaultSharedPreferences(context).edit() |
| 491 .remove(PREFS_VERSION_KEY) |
| 492 .remove(PREFS_NEARBY_URLS_KEY) |
| 493 .remove(PREFS_RESOLVED_URLS_KEY) |
| 494 .remove(PREFS_NOTIFICATION_UPDATE_TIMESTAMP) |
| 495 .apply(); |
| 496 } |
| 487 } | 497 } |
| OLD | NEW |