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
@@ -16,8 +16,7 @@ package com.android.settings.location;
|
||||
import android.content.Context;
|
||||
import android.os.UserHandle;
|
||||
import android.os.UserManager;
|
||||
import android.widget.CompoundButton;
|
||||
import android.widget.CompoundButton.OnCheckedChangeListener;
|
||||
import android.widget.Switch;
|
||||
|
||||
import com.android.settings.widget.SettingsMainSwitchBar;
|
||||
import com.android.settingslib.RestrictedLockUtils;
|
||||
@@ -25,11 +24,12 @@ import com.android.settingslib.core.lifecycle.Lifecycle;
|
||||
import com.android.settingslib.core.lifecycle.LifecycleObserver;
|
||||
import com.android.settingslib.core.lifecycle.events.OnStart;
|
||||
import com.android.settingslib.core.lifecycle.events.OnStop;
|
||||
import com.android.settingslib.widget.OnMainSwitchChangeListener;
|
||||
|
||||
/**
|
||||
* The switch controller for the location.
|
||||
*/
|
||||
public class LocationSwitchBarController implements OnCheckedChangeListener,
|
||||
public class LocationSwitchBarController implements OnMainSwitchChangeListener,
|
||||
LocationEnabler.LocationModeChangeListener, LifecycleObserver, OnStart, OnStop {
|
||||
|
||||
private final SettingsMainSwitchBar mSwitchBar;
|
||||
@@ -100,7 +100,7 @@ public class LocationSwitchBarController implements OnCheckedChangeListener,
|
||||
* Listens to the state change of the location primary switch.
|
||||
*/
|
||||
@Override
|
||||
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
|
||||
public void onSwitchChanged(Switch switchView, boolean isChecked) {
|
||||
mLocationEnabler.setLocationEnabled(isChecked);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user