Revert "Apply SettingsLib SeekBarPreference to Settings"

Revert submission 13422386-seekbar-sc-dev

Reason for revert: build broken in SettingsGoogle
Reverted Changes:
I0c2d0d5fb:Apply SettingsLib SeekBarPreference to SettingsGoo...
I1844bb3b0:Apply SettingsLib SeekBarPreference to a11y vibrat...
Ia3e4adec8:Apply SettingsLib SeekBarPreference to a11y vibrat...
Iadee57e9d:Apply SettingsLib SeekBarPreference to a11y vibrat...
I219878716:Apply SettingsLib SeekBarPreference to Settings
I959f5672c:Create SettingsLibSeekBarPreference
I92545a69c:Apply SettingsLib SeekBarPreference to a11y vibrat...

Change-Id: Ie6c3b0dc072e044796abdb33fca305f9f9d47c4d
Bug: 176818438
This commit is contained in:
Edgar Wang
2021-06-08 09:10:41 +00:00
committed by Giuliano Procida
parent d6b5bbb5cb
commit cdff5c6ceb
40 changed files with 1262 additions and 147 deletions

View File

@@ -26,7 +26,7 @@ import androidx.preference.PreferenceManager;
import androidx.preference.PreferenceViewHolder;
import com.android.settings.R;
import com.android.settingslib.Restrictable;
import com.android.settingslib.RestrictedLockUtils;
import com.android.settingslib.RestrictedPreferenceHelper;
import com.android.settingslib.widget.AppPreference;
@@ -35,7 +35,7 @@ import com.android.settingslib.widget.AppPreference;
* {@link com.android.settingslib.RestrictedPreferenceHelper}.
* Used to show policy transparency on {@link AppPreference}.
*/
public class RestrictedAppPreference extends AppPreference implements Restrictable {
public class RestrictedAppPreference extends AppPreference {
private RestrictedPreferenceHelper mHelper;
private String userRestriction;
@@ -85,14 +85,14 @@ public class RestrictedAppPreference extends AppPreference implements Restrictab
super.setEnabled(enabled);
}
@Override
public RestrictedPreferenceHelper getHelper() {
return mHelper;
public void setDisabledByAdmin(RestrictedLockUtils.EnforcedAdmin admin) {
if (mHelper.setDisabledByAdmin(admin)) {
notifyChanged();
}
}
@Override
public void notifyPreferenceChanged() {
notifyChanged();
public boolean isDisabledByAdmin() {
return mHelper.isDisabledByAdmin();
}
public void useAdminDisabledSummary(boolean useSummary) {
@@ -111,4 +111,12 @@ public class RestrictedAppPreference extends AppPreference implements Restrictab
}
mHelper.checkRestrictionAndSetDisabled(userRestriction, UserHandle.myUserId());
}
public void checkRestrictionAndSetDisabled(String userRestriction) {
mHelper.checkRestrictionAndSetDisabled(userRestriction, UserHandle.myUserId());
}
public void checkRestrictionAndSetDisabled(String userRestriction, int userId) {
mHelper.checkRestrictionAndSetDisabled(userRestriction, userId);
}
}