Add recent apps in app & notification

- Introduce a RecentAppsPreferenceControler, which queries
  UsageStatsManager and displays a list of recently used apps.

- Add a control flag for this feature, intially set to false.

- Make ManageApplications a static pref item instead of dynamic one.
  This makes the RecentAppController easier to control "See all"
  preference, which is backed by ManageApplications.

- Also adjust app_items.xml layout to make app item UI consistent with
  preference item.

Change-Id: I0b9e1784faed32b3055ebf96ef98b6a5e422de50
Fix: 33265548
Test: robotests
This commit is contained in:
fanzhang172
2017-05-01 19:15:17 -07:00
committed by Fan Zhang
parent c90502627b
commit ae2f2b5268
10 changed files with 596 additions and 14 deletions

View File

@@ -14,7 +14,6 @@
package com.android.settings.applications;
import android.app.AppGlobals;
import android.content.Context;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageManager;
@@ -32,7 +31,7 @@ public abstract class AppCounter extends AsyncTask<Void, Void, Integer> {
public AppCounter(Context context, PackageManagerWrapper packageManager) {
mPm = packageManager;
mUm = UserManager.get(context);
mUm = (UserManager) context.getSystemService(Context.USER_SERVICE);
}
@Override