Implement context menu for ConnectedAccessPointPreference
1) User wants to long press ConnectedAccessPointPreference to forget network if this
is a captive portal network.
2) Change context menu string
Bug: 113756562
Test: make RunSettingsRoboTests -j32 ROBOTEST_FILTER=com.android.settings.wifi
Change-Id: If5c45c45fe126f627eeb53a6c1873a070ad23ae8
(cherry picked from commit 9f8522565a)
This commit is contained in:
@@ -20,6 +20,7 @@ import android.content.Context;
|
||||
import android.view.View;
|
||||
|
||||
import androidx.annotation.DrawableRes;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.preference.PreferenceViewHolder;
|
||||
|
||||
import com.android.settings.R;
|
||||
@@ -29,15 +30,16 @@ import com.android.settingslib.wifi.AccessPointPreference;
|
||||
/**
|
||||
* An AP preference for the currently connected AP
|
||||
*/
|
||||
public class ConnectedAccessPointPreference extends AccessPointPreference implements
|
||||
public class ConnectedAccessPointPreference extends LongPressAccessPointPreference implements
|
||||
View.OnClickListener {
|
||||
|
||||
private OnGearClickListener mOnGearClickListener;
|
||||
private boolean mIsCaptivePortal;
|
||||
|
||||
public ConnectedAccessPointPreference(AccessPoint accessPoint, Context context,
|
||||
UserBadgeCache cache, @DrawableRes int iconResId, boolean forSavedNetworks) {
|
||||
super(accessPoint, context, cache, iconResId, forSavedNetworks);
|
||||
UserBadgeCache cache, @DrawableRes int iconResId, boolean forSavedNetworks,
|
||||
Fragment fragment) {
|
||||
super(accessPoint, context, cache, forSavedNetworks, iconResId, fragment);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user