Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f5276841 authored by Matthew Fritze's avatar Matthew Fritze
Browse files

Remove Slice getter from BasePreferenceController

After working through a prototype here: (ag/3324435)
it is clear that we don't need the controller to
provider the slice. We will build an index that
will contain sufficent UI information, and a reference
to the controller.

At Slice Bind time, we can get the curret value from the
controller, and the UI information from the Index.

Bug: 67996923
Test: robotests
Change-Id: Id43a51bcd73051bc719cd5829907583e0edf23b2
parent 81bd85ab
Loading
Loading
Loading
Loading
+0 −6
Original line number Diff line number Diff line
@@ -17,7 +17,6 @@
package com.android.settings.applications.appinfo;

import android.app.LoaderManager;
import android.app.slice.Slice;
import android.content.Context;
import android.content.Loader;
import android.content.pm.PackageInfo;
@@ -81,11 +80,6 @@ public class AppBatteryPreferenceController extends BasePreferenceController
        return AVAILABLE;
    }

    @Override
    public Slice getSettingSlice() {
        return null;
    }

    @Override
    public void displayPreference(PreferenceScreen screen) {
        super.displayPreference(screen);
+0 −6
Original line number Diff line number Diff line
@@ -16,7 +16,6 @@

package com.android.settings.applications.appinfo;

import android.app.slice.Slice;
import android.content.Context;
import android.support.v7.preference.Preference;
import android.support.v7.preference.PreferenceScreen;
@@ -50,11 +49,6 @@ public abstract class AppInfoPreferenceControllerBase extends BasePreferenceCont
        return AVAILABLE;
    }

    @Override
    public Slice getSettingSlice() {
        return null;
    }

    @Override
    public void displayPreference(PreferenceScreen screen) {
        super.displayPreference(screen);
+0 −6
Original line number Diff line number Diff line
@@ -17,7 +17,6 @@
package com.android.settings.applications.appinfo;

import android.app.Activity;
import android.app.slice.Slice;
import android.content.Context;
import android.content.pm.PackageInfo;
import android.os.AsyncTask;
@@ -110,11 +109,6 @@ public class AppMemoryPreferenceController extends BasePreferenceController
                ? AVAILABLE : DISABLED_DEPENDENT_SETTING;
    }

    @Override
    public Slice getSettingSlice() {
        return null;
    }

    @Override
    public void displayPreference(PreferenceScreen screen) {
        super.displayPreference(screen);
+0 −2
Original line number Diff line number Diff line
@@ -23,13 +23,11 @@ import android.content.res.Resources;
import android.icu.text.ListFormatter;
import android.support.annotation.VisibleForTesting;
import android.support.v7.preference.Preference;
import android.support.v7.preference.PreferenceScreen;
import android.util.Log;

import com.android.settings.R;
import com.android.settings.applications.AppInfoDashboardFragment;
import com.android.settingslib.applications.PermissionsSummaryHelper;
import com.android.settingslib.core.AbstractPreferenceController;

import java.util.ArrayList;
import java.util.List;
+0 −5
Original line number Diff line number Diff line
@@ -50,11 +50,6 @@ public abstract class DefaultAppShortcutPreferenceControllerBase extends BasePre
        return hasAppCapability() ? AVAILABLE : DISABLED_UNSUPPORTED;
    }

    @Override
    public Slice getSettingSlice() {
        return null;
    }

    @Override
    public void updateState(Preference preference) {
        preference.setSummary(isDefaultApp() ? R.string.yes : R.string.no);
Loading