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

Commit 179610c8 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Return result when set tile enabled/disabled"

parents 587fa78c f5e032b1
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -169,7 +169,10 @@ public class SettingsDrawerActivity extends Activity {
        finish();
    }

    public void setTileEnabled(ComponentName component, boolean enabled) {
    /**
     * @return whether or not the enabled state actually changed.
     */
    public boolean setTileEnabled(ComponentName component, boolean enabled) {
        PackageManager pm = getPackageManager();
        int state = pm.getComponentEnabledSetting(component);
        boolean isEnabled = state == PackageManager.COMPONENT_ENABLED_STATE_ENABLED;
@@ -183,7 +186,9 @@ public class SettingsDrawerActivity extends Activity {
                            ? PackageManager.COMPONENT_ENABLED_STATE_ENABLED
                            : PackageManager.COMPONENT_ENABLED_STATE_DISABLED,
                    PackageManager.DONT_KILL_APP);
            return true;
        }
        return false;
    }

    /**