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

Commit f5e032b1 authored by Fan Zhang's avatar Fan Zhang
Browse files

Return result when set tile enabled/disabled

Bug: 63149109
Test: settings robotest in same topic
Change-Id: I5cd346e9acef52412508bc29c24f9fd82100559a
parent 1bb90ce3
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;
    }

    /**