Revert "Clean up unused WifiManager.ActionListener"
This reverts commit a2adee5362
.
Reason for revert: Breaks build - b/294364808
Change-Id: I4f323c2fc43dddbf2f2dd0e323f026727263c99e
This commit is contained in:
committed by
Android (Google) Code Review
parent
a2adee5362
commit
c4a0abef8c
@@ -59,6 +59,7 @@ import com.android.settings.LinkifyUtils;
|
||||
import com.android.settings.R;
|
||||
import com.android.settings.RestrictedSettingsFragment;
|
||||
import com.android.settings.SettingsActivity;
|
||||
import com.android.settings.Utils;
|
||||
import com.android.settings.core.FeatureFlags;
|
||||
import com.android.settings.core.SubSettingLauncher;
|
||||
import com.android.settings.datausage.DataUsagePreference;
|
||||
@@ -174,7 +175,9 @@ public class WifiSettings extends RestrictedSettingsFragment
|
||||
};
|
||||
|
||||
protected WifiManager mWifiManager;
|
||||
private WifiManager.ActionListener mConnectListener;
|
||||
private WifiManager.ActionListener mSaveListener;
|
||||
private WifiManager.ActionListener mForgetListener;
|
||||
|
||||
/**
|
||||
* The state of {@link #isUiRestricted()} at {@link #onCreate(Bundle)}}. This is neccesary to
|
||||
@@ -307,6 +310,8 @@ public class WifiSettings extends RestrictedSettingsFragment
|
||||
mWifiManager = getActivity().getSystemService(WifiManager.class);
|
||||
}
|
||||
|
||||
mConnectListener = new WifiConnectListener(getActivity());
|
||||
|
||||
mSaveListener = new WifiManager.ActionListener() {
|
||||
@Override
|
||||
public void onSuccess() {
|
||||
@@ -323,6 +328,21 @@ public class WifiSettings extends RestrictedSettingsFragment
|
||||
}
|
||||
};
|
||||
|
||||
mForgetListener = new WifiManager.ActionListener() {
|
||||
@Override
|
||||
public void onSuccess() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(int reason) {
|
||||
Activity activity = getActivity();
|
||||
if (activity != null) {
|
||||
Toast.makeText(activity,
|
||||
R.string.wifi_failed_forget_message,
|
||||
Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
};
|
||||
registerForContextMenu(getListView());
|
||||
setHasOptionsMenu(true);
|
||||
|
||||
|
Reference in New Issue
Block a user