Switch to use small icon for most app related pages

- Renamed AppProgressPreference to AppPreference to handle most app
  related prefs
- Add ed AppSwitchPreference - the same layout as AppPreference except
  it's a SwitchPreference
- Use above 2 prefs in most app related pages.
  - Everything under special access pages
  - Recent app list in App & notifications
  - App data usage detail page
  - Default app picker pages

Bug: 65182905
Test: robotests
Change-Id: I96c980ba1db49e36dabe25b5eade1197215aad11
This commit is contained in:
Fan Zhang
2017-10-28 15:11:49 -07:00
parent 974d2fe080
commit 1c3a4de93d
25 changed files with 350 additions and 121 deletions

View File

@@ -51,6 +51,7 @@ import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
import com.android.settings.R;
import com.android.settings.core.instrumentation.InstrumentedDialogFragment;
import com.android.settings.overlay.FeatureFactory;
import com.android.settings.widget.AppSwitchPreference;
import java.util.ArrayList;
import java.util.Collections;
@@ -138,7 +139,7 @@ public class ZenAccessSettings extends EmptyTextSettings {
for (ApplicationInfo app : apps) {
final String pkg = app.packageName;
final CharSequence label = app.loadLabel(mPkgMan);
final SwitchPreference pref = new SwitchPreference(getPrefContext());
final SwitchPreference pref = new AppSwitchPreference(getPrefContext());
pref.setPersistent(false);
pref.setIcon(app.loadIcon(mPkgMan));
pref.setTitle(label);