aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Viverette <alanv@google.com>2016-06-07 15:34:45 +0000
committerAlan Viverette <alanv@google.com>2016-06-07 15:34:45 +0000
commit2ff1886b2707adbe5d102e8a04136481481085f4 (patch)
treebeec908218770ce4ddefa648861a97419fba55cb
parent5d1be993cdc73b8c0060977543e6ac0d1682116f (diff)
downloadsupport-2ff1886b2707adbe5d102e8a04136481481085f4.tar.gz
Revert "Synchronize reads of static members."
Too old to merge. This reverts commit 5d1be993cdc73b8c0060977543e6ac0d1682116f. Change-Id: I0e97ac2fee540afc8ac84612996319cfea6fd3e6
-rw-r--r--v4/java/android/support/v4/app/NotificationManagerCompat.java26
1 files changed, 13 insertions, 13 deletions
diff --git a/v4/java/android/support/v4/app/NotificationManagerCompat.java b/v4/java/android/support/v4/app/NotificationManagerCompat.java
index de484e94e36..8a6c639ca77 100644
--- a/v4/java/android/support/v4/app/NotificationManagerCompat.java
+++ b/v4/java/android/support/v4/app/NotificationManagerCompat.java
@@ -331,23 +331,23 @@ public final class NotificationManagerCompat {
final String enabledNotificationListeners = Settings.Secure.getString(
context.getContentResolver(),
SETTING_ENABLED_NOTIFICATION_LISTENERS);
- synchronized (sEnabledNotificationListenersLock) {
- // Parse the string again if it is different from the last time this method was called.
- if (enabledNotificationListeners != null
- && !enabledNotificationListeners.equals(sEnabledNotificationListeners)) {
- final String[] components = enabledNotificationListeners.split(":");
- Set<String> packageNames = new HashSet<String>(components.length);
- for (String component : components) {
- ComponentName componentName = ComponentName.unflattenFromString(component);
- if (componentName != null) {
- packageNames.add(componentName.getPackageName());
- }
+ // Parse the string again if it is different from the last time this method was called.
+ if (enabledNotificationListeners != null
+ && !enabledNotificationListeners.equals(sEnabledNotificationListeners)) {
+ final String[] components = enabledNotificationListeners.split(":");
+ Set<String> packageNames = new HashSet<String>(components.length);
+ for (String component : components) {
+ ComponentName componentName = ComponentName.unflattenFromString(component);
+ if (componentName != null) {
+ packageNames.add(componentName.getPackageName());
}
+ }
+ synchronized (sEnabledNotificationListenersLock) {
sEnabledNotificationListenerPackages = packageNames;
sEnabledNotificationListeners = enabledNotificationListeners;
}
- return sEnabledNotificationListenerPackages;
}
+ return sEnabledNotificationListenerPackages;
}
/**
@@ -366,8 +366,8 @@ public final class NotificationManagerCompat {
if (sSideChannelManager == null) {
sSideChannelManager = new SideChannelManager(mContext.getApplicationContext());
}
- sSideChannelManager.queueTask(task);
}
+ sSideChannelManager.queueTask(task);
}
/**