Commit Graph

411 Commits

Author SHA1 Message Date
Peter Qiu
738695e5e8 Merge "wifi: use Passpoint API when forgetting a Passpoint network" am: ff960ed859 am: c5848718ee
am: d49c2ff80f

Change-Id: I2ffbf8cccd698cc8bd5145a7896243ea35107518
2017-03-02 17:01:27 +00:00
Peter Qiu
c5848718ee Merge "wifi: use Passpoint API when forgetting a Passpoint network"
am: ff960ed859

Change-Id: I0e085c5c31656c943d7674770ea9f28d963f2726
2017-03-02 16:57:25 +00:00
Peter Qiu
4ec020a424 wifi: use Passpoint API when forgetting a Passpoint network
Use WifiManager#removePasspointConfiguration when forgetting a
Passpoint network to remove the configuration.

This maintains the legacy behavior, where forgetting a Passpoint
network/AP will remove its provider's profile.

Bug: 34207710
Test: manual test
Change-Id: I8b7f6d9fb20fa9f0f0d90566f76c2a39308ce420
2017-03-01 10:13:07 -08:00
Sundeep Ghuman
0b61e3028c Draw currently connected network in Picker.
Make sure to call refresh when adding the Access Point Preference to the
WifiPicker's Connected Access Point Category. This will case the icon
and the title to be drawn.

Bug: 35388267
Test: None. Too difficult without robolectric testing which requires
refactor.

Change-Id: I7949733f8ca7f904327872df54f6963c723bc704
2017-02-22 19:25:38 -08:00
Fan Zhang
c6ca314c0b Log source with visibility change
- Add a method in VisibilityLoggerMixin to log visible event using
  LogMaker, which allows logging additional FIELD_CONTEXT field.
- In Utils.startFragment, add current page's metricsCategory as an extra
  to next page.
- In next page's onResume(), extract the previous page's metricsCategory
  and send it to VisibilityLoggerMixin.visible()
- Update all caller with additional paramters

Change-Id: I8e1f2597fa465b7d3aa16fa1d21c052a3219694a
Fix: 35359289
Test: RunSettingsRoboTests
2017-02-15 17:17:19 -08:00
Stephen Chen
8fc61244ef Correctly restrict UI for WifiSettings in Guest profile.
Makes sure the restricted user does not see Wifi Preferences
or Saved Networks activity. Also fixes a bug where the progress
bar is displayed starting the activity in Guest mode, and does not go
away. LinkablePreference is changed to make sure titles can be
multi-lined.

Bug: 35317523
Bug: 35318292
Test: to be done in b/35324506
Change-Id: I4a07a2ab3a83c3adaf87226969fd6f16e41c9419
2017-02-15 11:50:38 -08:00
Stephen Chen
2e966c642f Create 'See All Networks' Preference to hide additional networks.
Bug: 34719725
Test: manual inspection, tests to be added in b/35322551
Change-Id: I1a5a08ca4c53db71b4c0c3d4c2942da65faa67d2
2017-02-14 10:25:53 -08:00
Sundeep Ghuman
f200005086 Create a new PreferenceCategory for the current AP.
This highlights the currently connected ap in it's own category.

Bug: 34714183
Test: Manual inspection with connected AP, APs available but not
connected, and Wifi off.

Change-Id: I100bcf5b0bdc7b4f725f2ff630aa885dbca90332
2017-02-06 14:38:06 -08:00
Stephen Chen
9d2712cd78 Move AdvancedWifiSettings into ConfigureWifiSettings.
Bug:34719854
Test: make -j40 RunSettingsRoboTests
clicked on preferences and made sure functionality did not change.

Change-Id: Ia5f0c7f5ea0f88d1322008ab58ca79028cc1a2bb
2017-01-30 12:43:08 -08:00
Doris Ling
c4c9f4d50e Update Network & internet->Wi-Fi to use MasterSwitchPreference.
- Add a preference controller for Network & internet->Wi-Fi to control
  the preference toggling and summary update.
- Refactor WifiSettings and WifiEnabler to share code between the new
  wifi preference controller and the wifi setting.
- Refactor BluetoothSummaryHelper to have a common base class with the
  WifiSummaryHelper.
- Rename the summary helper to summary updater.

Bug: 34280769
Test: make RunSettingsRoboTests
Change-Id: I00ebfc161bcef89331bb41ba405ed8cb8232d248
2017-01-25 10:43:01 -08:00
TreeHugger Robot
889db88043 Merge "Add additional preference items to WifiSettings for configuring Wi-Fi." 2017-01-25 02:28:07 +00:00
Stephen Chen
4145678548 Add additional preference items to WifiSettings for configuring Wi-Fi.
Removed the gear icon that links to ConfigureWifiSettings activity,
and added links to ConfigureWifiSettings and SavedAccessPointSettings.
Included these links in the wifi disabled screen.

Also refactored code to have dividers between wifi list and other settings, and
changed refresh menu item to a button.

Bug: 34518148
Bug: 33110624
Test: Manual inspection
Change-Id: Ie40935f553faea59b7a76fc050d970d431cef5ad
2017-01-24 16:45:58 -08:00
Fan Zhang
7e6df837ee Remove getCategoryKey() from DashboardFragment children.
Use the centralized registry to look up category key instead.

Bug: 32936784
Test: make RunSettingsRoboTests -j40
Change-Id: I0b8c72d70f93e4b5c58871ac90de41f69ad15653
2017-01-24 14:51:15 -08:00
Tamas Berghammer
6031fba9f2 DO NOT MERGE: Revert "Update package names to work with the proto3 compiler"
am: 5a638a6ad1

Change-Id: If23c0926eecf6a08ed0c0ab174cdddb43e31cc00
2017-01-18 20:24:36 +00:00
Tamas Berghammer
5a638a6ad1 DO NOT MERGE: Revert "Update package names to work with the proto3 compiler"
This reverts commit fbd5f5fdce.

Change-Id: I769f7a0f509996ccc39fd1c628cad7e5ec1202bf
2017-01-18 19:28:11 +00:00
Tamas Berghammer
6cd7e52b9e Update package names to work with the proto3 compiler
am: fbd5f5fdce

Change-Id: I20b3bc10cf66bb94369631cef229787b5e6353b6
2017-01-18 17:45:33 +00:00
Tamas Berghammer
fbd5f5fdce Update package names to work with the proto3 compiler
Bug: b/28974522
Change-Id: I5f3adf4946ee4ba1e09e4f40afe83c151405972a
(cherry picked from commit 265d3c2a0c)
2017-01-11 11:28:10 +00:00
Tamas Berghammer
265d3c2a0c Update package names to work with the proto3 compiler
Bug: b/28974522
Change-Id: I5f3adf4946ee4ba1e09e4f40afe83c151405972a
2016-11-08 14:06:17 +00:00
Stephen Chen
b21815e320 Add subtypes to tron logging for Wifi toggles.
For ACTION_WIFI_CONNECT, added subtype to specify whether user is
connecting to saved network.
For ACTION_WIFI_OFF, added subtype to specify whether user was connected
to a network at the time.

Bug: 32371451
Test: Verify logs by running:
adb logcat -b events | egrep '(sysui_|notification_)'
Merged-In: I1d4445bda2fbeb062831e6f858ccc711bff65105

Change-Id: I6b87dc10fcfe412f1c72ae944c2dd4d81da12b53
2016-11-03 14:16:06 -07:00
Stephen Chen
d9e2c946af Add subtypes to tron logging for Wifi toggles.
For ACTION_WIFI_CONNECT, added subtype to specify whether user is
connecting to saved network.
For ACTION_WIFI_OFF, added subtype to specify whether user was connected
to a network at the time.

Bug: 32371451
Change-Id: I1d4445bda2fbeb062831e6f858ccc711bff65105
Fixes: 32371451
Test: Verify logs by running:
adb logcat -b events | egrep '(sysui_|notification_)'
2016-11-01 13:18:55 -07:00
Fan Zhang
aa71afe597 Use MetricsFeatureProvider for logging in Settings.
Bug: 31664539
Test: make RunSettingsRoboTests for regression
Test: adb logcat -b events | egrep "(sysui_|notification_)" for
      verifying log

Change-Id: Id944be7c4ff9911aebee481c2df485542f1318f0
2016-09-23 08:37:37 -07:00
Fan Zhang
d65184faef Log visibility change for DialogCreatable in Settings.
Bug: 30681529
Test: adb logcat -b events | egrep "(sysui_|notification_)"
Test: make RunSettingsRoboTests
Change-Id: I51754d258ba1ddfae24323681f21cd02de4dbb4e
2016-09-21 16:30:32 -07:00
Doris Ling
e9d7698b93 Fix NullPointerException when refreshing wifi preferences. am: b8011dbb93 am: 7a15f88912 am: e972a23faf am: e3f9654ebc
am: 7d16fb0baf

Change-Id: Iaf0fb7bbac3fd1810902150490b59e7baa6d19b7
2016-09-01 00:56:50 +00:00
Doris Ling
e972a23faf Fix NullPointerException when refreshing wifi preferences. am: b8011dbb93
am: 7a15f88912

Change-Id: I3b04d4d87063f928fa76b4843ca0692c8d0311cb
2016-09-01 00:02:02 +00:00
Doris Ling
b8011dbb93 Fix NullPointerException when refreshing wifi preferences.
AccessPointPreference.refresh() is being called in different threads.
The refresh of the preference should only be updated in the main thread.
When access point updates is received not in the main thread, will post
the refreshing of the preference to the message queue to make the update
on the UI thread.

Test: auto - run monkey to verify there is no ANR or crash
      manual - go to Settings->Wifi, toggle on/off many times and verify
      there is no crash.

Change-Id: I656a70ecf2e7b9446c7b95b6b42ab19a5cc2e51c
Fixes: 30902893
2016-08-31 22:19:19 +00:00
Doris Ling
01b36f8e24 Remove preference "Searching for Wi-Fi networks..." am: b8e8485720 am: b7d9f7b83d
am: 925584fb84

Change-Id: I381bd31931d05e22f053ea9fdb822be3c91575f0
2016-08-30 21:37:13 +00:00
Doris Ling
dc8a2d2b36 Remove preference "Searching for Wi-Fi networks..." am: b8e8485720
am: ba7e57ec06

Change-Id: Ic2e0b0c977cf11dcca4ed87deeb8bc6fe9a27420
2016-08-30 20:07:38 +00:00
Doris Ling
925584fb84 Remove preference "Searching for Wi-Fi networks..." am: b8e8485720
am: b7d9f7b83d

Change-Id: I3d21413f7ee61001bae570b478871af6f95d2999
2016-08-30 20:05:08 +00:00
Doris Ling
b8e8485720 Remove preference "Searching for Wi-Fi networks..."
When we add the preference "Searching for Wi-Fi networks...", we didn't
provide a key to the preference. As a result, each time when we get
access point update and try to show such tile, it creates a new one, and
results in multiple entries of such tile. Adding a key to the preference
will prevent the multiple entry from being added.

Test: Manual -
1. Turn wifi off and on several times, verify that there is only one entry
   of "Searching for Wi-Fi networks..." when initializing the wifi access
   point list.
2. Verifies that when the access point list is established, the
   "Searching for Wi-Fi networks..." entry is gone.

Change-Id: Iaad329d89f8e4b52129d0661501aa34fbd956692

Change-Id: I1bfa77051e068926e8c876a89adf14d143970e7e
Fixes: 31143961
2016-08-30 17:41:44 +00:00
Fan Zhang
1bab964a5d Don't remove wifi preferences when updating AP to avoid GC. am: 3f0e1344d3 am: bc6e2c49f0
am: d96bc5b5a6

Change-Id: Id10ded6d97308c175194ffb59afdd89e924ed1c8
2016-08-25 00:51:34 +00:00
Fan Zhang
9d031f2fbc Don't remove wifi preferences when updating AP to avoid GC.
Bug: 30870531

Removing wifi preferences every time will force update create a new set
of preferences, which leads to higher chance of GC.

Change-Id: Ifea2f63a3b54fa0d5861fb34a348d81e99bcab68
2016-08-24 22:49:13 +00:00
Fan Zhang
3f0e1344d3 Don't remove wifi preferences when updating AP to avoid GC.
Bug: 30870531

Removing wifi preferences every time will force update create a new set
of preferences, which leads to higher chance of GC.

Change-Id: Ifea2f63a3b54fa0d5861fb34a348d81e99bcab68
2016-08-24 15:31:10 -07:00
Salvador Martinez
5c0063af7e Prevent wifi icon from disappearing
Made changes to WifiSettings that customizes
the preference icon so that the icon is never
null. This greatly reduces jittering.

Bug: 29979747
Change-Id: I3d2767310513389c09a37e34674a304278f4d0de
(cherry picked from commit 47568de003)
2016-08-19 18:07:46 +00:00
TreeHugger Robot
b0e8f67389 Merge "Log visibility change for all fragments." 2016-08-18 21:06:00 +00:00
Fan Zhang
6507613ebc Log visibility change for all fragments.
Bug: 30681771
Test: SettingsUnitTests

Refactor visibility logging from InstrumentedFragment into a mixin. And
apply mixin in remaining fragments.

Change-Id: Ibbb59904336254a3e4bb9e8c7d0b36e5a6bc2622
2016-08-18 14:04:13 -07:00
Tony Mantler
4ec4237b60 Merge "Fix Wifi screen updating" 2016-08-17 15:59:56 +00:00
Salvador Martinez
47568de003 Prevent wifi icon from disappearing
Made changes to WifiSettings that customizes
the preference icon so that the icon is never
null. This greatly reduces jittering.

Bug: 29979747
Change-Id: I3d2767310513389c09a37e34674a304278f4d0de
2016-08-15 10:24:59 -07:00
Tony Mantler
c2d8110a86 Fix Wifi screen updating
Fixes keyboard focus being cleared, and allows animation

b/30759327

Change-Id: If820708a292ef8dfa173d9edc04bbab322ee78d9
2016-08-15 09:45:57 -07:00
Jason Monk
8ab081e304 Potential fix for receiver leak problem
The background thread is not stopping listening fast enough and is
resulting in first a receiver leak message followed by a crash when
trying to finally unregister the receiver.

Fix this by adding a registerReceiver to SummaryLoader that will
automatically unregister the receiver on the main thread to ensure
it happens in time.

Change-Id: I0104e929d5505eb53993f6765e4c90120df35cf6
Fixes: 28211606
2016-04-18 15:30:42 -04:00
Jason Monk
9e9ba0d751 Fix localization issues with disabled
Change-Id: Iba63b50000f546a1e323c855462841e82fce4df8
Fixes: 27948378
2016-04-11 09:58:55 -04:00
Jason Monk
85da859392 Fix wifi animation issues
There are still some remaining animation issues on the wifi screen.
To avoid regressions from M, just disable animations on the entire
wifi screen.

Change-Id: Iabf8ace731638ae7af483c6f3887ca351b17ac60
Fixes: 26271353
2016-03-30 16:22:39 -04:00
Jason Monk
2de6a287ca Merge changes I22d799f8,I1bc14e7a into nyc-dev
* changes:
  Guard against crash in dev options
  Switch to whitelist for animations
2016-03-28 14:14:01 +00:00
Jason Monk
f38fb38f26 Switch to whitelist for animations
Disable animations for all SettingsPreferenceFragments, unless they
explicitly ask for them before creating their preference screens.

Turn it on for all fragments using the cached removal currently.

Bug: 27713314
Change-Id: I1bc14e7aeb3ee5b8ddb4f3547f472305cd312edf
2016-03-18 15:16:12 -04:00
Sudheer Shanka
e2b2c3ffe4 Add more policy transparency for wifi settings.
Show policy transparency dialog if user tries to modify a
wifi configuration locked by device owner.

Bug: 27375948
Change-Id: I504082282f57bc5de9f097e962d195ecd2cc9da4
2016-03-17 15:35:15 -07:00
Jason Monk
ebfbe5cfe6 Fix add network alignment
Bug: 26759951
Change-Id: I5ba657b5a4099d9f2f1ecf2f27a6a25908bc4a86
2016-03-07 10:19:47 -05:00
Jason Monk
2071eda150 Workarounds to avoid removing all prefs
Removing all prefs causes ugly animations, so avoid it at all cost
and cache all the prefs (while still added) as long as possible.

Bug: 26271353
Change-Id: I33b84d751938b460f4b66c0158057407dd45d974
2016-02-26 11:00:01 -05:00
Sudheer Shanka
7dbbe13168 Add disabled by policy empty views to more screens.
Bug: 27214401
Change-Id: I6cd4292a63610671070bf2134105e9e348c3ab32
2016-02-19 20:18:43 +00:00
Sudheer Shanka
9e9e63b7b3 Part3 - Don't add padlock if the restriction is not set by admin.
Bug: 26687435
Change-Id: Ibfea6d7d5bd32e7a05dcc2cc32b121c9e50b6a34
2016-02-16 11:04:11 +00:00
Chris Wren
9d1bfd1e8d port settings over to new metrics enum
Change-Id: I0b3efd2f4db773ccbc52bfe59ee8eb0dab9584fb
2016-01-27 10:58:58 -05:00
Sudheer Shanka
7ff7ea1e7f Made changes to menu items in WifiSettings and AccountSyncSettings.
When the admin has set disallow_config_wifi, menu items are not added.
we need to check if the menu items can be added after this fragment is
resumed. And for remove account menuitem, check whether any admin has
disabled management of a specific account type.

Change-Id: I58f5a59fe0614c9bc7068b15f43f89527939359d
2016-01-27 14:08:44 +00:00