Commit Graph

2577 Commits

Author SHA1 Message Date
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
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
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
TreeHugger Robot
5999ea8f15 Merge "Move UsageGraph from SettingsLib to Settings." 2017-06-05 22:13:52 +00: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
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
Lei Yu
2be17c0dcd Merge "Use new time format in BatteryInfo" 2017-06-05 17:19:05 +00: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
Fan Zhang
9011a67431 Add a suggestion: showing new device features
- New suggestion activity
- Removed useless api SuggestionFeatureProvider.isPresent().

- Also updated support activity search indexing icon and summary

Change-Id: Ib52cf26a985f57bf0aac918606b10f75bd024639
Fix: 62034077
Fix: 62196070
Test: make RunSettingsRoboTests
2017-06-03 14:51:09 -07:00
TreeHugger Robot
75c1fcb7fb Merge "Combine settings suggestion and condition." 2017-06-03 18:49:54 +00:00
Phil Weaver
8fcf4d8349 Adjust a11y shortcut settings based on UX input
Disabling the shortcut if no service is configured, so we
users won't see an "On" unless the shortcut will have an
effect.

If no service is configured and the user tries to enable
the shortcut, the service picking UI is shown. If the user
chooses a service, the shortcut turns on. If not, the
shortcut remains off.

Service selection is disabled when the shortcut is disabled
(except for the specific case above).

Lock screen behavior selection is disabled when the shortcut
is disabled.

Also updating a couple of strings based on UX input.

Adding an AOSP header to a file that somehow got checked in
without one.

Fixes: 37443184
Fixes: 38030853

Test: Manually went through the various combinations of
shortcut on and service enabled. I turned off the default
selection of TalkBack as the shortcut service to ensure
that we show a dialog when no service is selected.

Change-Id: Iac5cff12edea91a496fc81781518db4ae49ef334
2017-06-02 16:10:13 -07:00
jackqdyulei
214372be19 Use new time format in BatteryInfo
1. Using "h" and "m" instead of "hrs" and "min"
2. Refactor the string to CharSequence so it won't have
TTS issue(i.e read "m" as "meter")
3. Update tests related to this part.

Bug: 37201139
Test: RunSettingsRoboTests
Change-Id: I9cadb511572b2d522d26ab337c171fa69da87475
2017-06-02 15:15:16 -07:00
Doris Ling
83a6621b38 Combine settings suggestion and condition.
- Add a flag in dashboard feature provider to specify whether to use the
combined UI for suggestions and conditions.
- Move Conditions below Suggestions.
- Add dashboard entity for condition and suggestion container, and
  wrap the condition and suggestion list inside the container. The
  container itself will be a single dashboard item, and within it will
  be the list of suggestion or condition.
- Add suggestion/condition header that will show the combined info for
  the conditions and suggestion data, and have the expand button to
  control expanding both the suggestion and condition list.
- Change the individual condition card to be always expanded, and
remove the logic to collapse/expand individual condition card.
- Remove the divider between the action button and condition detail
  within each condition card.
- Add suggestion/condition footer for collapsing the whole suggestion and
  condition list.

Bug: 37645754
Test: make RunSettingsRoboTests
Change-Id: I86df75f7e4551778f79d730851c03121fd0dcbdf
2017-06-02 14:59:48 -07:00
Lei Yu
64c87589c5 Merge "Restart loader in onResume" into oc-dev
am: 74ca6aa060

Change-Id: I4cc76a8eeee55335bd6a4ab7d6870084ec609f9b
2017-06-02 19:29:09 +00:00
Lei Yu
74ca6aa060 Merge "Restart loader in onResume" into oc-dev 2017-06-02 19:21:29 +00:00
Soroosh Mariooryad
733bbf7c34 Updating the search ranking API and some improvements:
- Ranking API is modified to run the ranking asynchronous to the main thread.
Therefore, it can now run in parallel to loading the results from DB
which decreases the overall latency.
- Ranking API now supports reporting failure from the ranker
implementation side.
- Settings that are not ranked by the ranker algorithm are now ranked at
the end of the list. This is added for dynamic settings (e.g., apps).
- Failure handling mechanism is added for cases that ranker catches an
exception or it takes a long time to respond.

Bug: 37312700
Fixes: 36866337
Fixes: 36867476
Fixes: 36866736
Fixes: 36866838

Test: RunSettingsRoboTests

Change-Id: I3a2a97e3a07a8d4afbb090061d92172a27588ee7
2017-06-02 12:09:20 -07:00
TreeHugger Robot
3c292444b0 Merge "Simplify InlineSwitchPayloads and generalize get/set method" 2017-06-02 18:06:49 +00:00
jackqdyulei
ee01dcc74a Restart loader in onResume
We need to refresh batterystatsHelper in onResume, so we need to
call restartLoader instead of initLoader

Bug: 62237848
Test: RunSettingsRoboTests
Change-Id: I6f7e1b57b945c92d34587ca24db192600e7f797f
Merged-In: I6f7e1b57b945c92d34587ca24db192600e7f797f
2017-06-02 10:21:32 -07:00
Matthew Fritze
2b1a88da3d Simplify InlineSwitchPayloads and generalize get/set method
InlineSwitchPayload now assumes that all switches will be
stored as 1 or 0, which simplifies the code.

Moves Availability into ResultPayload, so that custom
payloads can be created to set/get values which are more
complicated than stotring ints (like bluetooth or DnD),
and give more expressive reasons when unavailable.

Bug: 62022517
Test: make RunSettingsRoboTests
Change-Id: I87e6fc041bfd398e7daf6e6e479d502930d36f0f
2017-06-02 08:23:45 -07:00
Bartosz Fabianowski
98b216dc05 Hide "Changes made by your organization's admin" when empty
am: 493495452a

Change-Id: Ided6278456fe5ffdbb843717a1ec7070e7a3d3dc
2017-06-02 13:30:12 +00:00
Bartosz Fabianowski
493495452a Hide "Changes made by your organization's admin" when empty
The admin of a manged device can take a number actions that will be
listed in the "Changes made by your organization's admin" section of
Settings. If the admin has not taken any such actions, the section
will be empty and should be hidden. This is accomplished by having a
PreferenceController for the section that observes the state of the
PreferenceControllers inside it.

Bug: 35912953
Test: m RunSettingsRoboTests

Merged-in: Ia95754493ee6c5a19b4aa9731fd56fd558e61849

Change-Id: I82ca00b757001390f9a517b0c07057bdc49dab20
2017-06-02 13:45:40 +02:00
Bartosz Fabianowski
55038c0a95 Hide "Changes made by your organization's admin" when empty
The admin of a manged device can take a number actions that will be
listed in the "Changes made by your organization's admin" section of
Settings. If the admin has not taken any such actions, the section
will be empty and should be hidden. This is accomplished by having a
PreferenceController for the section that observes the state of the
PreferenceControllers inside it.

Bug: 35912953
Test: m RunSettingsRoboTests

Change-Id: Ia95754493ee6c5a19b4aa9731fd56fd558e61849
2017-06-02 11:40:41 +02:00
Lorenzo Colitti
beafc36360 Minor tweaks to WifiDetailPreferenceControllerTest.
Add makeNetworkCapabilities and updateNetworkCapabilities
methods, and use them. These are not very useful in the current
code but we introduce in their own CL to limit test changes in an
upcoming CL that will make use them to test new code.

Bug: 62209358
Test: make -j64 RunSettingsRoboTests
Change-Id: I67269e1add40ecb3c2b693548e8bf29ae776a79f
2017-06-02 17:56:52 +09:00
Esteban Talavera
c62ce670c3 Merge "Include disabled managed profiles in Accounts page" into oc-dev am: 92f78354f9
am: 42d97f86c2

Change-Id: If2708bc27673b50dfdf7faa3300944d8bdb47b60
2017-06-02 08:42:50 +00:00
Esteban Talavera
42d97f86c2 Merge "Include disabled managed profiles in Accounts page" into oc-dev
am: 92f78354f9

Change-Id: I3dc5fd6bb4c7466b204946db179b10d9a3c9ccdf
2017-06-02 08:38:51 +00:00
Esteban Talavera
92f78354f9 Merge "Include disabled managed profiles in Accounts page" into oc-dev 2017-06-02 08:33:17 +00:00
Lorenzo Colitti
5692d23042 Merge changes from topic 'wifi_detail_jank' into oc-dev am: 0187221bd8
am: cc347f4e14

Change-Id: Idf82b916ae8121b837b7113af7ab182640124814
2017-06-02 06:27:13 +00:00
Lorenzo Colitti
cc347f4e14 Merge changes from topic 'wifi_detail_jank' into oc-dev
am: 0187221bd8

Change-Id: I7873b3f06b40e416b89b44615e9fe28a5b3c7a29
2017-06-02 06:18:13 +00:00
TreeHugger Robot
0187221bd8 Merge changes from topic 'wifi_detail_jank' into oc-dev
* changes:
  Reduce jank in the wifi detail status page.
  Improve testing of IP address display code.
2017-06-02 06:11:52 +00:00
TreeHugger Robot
d2cf668700 Merge "Make BatterySettings Asynchronous and use enhanced estimate" 2017-06-02 02:48:23 +00:00
Salvador Martinez
9cfa7720f4 Make BatterySettings Asynchronous and use enhanced estimate
this CL changes BatteryInfo methods to all use the async style
callback approach it had for one of the methods. Non-async methods
are now annotated to only be used in worker threads. BatteryInfo
can now be obtained via callback by calling one of the async
methods. Alternatively if there is a worker thread available
the synchronous methods similar to the old ones can be used.

The callback methods have all been changed so that they cascade to a
async method that takes all the required info as paremeters. This
will minimize the amount of churn in files that currently use
BatteryInfo.

A new loader was created that can be used to get BatteryInfo in
places that wish to get it. This loader is used in
PowerUsageSummary to get the BatteryInfo.

Test: Robotests
Bug: 38399275
Bug: 38398949
Bug: 38399654
Change-Id: Ic5a82d8ca4c85fad1b883226327ec083badf861d
2017-06-01 18:03:53 -07:00
TreeHugger Robot
ec3e297453 Merge "Restart loader in onResume" 2017-06-02 00:32:23 +00:00
TreeHugger Robot
31d5b3de6f Merge "Add strings in battery usage page" 2017-06-01 23:38:43 +00:00
jackqdyulei
210110f4ed Restart loader in onResume
We need to refresh batterystatsHelper in onResume, so we need to
call restartLoader instead of initLoader

Bug: 62237848
Test: RunSettingsRoboTests
Change-Id: I6f7e1b57b945c92d34587ca24db192600e7f797f
2017-06-01 15:57:08 -07:00
Andrew Sapperstein
0a35757003 Merge "Add search bar to SearchActivity." into oc-dev
am: fbc9035bcd

Change-Id: I63823bc03fe97fe683c9775b1b28f5cc770ae4e7
2017-06-01 22:17:44 +00:00
TreeHugger Robot
fbc9035bcd Merge "Add search bar to SearchActivity." into oc-dev 2017-06-01 22:02:32 +00:00
TreeHugger Robot
8d9177a06e Merge "Hide saved network preference when there is none." 2017-06-01 21:41:39 +00:00
jackqdyulei
040c21bcb5 Add strings in battery usage page
Add prefix:
1. "Used for" for foreground time
2. "Active for" for background time

Bug: 37162357
Test: RunSettingsRoboTests
Change-Id: Ifd4762640bd5ad98ce64ab174f7a7f44dbb1aa27
2017-06-01 14:38:00 -07:00
Matthew Fritze
752b18191b Merge "Prevent crash when removing duplicates" into oc-dev
am: 7a148b9e09

Change-Id: I9ea047489b44bc538033343a6350a5abb8afef63
2017-06-01 21:24:36 +00:00
TreeHugger Robot
7a148b9e09 Merge "Prevent crash when removing duplicates" into oc-dev 2017-06-01 21:12:11 +00:00
Fan Zhang
7d190dd69d Merge "Add method to disable "disable" button in installed app UI" into oc-dev
am: e12790e34f

Change-Id: I4a5223a27c98f7ae9422fb017f4206721080890a
2017-06-01 20:28:34 +00:00
TreeHugger Robot
e12790e34f Merge "Add method to disable "disable" button in installed app UI" into oc-dev 2017-06-01 20:24:06 +00:00