Refine the check restriction function in WifiEntryPreference
- Move checkRestrictionAndSetDisabled function from WifiEntryPreference to necessary child-classes to avoid impacting other child-classes such as SavedAccessPointsPreference. - Avoid adding ShadowRestrictedPreference to the unnecessary test class. Bug: 233871529 Test: manual test make RunSettingsRoboTests Change-Id: Ia2145401558b293b5f4eaa0860f83b7d3bbab548
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
package com.android.settings.wifi;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.UserManager;
|
||||
|
||||
import androidx.annotation.VisibleForTesting;
|
||||
import androidx.fragment.app.Fragment;
|
||||
@@ -33,6 +34,7 @@ public class LongPressWifiEntryPreference extends WifiEntryPreference {
|
||||
public LongPressWifiEntryPreference(Context context, WifiEntry wifiEntry, Fragment fragment) {
|
||||
super(context, wifiEntry);
|
||||
mFragment = fragment;
|
||||
checkRestrictionAndSetDisabled(UserManager.DISALLOW_ADD_WIFI_CONFIG);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Reference in New Issue
Block a user