Commit Graph

2342 Commits

Author SHA1 Message Date
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
TreeHugger Robot
f43f4c3131 Merge "Move BatteryInfo to settings from settingslib" 2017-06-01 20:16:42 +00:00
Andrew Sapperstein
9448f68171 Merge "Initial search bar implementation." into oc-dev
am: 91fe76263f

Change-Id: I7e6921134a239e136aaf6380ab4d7993e943435a
2017-06-01 20:01:49 +00:00
TreeHugger Robot
ee8ac88f82 Merge "Add search bar to SearchActivity." 2017-06-01 19:57:20 +00:00
Andrew Sapperstein
91fe76263f Merge "Initial search bar implementation." into oc-dev 2017-06-01 19:52:07 +00:00
Fan Zhang
015c7706e4 Hide saved network preference when there is none.
We already do this when wifi is enabled. This change brings same
behavior when wifi is off.

Change-Id: I44301fe46a6183735f8be71c80cfe719ad0e82b4
Fix: 62094681
Test: runtest --path tests/unit/src/com/android/settings/wifi/WifiSettingsUiTest.java
2017-06-01 12:38:08 -07:00
jackqdyulei
42790ccd84 Merge "Add method to calculate last full charge time" into oc-dev
am: d4991dc24d

Change-Id: I4d8bd3099f493497adeb9afe42395225d7fb949c
2017-06-01 19:05:44 +00:00
TreeHugger Robot
d4991dc24d Merge "Add method to calculate last full charge time" into oc-dev 2017-06-01 18:55:54 +00:00
Salvador Martinez
0e8c88376c Move BatteryInfo to settings from settingslib
This CL simply moves BatteryInfo from settingslib to settings and
makes sure the tests still pass. No other changes are made other than
imports or minor changes needed to make sure existing code does not
break.

Test: Robotests still pass
Bug: 38399275
Bug: 38398949
Bug: 38399654
Change-Id: I59803348e2780b7676ccc6c43234a586c184d71f
2017-06-01 11:34:08 -07:00
Matthew Fritze
ebd80e68ab Prevent crash when removing duplicates
The method that crashes is removed in O-DR, and thus
does not need to be merged down.

Change-Id: If30bd8bd92d578133984f7f35e7ec5288adfc390
Fixes: 62100634
Test: make RunSettingsRoboTests
Merged-In: Id36f7bf4ceaaa3a2bd326ecafbfe97fd0b247df2
2017-06-01 11:13:37 -07:00
Andrew Sapperstein
fac61b71e5 Add search bar to SearchActivity.
Styling doesn't look exactly right yet but there's a bar.
Creates an ItemDecoration to add a spacer above the first view.

Removes the action bar and replaces it with a SearchView
inside of a CardView.

Remaining work: pixel pushing

Bug: 37477506
Test: make RunSettingsRoboTests
Change-Id: Ibf38c3c2725551bc4cd90e98d0020ec49c2eab2b
Merged-In: I4a0f0c91c51ff5820b61a596520d80a3337c3466
2017-06-01 11:02:56 -07:00
Andrew Sapperstein
893cb0987a Add search bar to SearchActivity.
Styling doesn't look exactly right yet but there's a bar.
Creates an ItemDecoration to add a spacer above the first view.

Removes the action bar and replaces it with a SearchView
inside of a CardView.

Remaining work: pixel pushing

Bug: 37477506
Test: make RunSettingsRoboTests
Change-Id: I4a0f0c91c51ff5820b61a596520d80a3337c3466
2017-06-01 11:01:00 -07:00
Daniel Nishi
1e6b7171ff Merge "Fix a bug where cache was double-counted." into oc-dev am: 7035a41715
am: 0a8b12a30a

Change-Id: I3f17e10a9aaf011aee587dbe0e36d18a3a27c42f
2017-06-01 17:48:41 +00:00
Daniel Nishi
0a8b12a30a Merge "Fix a bug where cache was double-counted." into oc-dev
am: 7035a41715

Change-Id: I2c465b9561cea69e5772efd08af7794f762758ca
2017-06-01 17:42:55 +00:00
Daniel Nishi
7035a41715 Merge "Fix a bug where cache was double-counted." into oc-dev 2017-06-01 17:30:33 +00:00
TreeHugger Robot
9ccd8ab619 Merge "Add search index for support dashboard activity." 2017-06-01 17:03:06 +00:00
Esteban Talavera
9b86e9c822 Include disabled managed profiles in Accounts page
At the moment we include disabled profiles when deciding
whether the Work section needs to be added, and then only
include enabled ones when searching for the managed profile's
user handle

Change-Id: I96b0c36aad6b9326abc2992fa3309716f5cd1e74
Fix: 62021410
Test: m RunSettingsRoboTests
2017-06-01 09:52:45 +01:00
TreeHugger Robot
0a53489248 Merge "Use a common style for custom preference icon layouts" 2017-06-01 08:40:46 +00:00
TreeHugger Robot
181ea4509a Merge "Update bluetooth strings" 2017-06-01 07:25:59 +00:00
TreeHugger Robot
d2b751ebd1 Merge "Add method to calculate last full charge time" 2017-06-01 07:11:37 +00:00
TreeHugger Robot
fca1b78d94 Merge "Initial search bar implementation." 2017-06-01 06:43:22 +00:00
Lorenzo Colitti
0bde06cd59 Reduce jank in the wifi detail status page.
Currently, when anything changes, the wifi detail status page
removes and then redraws all IP address information. This causes
the whole screen to flicker. Instead, only add and remove things
when they actually change.

In order to do this, convert the IPv6 addresses from a list of
Preference objects to a single newline-separated text field.
This removes the need to keep track of addresses as they are
added and deleted, and also looks a bit better.

Also, minor correctness fixes:
- Get the gateway from the default route, not from the last route
  with a non-null gateway.
- Get the IPv4 subnet mask from the IPv4 address prefix, not from
  the last route with prefix length > 0.

Bug: 62171690
Test: make -j64 RunSettingsRoboTests
Test: IP information does not flicker when signal strength changes
Change-Id: Ia9f2a277e53a2800407ae327701c5b95a9eec20a
2017-06-01 12:08:41 +09:00
Fan Zhang
c2b0c7bf31 Use a common style for custom preference icon layouts
Change-Id: Ief3bc54f700cb891041adf92846149c6f41caad0
Fix: 35961001
Test: instrumentation test
2017-05-31 17:09:15 -07:00
jackqdyulei
ab1df0bbd3 Update bluetooth strings
Update based on new change in doc:
1. revert "visible as" string
2. change "device mac" string

Bug: 35876580
Test: RunSettingsRoboTests
Change-Id: I8950ed3e2e9c000ab25ea0a3d0d15f69fc075fda
2017-05-31 16:41:33 -07:00
Christine Franks
c101dda9f7 Merge "Allow FR in carrier demo mode" into oc-dev am: 9ef166a578
am: d974ccb625

Change-Id: I8d693fd2d41f73b53416ee83d7b289496765c660
2017-05-31 22:54:31 +00:00
Christine Franks
d974ccb625 Merge "Allow FR in carrier demo mode" into oc-dev
am: 9ef166a578

Change-Id: I1cc4ed80c31c572b2d091e234c1a41a4dbc9f992
2017-05-31 22:52:57 +00:00
Andrew Sapperstein
048f6fb8b3 Initial search bar implementation.
Replaces the default Toolbar in SettingsActivity with one that looks
like a search bar. It uses a Toolbar inside a CardView with some custom
styling.

Since the search bar is a floating element, the new toolbar lives in the
content frame of the dashboard. A FrameLayout is used to provide the
layering that is desired.

Since the search bar is on top, an additional spacer view is added to
the list of items in the dashboard. Its color changes based on what
the first view is so that it always matches.

Adds android-support-v7-cardview as a dependency (and reorders the
other deps to be in alphabetical order).

Remaining work (in future CLs):
- remove search menu option?
- clean up initial window
- remove the line between the header and the first condition
       when there's a condition

Bug: 37477506
Test: make RunSettingsRoboTests
Change-Id: Id7477b90fbaf30eb5cac1ee244c847bddb95b3fd
2017-05-31 15:24:25 -07:00
TreeHugger Robot
f03bf1843a Merge "Add method to disable "disable" button in installed app UI" 2017-05-31 21:46:36 +00:00
Fan Zhang
b47373014f Add search index for support dashboard activity.
Change-Id: Ie9cf20316f94454a3d41f76d05b662e398c2c2ea
Fix: 36005923
Test: make RunSettingsRoboTests
2017-05-31 14:15:14 -07:00
TreeHugger Robot
10534456ed Merge "Update bluetooth strings in settings" 2017-05-31 21:14:31 +00:00
Andrew Sapperstein
14934599dd Initial search bar implementation.
Replaces the default Toolbar in SettingsActivity with one that looks
like a search bar. It uses a Toolbar inside a CardView with some custom
styling.

Since the search bar is a floating element, the new toolbar lives in the
content frame of the dashboard. A FrameLayout is used to provide the
layering that is desired.

Since the search bar is on top, an additional spacer view is added to
the list of items in the dashboard. Its color changes based on what
the first view is so that it always matches.

Adds android-support-v7-cardview as a dependency (and reorders the
other deps to be in alphabetical order).

Remaining work (in future CLs):
- remove search menu option?
- clean up initial window
- remove the line between the header and the first condition
       when there's a condition

Change-Id: I627b406735c8e2280ac08f44ca32f7098621a830
Merged-In: Id7477b90fbaf30eb5cac1ee244c847bddb95b3fd
Bug: 37477506
Test: make RunSettingsRoboTests
2017-05-31 14:03:26 -07:00
TreeHugger Robot
ad587bf155 Merge "Update updateEmptyView" 2017-05-31 19:32:33 +00:00
jackqdyulei
58575a9803 Update bluetooth strings in settings
This cl contains strings used in bluetooth main page and
pairing page

Bug: 35876580
Test: RunSettingsRoboTests
Change-Id: Ied514e50fc2dcf4b5d9ece49159c9e13def1b0f3
2017-05-31 12:19:58 -07:00
Fan Zhang
77ee0b08dd Add method to disable "disable" button in installed app UI
OEMs can now force grey out the "disable" button for important apps on
device.

Change-Id: I8ea431b52e50e424be55946f70175db5412e2f4a
Merged-In: Ic075a07ad12592bd60238c7b1c9ab84932c8db3c
Fix: 38250742
Test: make RunSettingsRoboTests
2017-05-31 12:16:49 -07:00
Christine Franks
2d0293951a Allow FR in carrier demo mode
Bug: 62133292
Test: make RunSettingsRoboTests -j100, and manually verified FR is
available in carrier demo mode.

Change-Id: Ia793bf234b229da0490accfea6d44b72395a04bc
2017-05-31 12:04:01 -07:00
Fan Zhang
a45f3d2f33 Add method to disable "disable" button in installed app UI
OEMs can now force grey out the "disable" button for important apps on
device.

Change-Id: Ic075a07ad12592bd60238c7b1c9ab84932c8db3c
Fix: 38250742
Test: make RunSettingsRoboTests
2017-05-31 11:53:29 -07:00