diff options
author | Amith Yamasani <yamasani@google.com> | 2015-04-17 10:02:15 -0700 |
---|---|---|
committer | Amith Yamasani <yamasani@google.com> | 2015-04-24 16:12:01 -0700 |
commit | f47e51ec605fccf7fed9e50d1adc98fbd4e8b340 (patch) | |
tree | 68c2fe8acf0144544d498ca413283d70d7666c53 /services/usage/java/com/android/server | |
parent | 4bc704655abee70c1998b9a62777cdf643920467 (diff) | |
download | frameworks_base-f47e51ec605fccf7fed9e50d1adc98fbd4e8b340.zip frameworks_base-f47e51ec605fccf7fed9e50d1adc98fbd4e8b340.tar.gz frameworks_base-f47e51ec605fccf7fed9e50d1adc98fbd4e8b340.tar.bz2 |
More usage tracking
Notification listeners can now report that a notification
has been seen by the user and that package is then marked
as active.
Bug: 20066058
Change-Id: I336040a52c44c21fd0d78b02ec9a19d448c64b40
Diffstat (limited to 'services/usage/java/com/android/server')
-rw-r--r-- | services/usage/java/com/android/server/usage/UsageStatsService.java | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/services/usage/java/com/android/server/usage/UsageStatsService.java b/services/usage/java/com/android/server/usage/UsageStatsService.java index edeeaba..04984d3 100644 --- a/services/usage/java/com/android/server/usage/UsageStatsService.java +++ b/services/usage/java/com/android/server/usage/UsageStatsService.java @@ -28,6 +28,7 @@ import android.app.usage.UsageEvents.Event; import android.app.usage.UsageStats; import android.app.usage.UsageStatsManagerInternal; import android.app.usage.UsageStatsManagerInternal.AppIdleStateChangeListener; +import android.appwidget.AppWidgetManager; import android.content.BroadcastReceiver; import android.content.ComponentName; import android.content.Context; @@ -435,9 +436,7 @@ public class UsageStatsService extends SystemService implements DevicePolicyManager dpm = getContext().getSystemService(DevicePolicyManager.class); if (dpm == null) return false; List<ComponentName> components = dpm.getActiveAdminsAsUser(userId); - if (components == null) { - return false; - } + if (components == null) return false; final int size = components.size(); for (int i = 0; i < size; i++) { if (components.get(i).getPackageName().equals(packageName)) { |