Revert "Migrate to CompoundButton.OnCheckedChangeListener"
Revert submission 25147565-onSwitchChanged-CompoundButton Reason for revert: breaking builds Bug:309601476 Reverted changes: /q/submissionid:25147565-onSwitchChanged-CompoundButton Change-Id: Ie746db87d9c642599593aa3d5e5baf6b7ba89c0e
This commit is contained in:
committed by
Android (Google) Code Review
parent
71d1f021af
commit
8979681a8d
@@ -27,8 +27,7 @@ import android.os.Bundle;
|
||||
import android.os.UserHandle;
|
||||
import android.os.UserManager;
|
||||
import android.provider.Settings;
|
||||
import android.widget.CompoundButton;
|
||||
import android.widget.CompoundButton.OnCheckedChangeListener;
|
||||
import android.widget.Switch;
|
||||
|
||||
import androidx.appcompat.app.AlertDialog;
|
||||
import androidx.preference.Preference;
|
||||
@@ -46,12 +45,13 @@ import com.android.settings.search.BaseSearchIndexProvider;
|
||||
import com.android.settings.widget.SettingsMainSwitchBar;
|
||||
import com.android.settingslib.search.SearchIndexable;
|
||||
import com.android.settingslib.widget.FooterPreference;
|
||||
import com.android.settingslib.widget.OnMainSwitchChangeListener;
|
||||
/**
|
||||
* Screen pinning settings.
|
||||
*/
|
||||
@SearchIndexable
|
||||
public class ScreenPinningSettings extends SettingsPreferenceFragment
|
||||
implements OnCheckedChangeListener, DialogInterface.OnClickListener {
|
||||
implements OnMainSwitchChangeListener, DialogInterface.OnClickListener {
|
||||
|
||||
private static final String KEY_USE_SCREEN_LOCK = "use_screen_lock";
|
||||
private static final String KEY_FOOTER = "screen_pinning_settings_screen_footer";
|
||||
@@ -198,7 +198,7 @@ public class ScreenPinningSettings extends SettingsPreferenceFragment
|
||||
* Listens to the state change of the overall lock-to-app switch.
|
||||
*/
|
||||
@Override
|
||||
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
|
||||
public void onSwitchChanged(Switch switchView, boolean isChecked) {
|
||||
if (isChecked) {
|
||||
new AlertDialog.Builder(getContext())
|
||||
.setMessage(R.string.screen_pinning_dialog_message)
|
||||
|
Reference in New Issue
Block a user