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
@@ -74,6 +74,7 @@ import com.android.settings.wifi.ConfigureWifiEntryFragment;
|
||||
import com.android.settings.wifi.ConnectedWifiEntryPreference;
|
||||
import com.android.settings.wifi.LongPressWifiEntryPreference;
|
||||
import com.android.settings.wifi.WifiConfigUiBase2;
|
||||
import com.android.settings.wifi.WifiConnectListener;
|
||||
import com.android.settings.wifi.WifiDialog2;
|
||||
import com.android.settings.wifi.WifiPickerTrackerHelper;
|
||||
import com.android.settings.wifi.WifiUtils;
|
||||
@@ -198,7 +199,9 @@ public class NetworkProviderSettings extends RestrictedSettingsFragment
|
||||
};
|
||||
|
||||
protected WifiManager mWifiManager;
|
||||
private WifiManager.ActionListener mConnectListener;
|
||||
private WifiManager.ActionListener mSaveListener;
|
||||
private WifiManager.ActionListener mForgetListener;
|
||||
|
||||
protected InternetResetHelper mInternetResetHelper;
|
||||
|
||||
@@ -404,6 +407,8 @@ public class NetworkProviderSettings extends RestrictedSettingsFragment
|
||||
}
|
||||
mInternetUpdater = new InternetUpdater(getContext(), getSettingsLifecycle(), this);
|
||||
|
||||
mConnectListener = new WifiConnectListener(getActivity());
|
||||
|
||||
mSaveListener = new WifiManager.ActionListener() {
|
||||
@Override
|
||||
public void onSuccess() {
|
||||
@@ -419,6 +424,22 @@ public class NetworkProviderSettings 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();
|
||||
}
|
||||
}
|
||||
};
|
||||
setHasOptionsMenu(true);
|
||||
|
||||
if (savedInstanceState != null) {
|
||||
|
Reference in New Issue
Block a user