Commit Graph

22 Commits

Author SHA1 Message Date
Weng Su
254ba087c2 [RESTRICT AUTOMERGE] Restrict WifiDppConfiguratorActivity
- Don't show WifiDppConfiguratorActivity if user has DISALLOW_ADD_WIFI_CONFIG

- Don't show AddNetworkFragment if user has DISALLOW_ADD_WIFI_CONFIG

Fix: 299931076
Flag: None
Test: manual test with TestDPC
atest -c SettingsUnitTests:AddNetworkFragmentTest \
         SettingsUnitTests:WifiDppConfiguratorActivityTest

Change-Id: I34afe0f698e2dc43eba59b25f5f3f4f61e70166a
Merged-In: I34afe0f698e2dc43eba59b25f5f3f4f61e70166a
2024-04-03 07:50:24 +00:00
Binyi Wu
26e5e919c8 Prevent keyboard from blocking the input box for WiFi configuration page.
Bug: 223980567
Test: manual
Change-Id: I2b95b065394e2395396ff71b00bd949ac824dac3
2022-05-24 12:50:41 +08:00
Linus Tufvesson
59c0a7bc63 Make WifiDppEnrolleeActivity launches explicit
Bug: 180518134
Test: make RunSettingsRoboTests \
ROBOTEST_FILTER=WifiDppUtilsTest\|WifiDialogActivityTest
Test: Manually verified b/180518134 attack is no longer possible

Change-Id: I8c4e1e17117582c78671d0e4658bd87715a9a046
2021-07-06 12:09:10 +00:00
changbetty
916bac8f2e Adding an option to install a certificate from the CA certificate menu
For CA ceritificate we only can install in Network Preferences > Advaned
> Install certificates. So we add the option for user to install when
you setup the wifi network. After you install the certificate, you can
see the certificate in your menu.

Bug: 176998563
Test: manual test
make RunSettingsRoboTests ROBOTEST_FILTER=WifiConfigController2Test

Change-Id: I532b12f9277c6a15c649907fa3711c807566c88e
2021-05-26 16:37:14 +08:00
Arc Wang
746176eb56 Create NetworkProviderSettings for provider model
Provider model is a feature which improves networks
Settings UX.

NetworkProviderSettings is the fragment which allow
users to choose a mobile network or a Wi-Fi network
to connect.

At this change, NetworkProviderSettings is a clone
of WifiSettings, mobile networks will be integrated
at later CLs.

Bug: 167474581
Test: make RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.network.NetworkProviderSettingsTest
Change-Id: I185639a8f2469e9ec76ad18b6c2bc2e8a4d079e3
2020-09-10 11:03:48 +08:00
Arc Wang
fef7216ef9 [Wi-Fi] Remove the files which use SettingsLib Wi-Fi objects
This change removes

AddDevicePreferenceController
WifiDetailPreferenceController
WifiMeteredPreferenceController
WifiNetworkDetailsFragment
WifiPrivacyPreferenceController

Bug: 152571756
Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=com.android.settings.wifi
Change-Id: Id4901d632f7f4634461ebbbc096e36d348a33365
2020-07-22 07:53:33 +00:00
Arc Wang
0496d2c142 [Wi-Fi] Apply WifiTrackerLib objects in Wi-Fi Slice
This change uses WifiTrackerLib's WifiPickerTracker & WifiEntry
to replace SettingLib's WifiTracker & AccessPoint.

This change includes

1. WifiScanWorker has the callbacks similar to a lifecycle component
   but it's not a lifecycle component. Let WifiScanWorker implements
   LifecycleOwner and provides #getLifecycle() for WifiPickerTracker.

2. Remove captive portal related code because WifiEntry#connect will
   handle captive portal login if it's necessary.

3. Create WifiSliceItem to wrap WifiEntry because WifiEntry is an
   abstract object and it does not provide copy constructor.
   Without copy construcor, Wi-Fi Slice may show unexpected information
   when a WifiEntry is updated.

Bug: 155613549
Bug: 152571756
Test: make RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.wifi.slice
      make RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.wifi
Change-Id: I2d66ea4905daca3244ec4cf8f2935cda817480b1
2020-07-22 07:53:18 +00:00
Greg Kaiser
9e9255fb2a Revert "[Wi-Fi] Apply WifiTrackerLib objects in Wi-Fi Slice"
This reverts commit 7b1aded2a6.

Reason for revert: Settings is crashing for WiFi selection in SetupWizard on wembley

Bug: 161434533
Change-Id: I1d90e9bae1b31862fba674db0d7497e43f987a7f
Test: Locally reverted, reflashed, and was able to select WiFi without Settings crashing.
Exempt-From-Owner-Approval: Revert to clear up P0 while all owners are outside of work hours
2020-07-16 14:47:31 +00:00
Arc Wang
7b1aded2a6 [Wi-Fi] Apply WifiTrackerLib objects in Wi-Fi Slice
This change uses WifiTrackerLib's WifiPickerTracker & WifiEntry
to replace SettingLib's WifiTracker & AccessPoint.

This change includes

1. WifiScanWorker has the callbacks similar to a lifecycle component
   but it's not a lifecycle component. Let WifiScanWorker implements
   LifecycleOwner and provides #getLifecycle() for WifiPickerTracker.

2. Remove captive portal related code because WifiEntry#connect will
   handle captive portal login if it's necessary.

3. Create WifiSliceItem to wrap WifiEntry because WifiEntry is an
   abstract object and it does not provide copy constructor.
   Without copy construcor, Wi-Fi Slice may show unexpected information
   when a WifiEntry is updated.

4. Use WifiTrackerLib's NetworkDetailsTracker & WifiEntry in
   WifiDialogActivity because it gets a WifiEntry key from Wi-Fi Slice.
   NetworkDetailsTracker can get the WifiEntry of th key.

Bug: 155613549
Bug: 152571756
Test: make RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.wifi.slice
      make RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.wifi
Change-Id: I0718f4647cea007a9b701922f3121a388dd43918
2020-07-16 15:56:42 +08:00
Arc Wang
41f23de712 [Wi-Fi] Replace WifiTracker with WifiPickerTracker in WifiSettings
WifiSettings uses WifiTracker in SettingsLib while WifiSettings2
uses WifiPickerTracker in WifiSettingsLib.

1. Remove WifiSettings.
2. Rename WifiSettings2 to WifiSettings.
3. Remove the files only used in the removed WifiSettings.
   (Saved networks files are not included)

Bug: 152571756
Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=com.android.settings.wifi
      atest WifiSettingsUiTest
Change-Id: I800b434c8049121db115cff87d51e164e4529999
2020-05-14 21:24:57 +08:00
Arc Wang
838cbbf539 [Wi-Fi DPP] Remove scanner button of unsaved WiFi network dialogs
Romove it because we may not ensure the network of a QR code is
matching the selected one.

Bug: 134701332
Test: manual visual
Change-Id: I264e921c806f2b335d158fc4cffc48acf69f5c19
2019-06-13 16:17:03 +08:00
Colin Cross
807e861105 Use if instead of switch for resources
Converting to Soong will move some code from directly compiled
into the app to compiled into an Android library and then
shared between the app and the tests.  This will cause resource
IDs in the library to become non-final, which means they can
no longer be used in case statements.  Convert affect case
statements to if blocks.

Test: m RunSettingsRoboTests
Change-Id: I25742a374f06d3fa4decbfc0d223a350acc50881
2019-05-13 13:42:01 -07:00
TreeHugger Robot
9d741c4f47 Merge "Improve UX of Wi-Fi QR code scanner enrollee flow" 2019-02-26 05:48:56 +00:00
Arc Wang
13f37337ed Improve UX of Wi-Fi QR code scanner enrollee flow
1. Do not start WifiSettings after enrollee success
2. Return WifiConfiguration to the calling object after enrollee success
3. In WifiDialog, do not show scan button if Save button is not visible to users
4. Fix scanner button may not respond problem by setting listener for scanner
   button of ssid field and password field
5. If SSID is assigned, only allow to enrollee for the network of assigned SSID

Bug: 124416152
Test: manual test
Change-Id: Ic5241c4767eaa8ea01782817d8302d8b0572ab36
2019-02-23 11:59:53 +08:00
Raff Tsai
3055df31a0 Fix testcase error
Fixes: 125604750
Test: make RunSettingsRoboTests ROBOTEST_FILTER="com.android.settings.wifi.AddNetworkFragmentTest"
Change-Id: Id787c5715d0f60491f123fab58e2b0ca3093bcd9
2019-02-22 16:59:37 +08:00
Raff Tsai
2d91873dcb Fix Talkback issue
It is a button without text. Talkback will focus on this item.
We hide this item from layout so that Talkback will not find it.

Fixes: 125065965
Test: Test it with Talkback
Change-Id: I143c02b13b9f888fa5837dd2c472cf69bd00edcf
2019-02-21 09:46:39 +00:00
Arc Wang
07ced72e67 Fix [RTL] Wifi QR Scanner option overlaps wifi Password text
Use android:layout_alignParentStart & android:layout_alignParentEnd
to fix the RTL issue. And refine code of the scanner button.

Bug: 123923904
Test: manual test
Change-Id: I85491b99d22ec303e370422a81a43fc203b695fa
2019-02-15 16:30:17 +08:00
Johnson Lu
3a5d9020e8 Remove feature flags of WiFi Sharing feature
Bug: 120744414
Test: Manual
Change-Id: I655ebb8d149d0976063845478bc667cc4d72d96d
2019-02-15 16:14:54 +08:00
Fan Zhang
31b210017b Migrate all MetricsProto enums to SettingsEnums
Bug: 122855168
Test: rebuild
Change-Id: I962d9a71179f86b7cae9dc5e9a00e0aa1557dc76
2019-01-17 14:55:42 -08:00
Arc Wang
8ff2852f74 Implement receiver flow of WiFi sharing feature II
Bug: 120630683
Test: atest RunSettingsRoboTests
Change-Id: Iabe56205ff9274382adbe5bba59a60d833a57214
2018-12-14 06:50:26 +00:00
Johnson Lu
5aef897e9b Implement receiver flow of WiFi sharing feature
1.Add a button to launch QR code scanner when add a network.
2.Scan button added in AddNetworkFragment / WifiDialog / WifiSettings.

Bug: 120630683
Test: make RunSettingsRoboTests
Change-Id: I340bfa2247e092f586dd90dfea37c355e681ffee
2018-12-11 14:25:07 +08:00
tmfang
db00a3177a Refactor add network page
WifiDialog.java can be launched as "full screen mode"
in some use cases. However the way it's done is that
it uses theme to fake the full screen appearance.
It just feels hacky to use a dialog for full screen UI.
So, we created an "AddNetworkFragment" to make this
page can look like a normal fragment.

Also, clean up some useless code about "full screen mode"
of WifiDialog.

Change-Id: Iedd04c6a8e403cbceb872313314e1cba0d514246
Fixes: 111875856
Test: robo test, manual test
2018-08-18 00:16:14 +08:00