Commit Graph

44113 Commits

Author SHA1 Message Date
TreeHugger Robot
ac951a69aa Merge "Disable hidden network spinner on existing networks" into pi-dev 2018-04-23 21:38:55 +00:00
Lei Yu
4bfbaa6047 Update insert method for battery database
1. Add conflict code to ignore the confliction and return -1 when
insert fails.
2. Add boolean return value to show whether insert sucessfully
3. Add unit test. We don't write robo test because robolectirc use
"update" to shadow "insert" operation, which returns the wrong data.

Bug: 77968649
Test: SettingsUnitTest
Change-Id: Ibd3b53cdb1796d74ea4a2ca1f067e2b302b939e9
2018-04-23 13:13:56 -07:00
Lei Yu
0fcddc77c7 Add primary key for anomaly database.
In this case it won't insert the duplicate data. We don't do migration since
anomaly database only contains transient data.

Bug: 77968649
Test: test still pass
Change-Id: I638564d89ead008ec184b9a4db137436d47df5bc
2018-04-23 13:08:33 -07:00
Salvador Martinez
35b76437e0 Disable hidden network spinner on existing networks
We only want this to be modifiable if you are adding a network
manually, so this CL disables it for existing networks. You
can still see what the spinner is set to though.

Test: robotests
Bug: 78436456
Change-Id: If660e432eca2dabf5bd16881368657ee89fe5a57
2018-04-23 10:50:22 -07:00
Lei Yu
69c370f594 Don't show high usage tip when device is charing
The summary is "Battery may run out soon", it doesn't make sense
when device is charging.

Change-Id: I27394c8a75dac4dcad171e5e215102d39cb33546
Fixes: 78261389
Test: RunSettingsRoboTests
2018-04-23 10:10:20 -07:00
Lei Yu
f6e2c19fcc Merge "Fix bugs in auto restriction." into pi-dev 2018-04-23 17:03:39 +00:00
Lei Yu
10280a53b0 Merge "Fix the bug using wrong TimeUnit" into pi-dev 2018-04-23 16:59:47 +00:00
TreeHugger Robot
bb839f81e3 Merge "Pick default notification setting for work profile" into pi-dev 2018-04-23 16:38:43 +00:00
TreeHugger Robot
77e716e463 Merge "Import translations. DO NOT MERGE" into pi-dev 2018-04-21 05:09:44 +00:00
TreeHugger Robot
524babb389 Merge "Catch exception when failing to create slice" into pi-dev 2018-04-21 02:03:49 +00:00
Fan Zhang
0e5a3273af Catch exception when failing to create slice
- Created a non-generic exception type when failing SliceData.build()
- Catch exception and log error instead of crash.
- Added a presubmit test

Fixes: 78347031
Test: robotests, atest
Change-Id: I06e528cb5e1cd328f82f9561553f3c4b5b0bed26
Merged-In: I06e528cb5e1cd328f82f9561553f3c4b5b0bed26
2018-04-20 23:55:39 +00:00
Lei Yu
4c94926ba5 Fix the bug using wrong TimeUnit
It should use DAYS, not HOURS.

Change-Id: I26784822c86e58cad93d35b6772ea54af7efb8f5
Fixes: 78362305
Test: RunSettingsRoboTests
2018-04-20 16:45:02 -07:00
TreeHugger Robot
2f911e2e9e Merge "Add keywords to Slices" into pi-dev 2018-04-20 23:30:18 +00:00
Salvador Martinez
681353f725 Merge "Update settings main page battery string" into pi-dev 2018-04-20 23:27:25 +00:00
Matthew Fritze
47a44e8fa4 Add keywords to Slices
Attach the keywords used for Settings search to Slices.
Their primary use is helping match synonyms for presenters
which display slices without explicit Uri requests, like a launcher.

This changes:
- Updates database scheme
- Adds to SliceData object
- Grab keywords in the SliceDataConverter
- Set keywords on all slices

Test: robotests
Change-Id: I16c40d2380ffddaf0a87fb1b9cd58e95573b308f
Fixes: 78306195
2018-04-20 14:50:55 -07:00
Jeff Sharkey
b9a1ebcb45 Increase volume search timeout, fix dialog flow.
Slower devices can take longer to process kernel events, so try up
to 25 times (~6 seconds) to find the volume after the partitioning
is finished.

Fix bug where we'd finish() while trying to show the format
confirmation dialog, meaning users couldn't format corrupted
non-primary volumes.

Bug: 74129968, 77849654, 74132243
Test: atest com.android.settings.ui.StorageWizardTest
Change-Id: I91144051cb6de0cd944d93b03dc5127676e24be8
2018-04-20 14:34:31 -06:00
Lei Yu
252d4e1fc0 Fix bugs in auto restriction.
1. Dismiss this tip once user clicks it and goes to detail page.
2. In auto restriction, since apps are automatically restricted,
we need to remove apps in list that unrestricted by user.
3. Refactor the code to remove the unnecessary parameter(i.e.
SettingsActivity)

Bug: 78187414
Test: RunSettingsRoboTests
Change-Id: I1c950f7c55df35795641c2ea8579ce9e011dba28
2018-04-20 12:55:53 -07:00
Bill Yi
4bcbd46e0d Import translations. DO NOT MERGE
Auto-generated-cl: translation import

Bug: 64712476
Change-Id: I93f8c6f0051cf15e218d1c761c300c7e16109165
2018-04-20 10:37:50 -07:00
Julia Reynolds
5766d6e443 Collapse notification advanced settings
Leave footers visible outside of advanced

Test: visual inspection
Fixes: 77324998
Fixes: 38011858
Change-Id: I2d6fcb832b134bc97081f03a3ab38d593e943f76
2018-04-20 13:24:45 -04:00
Rubin Xu
c33e2a1cef Switch to new checkPasswordHistory method
This is part of the fix that upgrades the hashing of password history
to a more secure design.

Bug: 32826058
Test: manual
Change-Id: Ib022c8db1f7b63f75b69d0177fa5f6be528a83c5
2018-04-20 18:09:59 +01:00
Pavel Grafov
c29b984a98 Pick default notification setting for work profile
Managed profiles cannot completely hide notifications, so
this setting should be treated as always "true" for them.

Change-Id: I9808c1e9736d83efccb0e947d9097379bda59ebb
Fixes: 78194020
Test: atest RedactionInterstitialTest
2018-04-20 16:29:37 +01:00
Julia Reynolds
3bdd65e255 Merge "Fix crash on rotation" into pi-dev 2018-04-20 13:30:28 +00:00
TreeHugger Robot
ff2653a0d8 Merge "Update Slice APIs to current versions" into pi-dev 2018-04-20 03:11:14 +00:00
TreeHugger Robot
96d4cd3c61 Merge "Make WifiTether listen to datasaver" into pi-dev 2018-04-20 02:57:04 +00: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
TreeHugger Robot
be22830fde Merge "Fix Network details title not being translated." into pi-dev 2018-04-20 00:50:34 +00:00
TreeHugger Robot
21a34488ba Merge "Fix limit data usage dialog body not being translated." into pi-dev 2018-04-20 00:43:58 +00:00
TreeHugger Robot
35d1d43bb3 Merge "Adjust comment on data over usage string." into pi-dev 2018-04-20 00:36:43 +00:00
Matthew Fritze
f9f72e8c2c Update Slice APIs to current versions
Change-Id: Icf40673e518534487be77f33427df937717735e5
Fixes: 77982356
Test: robotests
2018-04-19 17:29:18 -07:00
TreeHugger Robot
3fff843e57 Merge "Fix App data usage title not being translated." into pi-dev 2018-04-20 00:18:27 +00:00
TreeHugger Robot
d9abb0e914 Merge "Update Wifi Tether band selection UI" into pi-dev 2018-04-20 00:15:45 +00:00
Fan Zhang
0468f68c02 Merge "Format number to local locale." into pi-dev 2018-04-20 00:01:01 +00:00
Doris Ling
dad557305e Fix Network details title not being translated.
- use the title resource id instead of the actual string in the launch
intent so that it can react to language change.

Change-Id: I424dc026a9298d12627c05f97f27e9d4cba5a341
Fixes: 77896130
Test: run i18nscreenshots
2018-04-19 16:49:35 -07:00
Doris Ling
689bb2c27c Fix limit data usage dialog body not being translated.
- need to pass the resource id instead of the text when building the
dialog in order for it to react to language change.
- also remove the unnecessary set/get the body message in the dialog
creation since the msg id can be used directly.

Change-Id: I399dcda54961fac457fc5f0fad9082f2c1e1a2b2
Fixes: 77897157
Test: run i18nscreenshots
2018-04-19 16:35:28 -07:00
Sundeep Ghuman
201d6ffcdb Adjust comment on data over usage string.
Bug: 75981328
Test: NA
Change-Id: I393ab6637d563a34e9cea2da2b9c29e32efb056f
2018-04-19 16:20:30 -07:00
Doris Ling
6784296248 Fix App data usage title not being translated.
- we need to pass the title resource id instead of the actual text in
the launch intent in order for it react to language change properly.

Change-Id: I72ccbe67411c9f4da328dd24671f4e71ab927851
Fixes: 77898325
Test: run i18nscreenshots
2018-04-19 16:09:58 -07:00
Fan Zhang
040df90c50 Format number to local locale.
Change-Id: Iffa91eb8c40f09e5ac4cce10f355e348e62d8fce
Fixes: 78134172
Test: robotests
2018-04-19 15:54:39 -07:00
Salvador Martinez
10ba9c1786 Update Wifi Tether band selection UI
This CL updates the preference for selecting the enabled tether bands
to allow individual selection of multiple bands instead of forcing
a single selection. Note that while this makes the UI theoretically
support new bands in the future, the wifi backend only supports
selecting a single band or all bands which this CL does not address.

Test: robotests
Bug: 73102003
Change-Id: Ib2d4a2834c5cd11875515d308f7b20bfc8471959
2018-04-19 13:37:09 -07:00
Salvador Martinez
dbe38b09cf Merge "Fix restricted fragment dialogs" into pi-dev 2018-04-19 20:09:08 +00:00
Jeff Sharkey
676e86d7fa Merge "Find graceful description when missing disk." into pi-dev 2018-04-19 20:03:24 +00:00
TreeHugger Robot
0454317643 Merge "Updated string char-limits to better match available space for data usage." into pi-dev 2018-04-19 18:28:54 +00:00
Lei Yu
df5beee68b Hook up Adaptive Battery to new flag.
APP_STANDBY_ENABLED is controlled by server side to do experiment.
Before this CL, Adaptive Battery is hooked up to this flag, so
even though if user turns it off, it may be turned on by server.

Add a high level ADAPTIVE_BATTERY_MANAGEMENT_ENABLED to control
the feature in settings UI side.

Bug: 78153913
Test: RunSettingsRoboTests
Change-Id: I1a18d622ddc31ec4d45db918bf981516fbb926c1
2018-04-19 10:46:37 -07:00
Lei Yu
cff99cc2e3 Merge "update checkbox based on FAS API" into pi-dev 2018-04-19 17:01:23 +00:00
Beverly Tai
48831c837f Merge "Can disable checkbox without tint on text" into pi-dev 2018-04-19 16:57:05 +00:00
Jeff Sharkey
d98de2e2da Find graceful description when missing disk.
Certain volumes (like internal storage) don't have a corresponding
DiskInfo object, so we need to fall back to using the VolumeInfo
description instead.

Bug: 77991425
Test: atest com.android.settings.ui.StorageWizardTest
Change-Id: I92d377035b6028dd31527100da54bfb1d1828ae9
2018-04-19 09:45:31 -06:00
Julia Reynolds
e2897aedf5 Fix crash on rotation
Load app/channel data early so that any open dialogs can be properly
reconstructed. Never call done on an entityheadercontroller with
an activity that's not yet started.

Test: robotests
Change-Id: Ib2b9f8f1985ef038959062204aaceff686f4ebcf
Fixes: 74114917
2018-04-19 10:17:23 -04:00
Beverly
49f7f8137f Can disable checkbox without tint on text
Fixes: 76101594
Test: DisabledCheckBoxPreferenceTest, ZenModeVisEffectPreferenceControllerTest
Change-Id: Ida92c7d94f788404d9cd48f07e779446d9ac0d54
2018-04-19 09:27:22 -04:00
TreeHugger Robot
7f50a0c837 Merge "Fix wifi launch intent" into pi-dev 2018-04-19 13:23:20 +00:00
CY Cheng
27b8c6103f Merge "Remove dynamic summaries for "Screen lock"" into pi-dev 2018-04-19 08:29:29 +00:00
Ivan Chiang
f2f03b8198 Add DockUpdaterFeatureProvider and DockUpdater.
Add the new feature components for dock devices.

Bug: 77931823
Test: Build
Change-Id: I219a5256d02f2b1b8ea7cce1cff4219975f2eae2
2018-04-19 16:04:08 +08:00