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

Commit 9a22ccde authored by Felipe Leme's avatar Felipe Leme Committed by android-build-merger
Browse files

Merge "Fixed AccessPreference listener." into nyc-dev

am: 40c228d9

* commit '40c228d9':
  Fixed AccessPreference listener.

Change-Id: I7f47a8a2ce57e3cb17aef915b9430c1be5b0da15
parents 063ae249 40c228d9
Loading
Loading
Loading
Loading
+14 −13
Original line number Diff line number Diff line
@@ -227,19 +227,20 @@ public class UnrestrictedDataAccess extends SettingsPreferenceFragment
            if (mEntry.icon != null) {
                setIcon(mEntry.icon);
            }
            setOnPreferenceClickListener( new OnPreferenceClickListener() {
        }

        @Override
                public boolean onPreferenceClick(Preference pref) {
        protected void onClick() {
            if (mState.isDataSaverBlacklisted) {
                // app is blacklisted, launch App Data Usage screen
                InstalledAppDetails.startAppInfoFragment(AppDataUsage.class,
                                context.getString(R.string.app_data_usage),
                        getContext().getString(R.string.app_data_usage),
                        UnrestrictedDataAccess.this,
                        mEntry);
                        return false;
            } else {
                // app is not blacklisted, let superclass handle toggle switch
                super.onClick();
            }
                    return true;
                }});
        }

        // Sets UI state based on whitelist/blacklist status.