Commit Graph

118 Commits

Author SHA1 Message Date
tmfang
2ff083c2f1 Fix overlapping problem on wifi detail screen
If we didn't set view and lifecycle for EntityHeaderController,
it only sets "z-order" as 0 for action bar.

So, user sees overlapped problem while user is scrolling view.

For now, we set view and lifecycle as parameter for EntityHeaderController,
then EntityHeaderController can change "z-order" while scrolling view.

Test: visual and robo test
Fixes: 133380109
Change-Id: I0445c6aeaa42d798374d2c712e9611a09a6b55e7
2019-05-23 15:27:14 +08:00
Clown SHEN
fbcf3708a6 Merge "Show "Disconnected" instead of "Saved" in detail page summary" into qt-dev 2019-04-27 06:42:45 +00:00
clownshen
0d5928f6f1 Show "Disconnected" instead of "Saved" in detail page summary
To improve UX, show summary as "Disconnected" is more make sense to end
user instead of "Saved" in detail page, it's decision-maker to click
connect button.

Bug: 131119614
Test: manual test
Test: make RunSettingsRoboTests -j32 ROBOTEST_FILTER=com.android.settings.wifi.details.WifiDetailPreferenceControllerTest

Change-Id: I26ea0c566daab6214a596509f972005fd37fab4d
2019-04-25 08:15:13 +00:00
clownshen
dd4764b7f4 Fix NPE when connect timeout
If user click connect button and then receive timeout event after leave
detail page, the NPE happened. Ignore the timeout event if activity
already gone.

Bug: 131141866
Test: manual test
Test: make RunSettingsRoboTests -j32 ROBOTEST_FILTER=com.android.settings.wifi.details.WifiDetailPreferenceControllerTest
Change-Id: Ic22c22027386d4a6de5d693eafcd9cd463ed3415
2019-04-24 06:10:18 +00:00
TreeHugger Robot
79f75e483f Merge "Add action metrics for Wi-Fi provision features" into qt-dev 2019-04-23 17:36:54 +00:00
Clown SHEN
2e340d284e Merge "Correct detail page UI once user change MAC randomized setting" into qt-dev 2019-04-23 03:01:48 +00:00
clownshen
60013de198 Correct detail page UI once user change MAC randomized setting
Changing MAC randomized setting will disconnect and reconnect Wi-Fi in
the background automatically. UI display as disconnect even AP
reconnected. Fix this problem and also remove some obsolete code.
Another problem is connect button display as disabled with
"Connecting..." wording after user click connect then change the MAC
randomized setting.

Bug: 130370187
Test: Manual test with test case in go/wifi_connnection_btn_design
Test: make RunSettingsRoboTests -j32 ROBOTEST_FILTER=com.android.settings.wifi.details.WifiDetailPreferenceControllerTest
Change-Id: Id87c3db0cc785a9ceb3a71c7cbb78ffd87ffb0a1
2019-04-22 11:44:37 +08:00
Arc Wang
3940c331df Add action metrics for Wi-Fi provision features
// ACTION: Share a Wi-Fi network by generating a QR code
  ACTION_SETTINGS_SHARE_WIFI_QR_CODE

  // ACTION: Connect to a Wi-Fi network by scanning a QR code
  ACTION_SETTINGS_ENROLL_WIFI_QR_CODE

  // ACTION: Share Wi-Fi hotspot by generating a QR code
  ACTION_SETTINGS_SHARE_WIFI_HOTSPOT_QR_CODE

Bug: 130521826
Test: manual
Change-Id: I4204307dd5318eb7c47e4136dc7d8700d43e4da1
2019-04-19 15:28:29 +08:00
Quang Luong
7af19fcb86 Merge "Fixed Passpoint network "Not in range" issue and forget button" into qt-dev 2019-04-17 17:57:39 +00:00
Quang Luong
0af9b83644 Fixed Passpoint network "Not in range" issue and forget button
Passpoint networks now correctly allow the user to connect and forget
from the saved networks network detail page.

Bug: 130373102
Test: atest WifiDetailPreferenceControllerTest

Change-Id: I6ed2817bb3a1ac657695272ceb9d5e3f3e944f16
2019-04-16 12:52:25 -07:00
Arc Wang
994929ecc7 Hide 'Share' button and 'Add device' preference for a Passpoint Wi-Fi network
Passpoint provisioning is much different from other Wi-Fi networks and ZXing
does not support a QR code format to share a passpoint Wi-Fi network. We
should not show any button to share a passpoint Wi-Fi network.

Bug: 130609037
Test: manual
Change-Id: Ie2538ed9e030e5aa2e88452b50b6592223ca46a8
2019-04-16 16:51:04 +08:00
cosmohsieh
6938ad1630 [PasspointV2] Clear feature flag settings_wifi_details_saved_screen
Clear feature flag settings_wifi_details_saved_screen

Bug: b/128369527
Test: make RunSettingsRoboTests -j32 ROBOTEST_FILTER=com.android.settings.wifi
Change-Id: Ib8fc9c9eb52bee12d6501a2041c32aa60c80e70e
2019-04-13 00:58:23 +08:00
Clown SHEN
fa1c69ee44 Merge "Add icon for sign in" into qt-dev 2019-04-10 02:48:20 +00:00
clownshen
9762652115 Add icon for sign in
Bug: 130188624
Test: manual test
Test: make RunSettingsRoboTests -j32 ROBOTEST_FILTER=com.android.settings.wifi.details.WifiDetailPreferenceControllerTest
Change-Id: I58a6c411a31e5cb0fe05eba486ba38774c078070
2019-04-09 06:56:16 +00:00
Clown SHEN
740dd43700 Merge "Redraw WiFi detail page's header icon" into qt-dev 2019-04-09 06:45:49 +00:00
Arc Wang
4a5ff58511 Supports to share Wi-Fi networks of WPA3 security SAE & OWE via QR code generator
When scanned a no password ZXing QR code, add both open network &
enhanced open network to configured Wi-Fi network list because this kind
of QR code may refer to a open network or an enhanced open network.

Bug: 124131581
Test: manual
Change-Id: Id9f85ef8dcdf72347be8106938437aecd0eed9f5
2019-04-09 10:36:07 +08:00
clownshen
6ef1eec2e2 Redraw WiFi detail page's header icon
Tint 87% dark in day mode and 100% white for night mode

Bug: 129413562
Test: make RunSettingsRoboTests -j32 ROBOTEST_FILTER=com.android.settings.wifi.details.WifiDetailPreferenceControllerTest
Test: manual test
Change-Id: Ia31231ca7871ac4efcea5e1232690ff4374df5b3
(cherry picked from commit 86f65ef488)
2019-04-09 02:20:32 +00:00
clownshen
5c2637d6d0 Only show Sign In button for connected network
The Sign In button may appeared in details page for disconnected network
if current network is Captive Portal network. Should hide the button
for disconnected network.

Bug: 129514576
Test: make RunSettingsRoboTests -j32 ROBOTEST_FILTER=com.android.settings.wifi.details.WifiDetailPreferenceControllerTest
Test: manual test
Change-Id: I8b4f79e7ba731ce83c49576fffd3e78a27598be3
2019-04-02 08:38:50 +00:00
Clown SHEN
531a87bfd5 Merge "Add test cases for disconnected/not in range network" 2019-04-02 08:38:05 +00:00
Clown SHEN
5cfde78ac3 Merge "Enlarge wifi signal icon from 24dp to 32dp for header view" 2019-04-02 03:20:34 +00:00
clownshen
38f4acf77f Add test cases for disconnected/not in range network
Since detail page support to display for saved network which connection
state may be disconnected or not in range, add more test cases for this
new change.

Bug: 124707751
Test: atest WifiDetailPreferenceControllerTest passed
Change-Id: Ia6426ed6336c09f387317c5597f8deb14c1a9502
2019-04-02 03:13:43 +00:00
clownshen
b5ab562c12 Update state as disconnected when Wi-Fi disabled
Connect button display wrong string "Connecting..." and be disabled
when Wi-Fi turned off at quick setting. Update state as disconnected
when Wi-Fi disabled to fix this issue.

Bug: 129514552
Test: manual test
Change-Id: I76a247ce0ed951357172e67221281b004df386d8
2019-04-02 03:02:22 +00:00
clownshen
24827d35b1 Enlarge wifi signal icon from 24dp to 32dp for header view
Bug: 129413562
Test: manual test
Change-Id: I50a27ac25e5ae42530736bb7c019485a51d707ba
2019-04-01 07:08:55 +00:00
Cosmo Hsieh
e1b6d7d875 Merge "Show "Disconnect" on forget button for ephemeral network" 2019-03-29 03:18:00 +00:00
TreeHugger Robot
d34b2a9697 Merge "Add SSID to Network Details page for Passpoint" 2019-03-28 22:12:33 +00:00
Quang Luong
a2297dc1d1 Add SSID to Network Details page for Passpoint
Added SSID to Network Details page under the Advanced portion only
when the network is for Passpoint, whose network title is not the
SSID of the underlying connected AP.

Bug: 129092023
Test: atest RunSettingsRoboTests

Change-Id: I13308d46e727fc01fec7a079d8e32ab9f1763e21
2019-03-28 11:54:19 -07:00
cosmohsieh
e4b3844d0b Show "Disconnect" on forget button for ephemeral network
For app or carrier initiated wifi connections (i.e all "ephemeral networks"),
the detailed page of settings should show "Disconnect" instead of "Forget".

Bug: 123892605
Test: atest WifiDetailPreferenceControllerTest
Change-Id: I1ee7f45ea12fe2ab9ca35cab77de0b1d67efc1db
2019-03-28 14:35:42 +08:00
Quang Luong
3c2c658791 Added null pointer check for mWifiConfig.macRandomizationSetting
Without the null pointer check, a passpoint network in the saved
networks page will throw a NullPointerException since there is no
config associated with it.

Bug: 129422562
Test: manual
Change-Id: I4a085a16c4181b7bdfe46c279e579d34ba314d81
2019-03-27 14:53:09 -07:00
clownshen
936f1f215e Provide connect button in Wi-Fi detail page
User can click connect button to connect this AP at the detail page even
the Wi-Fi disabled. Would turn on Wi-Fi if disabled and then connect to
this saved network.

Bug: 126503889
Test: atest and manual test
Change-Id: I313e290474d6623a6c3e84027e81d0d1ebf16919
2019-03-27 13:08:02 +08:00
Arc Wang
8a9ccfd8d9 Add a different Wi-Fi Easy Connect entry point
To separate it further from Wi-Fi sharing as it was
causing some confusion.

Bug: 129031195
Test: manual test
Change-Id: Ia55e3ed91e92c3ec36ae6a9401897c5c960762da
2019-03-26 09:55:38 +08:00
Arc Wang
d2405c7328 Merge "Improve Wi-Fi Easy Connect lock screen UI information" 2019-03-22 02:19:48 +00:00
Arc Wang
abfd8ab726 Improve Wi-Fi Easy Connect lock screen UI information
1. Change lock screen title and remove description
2. In QR code generator screen, change summary and show password under QR code picture

Bug: 128920152
Bug: 128576809
Test: manual test
Change-Id: Id096d7f417308df14ffe50c618644750aa991df8
2019-03-21 14:09:22 +08:00
lucaslin
7335c594be Modify dialog message for partial connectivity
In some networks, network validation may only get success
result for http probe but fail result for https probe.
For this kind of network, it may still work at some websites
or apps, but user didn't know about that. In order to fix this
issue, we will check if network has partial connectivity and
notify user to make a choice if they want to use this partial
connectivity or not.

Bug: 113450764
Bug: 128489091
Test: 1. Build pass.
      2. make -j44 RunSettingsRoboTests
      ROBOTEST_FILTER=WifiDetailPreferenceControllerTest
      3. Change captive_portal_https_url to https://invalid.com
      to simulate partial connectivity.

Change-Id: I0e87f6f2ede173f45a7b6fcf842b4f9a83d8efa1
2019-03-20 11:41:21 +08:00
clownshen
7fe8f92846 Display more information on network detail page
For connected network, show all information at detail page. For
disconnected network, show signal strength, Mac address, etc.

Bug: 124707751
Test: atest
Test: manual test
Change-Id: I401621abf9bba5dc7900b47a811d595adc906c13
2019-03-15 19:40:26 +08:00
cosmohsieh
976995fa36 [Passpointv2] Implement DataUsage header for Wi-Fi detail fragment
Change header to a data usage chart of the specified Wi-Fi network.

Bug: 124700353
Test: make RunSettingsRoboTests -j32 ROBOTEST_FILTER=com.android.settings
Change-Id: Ide08ffd5e97ced5fe54707562690155414598dac
2019-03-14 16:41:08 +08:00
TreeHugger Robot
08a2a8183e Merge changes I54a3f033,I2e894501
* changes:
  Fix [a11y] Wi-Fi Easy Connect Talkback issues
  Support to share Wi-Fi hotspot via QR code
2019-03-12 00:42:40 +00:00
Quang Luong
0df143834a Use getTitle() for AccessPoint display name
Instead of getSsidStr(), AccessPoint display names should use
getTitle() to accomodate Passpoint networks which use a provider
name instead of a single ssid. This change allows the provider
name to be displayed in the network details page, the long
press wifi dialog, and the config editing dialog.

Bug: 118705403
Test: atest WifiSettingsTest
Change-Id: I930d6218c7e464ad20c0c61130e0cb9ce315d9a2
2019-03-08 14:42:29 -08:00
Arc Wang
b249fb7d13 Support to share Wi-Fi hotspot via QR code
1. QR code scanner (Wi-Fi Easy Connect) does not support sharing Wi-Fi hotspot
   at current stage
2. Wi-Fi hotspot QR code button only shows when Wi-Fi hotspot is enabled
3. The QR code has the security string "WPA" for hotspot's WPA2_PSK

Bug: 123151660
Test: atest WifiTetherSSIDPreferenceControllerTest
            WifiQrCodeTest WifiDppConfiguratorActivityTest
            WifiDppEnrolleeActivityTest
            WifiDppQrCodeGeneratorFragmentTest
            WifiDppQrCodeScannerFragmentTest
            WifiNetworkListFragmentTest
            WifiDppChooseSavedWifiNetworkFragmentTest

Change-Id: I2e89450180b82cc841ee3b15be52bfc6f9f6164d
2019-03-08 11:48:12 +08:00
Kevin Chyn
37293d59d3 Update Settings with BiometricPrompt API update
Bug: 126190552
Test: Builds
Change-Id: I4b99a59982c1d23be7e49940a271f7652c51d480
2019-03-05 18:29:36 +08:00
TreeHugger Robot
a9308663c3 Merge "[Passpointv2] Implement confirm dialog for passpoint forget button" 2019-03-01 10:17:54 +00:00
Arc Wang
12d431e683 Add "Share" button for saved Wi-Fi network
Bug: 124700405
Test: manual test
Change-Id: I58140dbc7bef1214c2323c1c37f9c87e94b94088
2019-02-25 13:51:24 +08:00
cosmohsieh
b5dac6bacf [Passpointv2] Implement Wi-Fi detail page for saved network
Will show a Wi-Fi status detail page when clicking a saved network.

Bug: 124695272
Test: Manual
Change-Id: I5f32cf63f369593ad49c93ceeaace9fb623888e5
2019-02-22 13:35:19 +08:00
cosmohsieh
9fcfae6367 [Passpointv2] Implement confirm dialog for passpoint forget button
Add a confirm dialog when clicking forget button and this is a passpoint
network.

Bug: 122671580
Test: atest WifiDetailPreferenceControllerTest
Change-Id: Ib3410ab0e8fb771a82ab928022c49977bc759962
2019-02-22 09:59:15 +08:00
Arc Wang
79a3ae860e Replace deprecated KeyguardManager API with new BiometricPrompt one
Use BiometricPrompt to replace KeyguardManager#createConfirmDeviceCredentialIntent

Bug: 124249685
Test: manual test
Change-Id: I7a05b8f1b08471cf9f09b3d4ce1bedc7cd529e72
2019-02-20 14:17:45 +08:00
TreeHugger Robot
4e706fc7c3 Merge "Remove feature flags of WiFi Sharing feature" 2019-02-18 02:42:33 +00: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
7db118e367 Mass clean up: don't cast class when not needed.
Bug: none
Test: rebuild
Change-Id: Ie3f58a3d5ae99ade28a33dcac80c18de90d4d5b2
2019-02-14 12:26:09 -08:00
Arc Wang
cfa78006a0 Filter out unsupported security type for DPP configuration.
There is different Wi-Fi security support between ZXing's Wi-Fi QR code
format and Wi-Fi DPP QR code format.

  ZXing's Wi-Fi QR code format: supports WEP / WPA / none security
  Wi-Fi DPP: supports WPA / SAE

So we will have different UI behavior for different security.

  WEP & none security: only support QR code generator
  WPA: supports both QR code generator & scanner
  SAE: only supports QR code scanner
  others: don't support. The share button is invisible

Bug: 123212410
Test: manual test
Change-Id: I87962d730282fc2c1b96223dca6feb79235fe5a1
2019-01-25 14:22:08 +08:00
Johnson Lu
69b31596a2 Fix crash issue when click 'Share' button
Hide 'Share' button if access point return null wifi config.

Change-Id: I554ce8c3214c94892d57c213d0588c70aad97439
Fixes: 123172888
Test: robotests
2019-01-21 17:43:11 +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