[Wi-Fi] Support WiFi detail page for OpenRoaming feature in AOSP setting.

Issue: Openroaming should have a specific detail page.
Solution: Apply the mock design to only reserve two preference items:
          1.Auto-connect
          2.Scription details

Bug: 146669261
Test: Add unit test case to test the new controller: WifiSubscriptionDetailPreferenceController2
Change-Id: Iba96500062f412f4cdcd1c8248544657770ab231
This commit is contained in:
govenliu
2020-02-19 22:22:47 +08:00
parent 9ab1bd2587
commit 824796d3b2
9 changed files with 198 additions and 14 deletions

View File

@@ -55,8 +55,11 @@ public class WifiPrivacyPreferenceController2 extends BasePreferenceController i
@Override
public int getAvailabilityStatus() {
return mWifiManager.isConnectedMacRandomizationSupported()
? AVAILABLE : CONDITIONALLY_UNAVAILABLE;
if (!mWifiManager.isConnectedMacRandomizationSupported()
|| mWifiEntry.canManageSubscription()) {
return CONDITIONALLY_UNAVAILABLE;
}
return AVAILABLE;
}
@Override