Commit Graph

20 Commits

Author SHA1 Message Date
Bonian Chen
a5f08854e3 [Settings] Inclusive language for Data Usage
Change wordings in data usage part into inclusive language.

Bug: 160707804
Test: make RunSettingsRoboTests
Change-Id: I713e52df8201413b884257a51bc1f71a0d43179d
2020-07-15 02:52:32 +00:00
Arc Wang
4fafe6716c [Wi-Fi] Fix Wi-Fi broken tests
Bug: 150910070
Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=com.android.settings.wifi
Change-Id: Ie9b9384610857e2999fe4642a93c2d31ce3315f3
2020-03-20 15:41:29 +08:00
Arc Wang
ac5e1acfba [Wi-Fi] Control Wi-Fi Hotspot Settings using onClick instead of onSwitchToggled
In the current Settings framework onSwitchToggled has been implemented
to monitor the change in Settings done by user but its getting called
even when Settings is changed using setChecked where under certain
condition like rotation during config changed,
Tether Settings is disabled and then enabled and later before Rotation
Settings remained false due to stop Tethering with Tether Enabled
After Rotation when settings is initialized it is set as disabled
and even after receiving the Tether Enabled it remains Off.
Hence used onClick to monitor user ON/OFF Settings

Bug: 142625203
Test: make RunSettingsRoboTests ROBOTEST_FILTER=WifiTetherSwitchBarControllerTest.java
Test: Manual
1. Go to Wifi Hotspot Settings
2. Turn ON
3. Change SSID and save
4. Rotate screen soon after saving
Result: Hotspot does not turn ON, remains in OFF state.
Signed-off-by:JeiFeng Lee <linger.lee@mediatek.com>

Change-Id: Ibddacdf35eb3196f40cdb2c240efa902f9123646
2020-03-05 18:21:39 +08:00
Salvador Martinez
b94251ad07 Remove airplane mode restriction on hotspot
This isn't needed anymore since we support this now.

Test: robotests
Bug: 111681176
Change-Id: I0292f0a38347e4fa3414170e0351a53f5997a192
2019-03-08 16:34:57 -08:00
Fan Zhang
23f8d59d02 Sort imports
Having consistent import order will reduce chance of merge
conflict between internal and external master

Test: rebuild
Change-Id: I0b1a170967ddcce7f388603fd521f6ed1eeba30b
2018-08-28 22:13:15 +00:00
Fan Zhang
c7162cd24d Reorder and clean up imports.
Test: rebuild
Change-Id: I178485c84ae7146f991fd77b6d7504b029942a68
2018-06-18 15:45:09 -07:00
Meng Wang
3a4e213037 Merge "Revert "Remove provisioning dialog from wifi-tethering"" into pi-dev am: 6fcafbe5bf
am: ed6037dffa

Change-Id: I163fb4c27334f64362033a94ebaad55387c8da61
2018-05-10 12:10:09 -07:00
TreeHugger Robot
6fcafbe5bf Merge "Revert "Remove provisioning dialog from wifi-tethering"" into pi-dev 2018-05-10 18:57:39 +00:00
Meng Wang
6de3389b92 Revert "Remove provisioning dialog from wifi-tethering"
This reverts commit 81ca3dd4c0.

Reason for revert:
This breaks carrier requirement to show error dialog/roaming warning.
Will make an entitlement app change to suppress the progress dialog
so that if the entitlement check succeeds no dialog will be shown
in most cases.

Bug: 78680359
Change-Id: I98d2aa5cc676308b1e2d16bf877dc6878a7bf4cb
2018-05-10 05:15:43 +00:00
Salvador Martinez
60c513d908 Merge "Only start tether when not already enabled" into pi-dev am: f62f91b0b6
am: 964d107491

Change-Id: I0d325498e2ea8526fbc4e6ec4bf579331bf0848b
2018-04-26 14:30:25 -07:00
Salvador Martinez
a4fe5c9871 Only start tether when not already enabled
The toggle in the tether page currently tries to start tethering if
it gets turned on. However, changing a wifi config can cause
startTether to be called and also the toggle to switch leading to
a double call to startTether. This CL makes it so that if we are
already connected to tethering we don't try to start it again.

Test: robotests
Change-Id: I91085244c5d1fcc245a6b6480e638a32bc14f0ac
Fixes: 78028548
Fixes: 78441216
Fixes: 74368363
2018-04-26 10:14:54 -07:00
Aurimas Liutikas
e0069d332d Migrate Settings to androidx.
Test: make Settings
Bug: 76692459
Change-Id: I941dea40562170649bf056e675cc32e5163c0e39
2018-04-20 12:52:29 -07:00
Salvador Martinez
7ba65c39ae Make WifiTether listen to datasaver
Wifi Tethering is already turned off when appropriate. However
if you re-enable it you still can't toggle the tether switchbar.
This CL makes it so that if you disable data saver the toggle
becomes enabled again.

Test: robotests
Bug: 77860936
Change-Id: I03fa74c21674678a90cde7bd20fa68167f02ae3c
2018-04-20 02:56:47 +00:00
Salvador Martinez
81ca3dd4c0 Remove provisioning dialog from wifi-tethering
We no longer want this dialog to show when a user toggles tethering.
Failures to set up the AP will still be handled correctly.

Test: robotests pass
Bug: 62629055
Change-Id: Id3d0bf9694a1c8b6ae353bfd6634dd0b56813497
2018-04-09 15:27:02 -07:00
Lei Yu
0544fbd507 Add callback when tethering fails
Add real callback instead of using NoOpCallback. When it fails,
reset the switchbar.

Change-Id: I6f87d7cefa67ff8f9f59a815fd976940fb61c06c
Fixes: 72904303
Test: RunSettingsRoboTests
2018-03-22 13:07:59 -07:00
Lei Yu
592faf364d Update the toggle state in constructor.
Before this cl, the update of toggle depends on BroadcastReceiver.
However it is not called when toggle is inited, which make the toggle in
broken state sometimes.

This cl make it execute the update method in constructor, so toggle can
get the correct state when it is created.

Fixes: 73718975
Test: RunSettingsRoboTests
Change-Id: Icb798afaff0bdeedad3a966315441712be2e2523
2018-03-22 11:18:43 -07:00
jackqdyulei
dbaea5af63 Clean up WifiTetherPreferenceController
In previous code there are two main issues:
1. It listens to update from both WIFI_AP_STATE_CHANGED_ACTION and
ACTION_TETHER_STATE_CHANGED. It is unnecessary because they provides
same info(whether wifi hotspot is enabled, enabling...)

2. New API softApCallback already covers the
WIFI_AP_STATE_CHANGED_ACTION, so we don't need this broadcast anymore.

This cl fixes those two issues by cleaning up BroadcastReceiver and
update the tests.

Bug: 72702183
Test: RunSettingsRoboTests
Change-Id: I21c2818e0f0185172f34447a1716dc47ee065e23
2018-01-31 18:21:53 -08:00
Fan Zhang
657286112f Pre-set initial state to wifi tether switches.
The preset initial state helps eliminating animation jank when first
landing on the page.

Change-Id: Ia7ba83983f18409b1c653cc1ebb0f3aad281358c
Fixes: 64811322
Test: robotests
2017-09-05 13:57:14 -07:00
Fan Zhang
7686ef863c Misc tweak on wifi hotspot setting page
- Make hotspot password show in plain text
- Make main control into a master switch style

Change-Id: I8fdb293a617787f256fb663708cfc0e454f548d2
Fixes: 63865785
Test: robotests
2017-08-03 16:23:27 -07:00
Fan Zhang
78d5efdfea Refactor hotspot into a full page
- Deprecated WifiAPEnabler, and copied most of its logic into various
  controllers and WifiTetherSettings.
- Added tests

Fix: 37253404
Fix: 36181835

Test: make RunSettingsRoboTests
Change-Id: Iad994d61b694ad7f1113d045a3e7500eeaec178b
2017-06-14 12:32:44 -07:00