Commit Graph

36992 Commits

Author SHA1 Message Date
Lorenzo Colitti
088215d877 Wifi details: minor ordering fixes.
1. Set mNetwork before the NetworkCallbacks can be delivered.
   Previously, the code would set mNetwork in updateInfo, relying
   on the fact that the BroadcastReceiver registered in onResume
   is immediately invoked. However, this races with the
   callbacks, which are also immediately invoked. If the
   callbacks won the race, mNetwork would not be set and they
   would be ignored.

2. Call updateInfo in onResume instead of in displayPreference.
   This ensures that it's always called exactly once before the
   activity starts running, regardless of whether it's being
   displayed the first time (i.e., after onStart) or resumed
   by switching from another app. displayPreference is only
   called in the former case.

3. Don't call getLinkProperties and getNetworkCapabilities in
   updateInfo. These calls are superfluous, because this
   information is update by the NetworkCallbacks, and they can
   cause jank because updateInfo is called on the UI thread.

This requires that the tests be changed so they always call
onResume, since no UI elements are populated until onResume is
called.

Bug: 62209358
Test: make -j64 RunSettingsRoboTests
Change-Id: Iccb1b9ae51188755d890a6df83004dbe9bec565e
2017-06-06 11:39:17 +09:00
jackqdyulei
e3e8bd6317 Refactor anomaly detection
This cl refactor it so:
1. AnomayLoader could create its own BatteryStatsHelper if needed.
2. AnomalyDetector could detect the anomaly with a target package name
3. Remove FeatureProvider in AnomalyLoader and use
AnomalyDetectionPolicy instead

With this cl, we could add anomaly detection to battery usage page
more easily.

Bug: 36924669
Test: RunSettingsRoboTests
Change-Id: I1ee09701de8b5c8855f44e447813760285794c89
2017-06-05 19:35:22 -07:00
jackqdyulei
0686f63083 Merge "Make footer preferences non-clickable by default" into oc-dev
am: 8fbb0bc1f2

Change-Id: Idd493f97773816dc4cc1c759bc5465a2b7f4b04f
2017-06-06 02:05:09 +00:00
TreeHugger Robot
641dfa348f Merge "Import translations. DO NOT MERGE" 2017-06-06 02:04:23 +00:00
TreeHugger Robot
90ef8cea69 Merge "Add ability to see both battery estimates on long press" 2017-06-06 01:58:17 +00:00
TreeHugger Robot
8fbb0bc1f2 Merge "Make footer preferences non-clickable by default" into oc-dev 2017-06-06 01:54:00 +00:00
TreeHugger Robot
5bf8d87454 Merge "Add a new Bluetooth device details page" 2017-06-06 01:28:54 +00:00
Lorenzo Colitti
844c385c09 Merge changes I23540440,I67269e1a into oc-dev
am: 4249a7092b

Change-Id: Ic8383cce733c5767b133af0e9f85e213e0c36018
2017-06-06 01:27:32 +00:00
Doris Ling
c6a282183b Remove call to WifiManager.setWifiApEnabled(). am: f38ed2fbb2
am: 802db8a844

Change-Id: If6e76b06e014d2c3e3eadf60c4bc2ff8e6a50607
2017-06-06 01:24:38 +00:00
Lorenzo Colitti
4249a7092b Merge changes I23540440,I67269e1a into oc-dev
* changes:
  When validation state changes, update the AP summary.
  Minor tweaks to WifiDetailPreferenceControllerTest.
2017-06-06 01:22:08 +00:00
Doris Ling
1104b94dbc Merge "Also update flip camera settings for managed profile." into oc-dev
am: 051a83d909

Change-Id: I4ba1750948815233ef6a963ddde1ca0bd33bcdec
2017-06-06 01:15:51 +00:00
Doris Ling
802db8a844 Remove call to WifiManager.setWifiApEnabled().
am: f38ed2fbb2

Change-Id: I255679d0eaeaa94d2ac6e5caddf4c6f5a5581bc1
2017-06-06 01:15:10 +00:00
TreeHugger Robot
051a83d909 Merge "Also update flip camera settings for managed profile." into oc-dev 2017-06-06 01:12:29 +00:00
Matthew Fritze
6fa75da66d Update the no-results icon in settings search
Bug: 36597112
Test: Open settings, search for 'battle toads', and see the no results icon
Change-Id: I7196114ecaf733747237202d30dd1b47ad37d97e
2017-06-05 17:53:14 -07:00
Fan Zhang
ab0a0c8202 Prevent showing multiple keyguard dialog in vpn setup UI
Change-Id: If3a0d4ee285bfdde5f4b84bee58d62708071fe75
Fix: 37552190
Test: make RunSettingsRoboTests
2017-06-05 17:42:53 -07:00
TreeHugger Robot
a1f10d2888 Merge "Update support strings in Settings" 2017-06-06 00:01:30 +00:00
Doris Ling
fed8ea8bce Also update flip camera settings for managed profile.
When user update the setting for flip camera, check if there is managed
profile for the user, and update the setting for the managed user id as
well, so that the work profile camera app can read the correct setting
value.

Change-Id: I757041289329870311bc8473b19fd49ecdd0fadb
Fix: 62078588
Test: make RunSettingsRoboTests
2017-06-05 16:27:12 -07:00
Salvador Martinez
f4727ea07f Add ability to see both battery estimates on long press
If the enhanced estimate is being used in battery settings
it is now possible to long press on the text to have it display
both instead of the string that is normally used.

Adds another loader to enable this since it needs both the old
and the new estimates simultaneously.

Feature is hidden behind a feature flag that only googlers will
have enabled.

Test: robotests
Bug: 38399275
Change-Id: I5caf26513baada27efd50ddb0e72d3868da47150
2017-06-05 16:26:32 -07:00
Fan Zhang
cc07043497 Ensure wifi ssid cannot exceed 32 bytes.
Change-Id: I5c2c50ca8599f6843da47c01b9a0447e2c85d763
Fix: 36898746
Test: make RunSettingsRoboTests
2017-06-05 16:21:09 -07:00
Doris Ling
f38ed2fbb2 Remove call to WifiManager.setWifiApEnabled().
- replace it with ConnectivityManager.stopTethering() instead.

Change-Id: I112863b1be37c0fef5d59c16d73f0c6cf71c6dea
Fix: 62191978
Test: make RunSettingsRoboTests
2017-06-05 23:00:46 +00:00
Salvador Martinez
bbf6cb7b94 Update support strings in Settings
String change CL for support strings in settings.

Test: image attached, robotests still pass
Bug: 62145221
Change-Id: Ib10998374be961e42ab6994a7b32e521c49c4652
2017-06-05 15:17:20 -07:00
TreeHugger Robot
5999ea8f15 Merge "Move UsageGraph from SettingsLib to Settings." 2017-06-05 22:13:52 +00:00
TreeHugger Robot
0c5e3854bd Merge "Bluetooth: Always scan while on pairing or DevicePicker page" 2017-06-05 22:11:42 +00:00
Malcolm Chen
e4e5fa9ca0 Updates strings for "Emergency broadcast".
Replace "Emergency broadcast" with "Emergency alerts" to be
consistent.

Test: manual
Bug: b/62291344
Change-Id: I79d6f1162d4c112dedf49a3b43ec26011adba9bf
2017-06-05 14:51:37 -07:00
Fan Zhang
179645eecd Add help url placeholders for new pages
Bug: 38412798
Test: visual
Change-Id: I4ede523cb13790ea05309279f80a778b2086f850
2017-06-05 14:50:01 -07:00
Maurice Lam
cb57cf781d Merge "Show fingerprint text in backup screen lock" 2017-06-05 20:53:27 +00:00
Daniel Nishi
9f84622be4 Band aid to fix overly long text in donut.
In the Storage Settings, if the text is too long, it will overlap with
the donut. After discussing with UX, we've opted to shrink the text in
the extenuating circumstances. This is because this text is more of a
helper and the full information is on the left.

Bug: 38030457
Test: Manual with Telugu
Change-Id: I18bcaaae74d049c42eaff50868d3861ae258839d
2017-06-05 13:22:26 -07:00
Alex Kulesza
c661098ab8 Move UsageGraph from SettingsLib to Settings.
In preparation for modifying the graph code to show detailed projections
(see bug), this change moves it into Settings along with related tests
and resources.

Bug: 38400320
Test: manual, make SettingsUnitTests, make SettingsGoogleUnitTests
Change-Id: I88e5336c15827727b3427e29b10954bba9cfba7d
2017-06-05 15:43:18 -04:00
Jack He
c11af01481 Bluetooth: Always scan while on pairing or DevicePicker page
* Modified DeviceListPreferenceFragment to have enable/disable scanning
  methods. In ENABLE state, each onScanningStateChanged(false) will
  restart another round of scanning
* Subclasses of DeviceListPreferenceFragment should call enable/disable
  scanning when scanning is needed for long period of time
* Currently, BluetoothPairingDetail and DevicePickerFragment call
  enableScanning() when Bluetooth is turned ON and call disableScanning
  when some device is picked in their lists
* Both BluetoothPairingDetail and DevicePickerFragment will re-enable
  scanning if pairing failed for selected device
* Added associated unit tests as well

Bug: 32172815
Test: make, pair Bluetooth device, send file over Bluetooth Opp
Change-Id: I99325e06aadd7b00e7a7ba6d6c282a6831859d8b
2017-06-05 12:13:46 -07:00
Fan Zhang
fe23da579d Misc layout fixes
- Apply entity header effect to battery summary screen.
- BidiWrap wifi ap name is it's correctly displayed in RLT languages
- Remove footer preference layout - settingslib already has one

Fix: 62039146
Fix: 62138362
Fix: 37920219
Test: make RunSettingsRoboTests

Change-Id: Idf1385ee40772c63075e5f81eb039c6da56256ab
2017-06-05 11:25:49 -07:00
Maurice Lam
b49526ee28 Show fingerprint text in backup screen lock
When setting up fingerprint's backup screen lock, show a different
header text that says
"To use fingerprint, set {PIN/pattern/password}" instead of
"Choose your {PIN/pattern/password}".

Test: Manual. Existing tests pass
Bug: 62187833
Change-Id: If1084e64b99291a0eda63c174793b5a091ab4bae
2017-06-05 18:22:14 +00:00
Antony Sargent
04a3b2199e Add a new Bluetooth device details page
Bug: 35877479
Test: make RunSettingsRoboTests

The existing behavior is to bring up a dialog with Bluetooth device
details with checkboxes for each supported profile. This adds a new page
that serves the same purpose with a switch for each profile and a footer
containing the MAC address.

Whether to use the new page or old dialog is controlled by a flag
accessible via BluetoothFeatureProvider.

Change-Id: I026c363d4cd33932a84017a67cbef51c258bad10
2017-06-05 11:17:06 -07:00
jackqdyulei
6772f5a2c2 Make footer preferences non-clickable by default
cherry-picked from ag/2301717

Both the footer preference and the TextView they contain
were clickable, which confused some accessibility services.

Bug: 62050563
Test: Verified that switch access no longer offers users
the option of clicking on the footer for accessibility
services and Magnification as well as in the Battery
settings screen.

Change-Id: I5cb13d6268466c690dd38f2b652422d2c3d813b4
Merged-In: I937340fda93f6a8097919e1f86d5d890487370bc
2017-06-05 10:44:34 -07:00
Lei Yu
2be17c0dcd Merge "Use new time format in BatteryInfo" 2017-06-05 17:19:05 +00:00
Julia Reynolds
d85ff59ce7 String changes
- channel summaries
- Notification listener name
- notifications app page title

Change-Id: I0745c06aad44bfa7636ee2b10be9387313093fe3
Fixes: 36529184
Fixes: 38178073
Test: manual
2017-06-05 11:05:43 -04:00
Lorenzo Colitti
2561df8083 When validation state changes, update the AP summary.
This stops the AP summary from getting stuck on "Connected, no
Internet" even when the system has validated Internet access.

Bug: 62209358
Test: make -j64 RunSettingsRoboTests
Change-Id: I235404408f7d8b958653d25656d97da8206e35ce
2017-06-04 23:00:47 +09:00
TreeHugger Robot
73fc34b780 Merge "Update suggestion rules and string description" 2017-06-04 03:24:53 +00:00
Fan Zhang
af91c1f6bf Update suggestion rules and string description
Change-Id: I55025094b9a0e71710db726bcf7fc810a3705c65
Fix: 62262851
Fix: 62283797
Test: make RunSettingsRoboTests
2017-06-03 18:05:15 -07:00
Android Build Merger (Role)
8cf066e34a Merge "Merge "ConditionManager: don't crash when trying to add unexpected condition" am: 46f7199cb1 am: 6270dce2cd am: 7151be926d am: ecc7355bde" 2017-06-04 00:10:37 +00:00
TreeHugger Robot
7c7cdfd3f9 Merge "Add a suggestion: showing new device features" 2017-06-04 00:10:31 +00:00
Thecrazyskull
07a97c7d8a Merge "ConditionManager: don't crash when trying to add unexpected condition" am: 46f7199cb1 am: 6270dce2cd am: 7151be926d
am: ecc7355bde

Change-Id: Ic422ded3965a9f8bc3cafb7cbf0b1e4585142672
2017-06-04 00:10:11 +00:00
Thecrazyskull
ecc7355bde Merge "ConditionManager: don't crash when trying to add unexpected condition" am: 46f7199cb1 am: 6270dce2cd
am: 7151be926d

Change-Id: I16805427f0d053c6d1c5975275f00cb0ed1c9cbb
2017-06-04 00:04:25 +00:00
Thecrazyskull
7151be926d Merge "ConditionManager: don't crash when trying to add unexpected condition" am: 46f7199cb1
am: 6270dce2cd

Change-Id: Ie8ce734935d9950c515675710772aa5f3c80c988
2017-06-04 00:00:25 +00:00
Thecrazyskull
6270dce2cd Merge "ConditionManager: don't crash when trying to add unexpected condition"
am: 46f7199cb1

Change-Id: Ifd9394c6da48a88ddb6f59ead3db1c93519a70ac
2017-06-03 23:55:52 +00:00
Treehugger Robot
46f7199cb1 Merge "ConditionManager: don't crash when trying to add unexpected condition" 2017-06-03 23:49:39 +00:00
Mikhail Malakhov
63907a7744 Merge "Sometime, Settings app crash when AllowBindAppWidgetActivity closing" am: c7697e9b8a am: 933cdd5503 am: 0730393097
am: 38382a44b0

Change-Id: I845582c9c044cab4a2abfdf19ee6ca5f037de4cb
2017-06-03 22:31:29 +00:00
Mikhail Malakhov
38382a44b0 Merge "Sometime, Settings app crash when AllowBindAppWidgetActivity closing" am: c7697e9b8a am: 933cdd5503
am: 0730393097

Change-Id: Ia65d7c966350dac44a1d15a5781d051df8d464cd
2017-06-03 22:24:50 +00:00
Mikhail Malakhov
0730393097 Merge "Sometime, Settings app crash when AllowBindAppWidgetActivity closing" am: c7697e9b8a
am: 933cdd5503

Change-Id: I0fbdadf1b42543936f3ed657b52da23978a0fe16
2017-06-03 22:20:48 +00:00
Mikhail Malakhov
933cdd5503 Merge "Sometime, Settings app crash when AllowBindAppWidgetActivity closing"
am: c7697e9b8a

Change-Id: Ic9bdabec50ba8b72656c0d5fc0b56551ad3a46cb
2017-06-03 22:16:48 +00:00
Treehugger Robot
c7697e9b8a Merge "Sometime, Settings app crash when AllowBindAppWidgetActivity closing" 2017-06-03 22:11:13 +00:00