Commit Graph

1597 Commits

Author SHA1 Message Date
Daniel Nishi
a480952e3d Merge "Fake the cache size to be 0 bytes when cleared." 2017-04-07 19:34:58 +00:00
jackqdyulei
5d2918a675 Add log for BatteryUtils
This cl add logs to get more data for app usage time.

Also refactor BatteryUtils to singleton pattern because we need
to extract package name from uid.

Bug: 36909166
Test: RunSettingsRoboTests
Change-Id: I6ede354035c46e46cb856b7cf57bd1b7ccbd6d4f
2017-04-07 11:18:39 -07:00
Doris Ling
cee83e4bbf Add summary text to Lock screen preferences.
Each time we refresh the security preference page, get the current
summary text from "On the lock screen" and populate to Lock screen
preferences summary.

Bug: 36540633
Test: make RunSettingsRoboTests
Change-Id: I317e3892b35b30981b62f7b7aee9cfdacd04a3ed
2017-04-07 11:11:45 -07:00
Lei Yu
e0e4c5d3eb Merge "Remove misc data in battery main page." into oc-dev am: abde170529
am: 52e096284f

Change-Id: I7f1665ea0864ff726a2964952c43fbb69d95e6f1
2017-04-07 18:03:21 +00:00
Lei Yu
abde170529 Merge "Remove misc data in battery main page." into oc-dev 2017-04-07 17:37:18 +00:00
Filip Pavlis
5a2590dfdb Merge "Omit using ctor of PreferenceViewHolder in tests." into oc-dev am: f023f50787
am: 7ae53e7df7

Change-Id: I9f075fbb5abe2767db1cd743a8c828d6f77fb9de
2017-04-07 10:45:07 +00:00
Filip Pavlis
f023f50787 Merge "Omit using ctor of PreferenceViewHolder in tests." into oc-dev 2017-04-07 10:31:45 +00:00
Doris Ling
d49dfb1472 Merge "Add test to verify no crash on selecting brightness level." into oc-dev am: 43146c4972
am: 272d65c0bc

Change-Id: I5dc16b17576273d7b3e43bae69e8bc60f29ccd5d
2017-04-07 02:37:13 +00:00
Doris Ling
0c39be8889 Merge "Update USb preference controller to use the new summary texts." into oc-dev am: e94ba3b55f
am: 8f3be96ba8

Change-Id: I6b8a83881fae1fea4cd1776fa28b354cae67dae9
2017-04-07 02:36:58 +00:00
TreeHugger Robot
43146c4972 Merge "Add test to verify no crash on selecting brightness level." into oc-dev 2017-04-07 02:28:47 +00:00
TreeHugger Robot
e94ba3b55f Merge "Update USb preference controller to use the new summary texts." into oc-dev 2017-04-07 02:27:55 +00:00
Doris Ling
388a138fd6 Merge "Update summary text for Trust agent." into oc-dev am: b9a54bae08
am: 4e33cc1279

Change-Id: I71cebb56677c1cc9f502c1578f2de3fbcfa88f26
2017-04-07 02:21:17 +00:00
TreeHugger Robot
b9a54bae08 Merge "Update summary text for Trust agent." into oc-dev 2017-04-07 02:09:36 +00:00
Doris Ling
222fe7d8a1 Merge "Add subtext to Default apps." into oc-dev am: 1e775c117a
am: 3da90f7f1c

Change-Id: Id89a509fa97edc1a31223bc25225a75f166e3f9c
2017-04-07 02:03:00 +00:00
Suprabh Shukla
aa9fe03dfa Renaming intent action for unknown sources
Renaming action MANAGE_EXTERNAL_SOURCES to MANAGE_UNKNOWN_APP_SOURCES to
be clearer about its purpose

Test: adb shell am instrument -w -e class \
com.android.settings.applications.ExternalSourcesSettingsTest \
com.android.settings.tests/android.support.test.runner.AndroidJUnitRunner

cts-tradefed run singleCommand cts -m ExternalSources

Bug: 35812498
Change-Id: Ic6db5b3446c1890a358f5b5225d38409d1bd2c7c
2017-04-06 18:05:32 -07:00
Doris Ling
2db8c867d1 Update summary text for Trust agent.
Update the summary text to show the number of active trust agent.

Bug: 36540633
Test: make RunSettingsRoboTests
Change-Id: I6627564a8356022c89694c84cfd47e875a0916b1
2017-04-06 17:29:12 -07:00
Doris Ling
d007ff9395 Add subtext to Default apps.
Retrieve the default Sms app, default Browser app, and default Phone app
and append the label together to form the summary text for Default apps
settings.

Bug: 36376411
Test: make RunSettingsRoboTests
Change-Id: I8ccf71dde43bba04c4bc4a900c9a181513e7710b
2017-04-07 00:10:39 +00:00
jackqdyulei
9d78a655fa Merge "Fix crash when clicking item in Battery screen" into oc-dev am: bac9b527e7
am: 23f8052652

Change-Id: Ie1895e12f4628dd80aca7eeb41bcbeac9599dc0e
2017-04-06 23:03:55 +00:00
Daniel Nishi
c660755348 Merge "Re-add the option to migrate data back." into oc-dev 2017-04-06 22:49:24 +00:00
Doris Ling
de03809396 Add test to verify no crash on selecting brightness level.
Add UI test to launch Settings->Display->Brightness level and Settings
app does not crash.

Change-Id: I526f44961bd0efbcacde334affbe2b7a93da0ce3
Fix: 36647069
Test: make SettingsTests
2017-04-06 15:10:29 -07:00
jackqdyulei
ab5ca9f5cd Remove misc data in battery main page.
The removed types are:
1. DrainType.UNACCOUNTED
2. DrainType.OVERCOUNTED

This cl removes the above types in PowerUsageSummary and
PowerUsageAdvanced

Bug: 36874846
Test: RunSettingsRoboTests
Change-Id: I1807c44a2c0a9c2fa124cdef962a6411ae6830ca
2017-04-06 15:09:57 -07:00
TreeHugger Robot
bac9b527e7 Merge "Fix crash when clicking item in Battery screen" into oc-dev 2017-04-06 21:50:07 +00:00
Daniel Nishi
f6b12274f1 Re-add the option to migrate data back.
Currently, users can use an SD card or USB drive and adopt it as
internal storage using existing flows. They can manage this drive
perfectly fine using the old storage screen, which is still around.

One functionality that was lost was the ability to migrate data from
the adopted drive back to the private internal storage. This appeared
in a dropdown in the old storage settings.

By duplicating the code to create just that specific menu item and its
click behavior, we can restore this functionality to the new storage
view.

Change-Id: Id0e01c560e7249acccfe86c5da44466dd58fe5d4
Merged-In: I4b8c06912d2c0b2c5be5bce8b217d45accf34d4b
Fixes: 35926028
Test: Settings Robotest
2017-04-06 13:57:00 -07:00
Doris Ling
76c325d46c Merge "Add summary text to Display->Brightness level." into oc-dev am: ad69c46712
am: c48ef6dda1

Change-Id: Id4d194f010c07d7d731238600f80dd18589a0358
2017-04-06 20:37:22 +00:00
Daniel Nishi
f588f7678d Add a movies & tv apps category to storage settings.
Change-Id: I055e93d2a151195b90a5fd64f4fddebbbcffef59
Merged-In: Idfabe83739272b19cbef4b13a82339170f8f97b3
Fixes: 36223441
Test: Settings Robotest
2017-04-06 13:36:12 -07:00
Daniel Nishi
bf1f8e9ca7 Fake the cache size to be 0 bytes when cleared.
The fast track storage calculation returns a non-zero answer after
the storage has been cleared. The simplest workaround here is to
fake the size as 0 bytes in the view after cache clearing.

It will not be zero if the user exits and comes back, but this
should be fine.

MARK IT ZERO!

Change-Id: Ia012c2cf2842040d5eac3d4a72539ec7dcfb9570
Fixes: 34965659
Test: Settings Robotest
2017-04-06 13:35:09 -07:00
Doris Ling
ad69c46712 Merge "Add summary text to Display->Brightness level." into oc-dev 2017-04-06 20:03:24 +00:00
jackqdyulei
fefdd5d47f Fix crash when clicking item in Battery screen
"last full charge/Screen usage since full charge" goes crash when
clicking on it. This is because The default behaviour for
PowerGaugePreference is to start detail page and the above two items
are PowerGaugePreference.

This cl set these two items as non-selectable.

Bug: 37080048
Test: make -j40 SettingsTest
Change-Id: Ide4e151dcd0b44fb795a5753c91f2197b2a24a56
2017-04-06 12:52:50 -07:00
Doris Ling
eff691280a Merge "Update summary for Connected devices->Printing." into oc-dev am: 4bbfdb13e7
am: 38fc861a62

Change-Id: I6329d63106ce55d324c284126459f03aea614ef5
2017-04-06 19:21:53 +00:00
Doris Ling
4bbfdb13e7 Merge "Update summary for Connected devices->Printing." into oc-dev 2017-04-06 18:35:53 +00:00
Doris Ling
8071d18ad5 Merge "Update Wifi off summary text." into oc-dev am: 28e35fcf05
am: 0950fa569b

Change-Id: I439f95faddf7848e14d7f94a37e65f5b93394645
2017-04-06 17:20:52 +00:00
Christine Franks
fbf21f4c85 Merge "Prevent apps from displaying over Settings" into oc-dev am: 24596f51d5
am: 8606c652d5

Change-Id: Idb0cbf6b0467f9fd43b1e9e40e622146640a9a7e
2017-04-06 17:19:25 +00:00
Doris Ling
28e35fcf05 Merge "Update Wifi off summary text." into oc-dev 2017-04-06 17:04:45 +00:00
Christine Franks
c50403c606 Prevent apps from displaying over Settings
Specifically, the DrawOverlayDetails fragment only.

Bug: 36070413
Test: make RunSettingsRoboTests -j100
Change-Id: I0069f0cacf8c963c8c6878dc89a32b205983a568
2017-04-05 17:55:24 -07:00
TreeHugger Robot
418e5bffda Merge "Fix crash when opening battery page" into oc-dev 2017-04-05 22:45:46 +00:00
Sundeep Ghuman
5c2245fca3 Merge "Create Espresso test class for WifiSettings." into oc-dev am: 8b06cbd3a9
am: 904320244d

Change-Id: Icf6780556873c04819216cfd9a162234d6106978
2017-04-05 22:16:59 +00:00
TreeHugger Robot
f297e843e9 Merge "Ui changes in battery main page" into oc-dev 2017-04-05 22:13:01 +00:00
Daniel Nishi
4c52af621a Merge "Lower case the first letter of storage type." into oc-dev 2017-04-05 22:06:55 +00:00
TreeHugger Robot
8b06cbd3a9 Merge "Create Espresso test class for WifiSettings." into oc-dev 2017-04-05 21:27:40 +00:00
jackqdyulei
cdbc114376 Fix crash when opening battery page
The settings crashes when opening battery usage detail page from
installed app page. Main reason is that it trying to open obsolete
page. This cl directs it to open AdvancedPowerUsageDetail instead.

Following cl will make InstalledAppDetail show calibrated percentage,
which is trakced in b/36816681

Bug: 36792973
Test: RunSettingsRoboTests
Change-Id: Ie63e64e543ed3b28974ffdda8b42c97e7749a0f7
(cherry picked from commit fac713318c)
2017-04-05 14:12:26 -07:00
Daniel Nishi
3ac4d429f1 Merge "Fix a unit test regression." into oc-dev am: affc8fa18e
am: 60b40a31c8

Change-Id: Ib37112094988b3837b261fb7be28f4e3cecbe4f9
2017-04-05 20:11:18 +00:00
Daniel Nishi
affc8fa18e Merge "Fix a unit test regression." into oc-dev 2017-04-05 19:59:17 +00:00
Filip Pavlis
4bd1e4f73b Omit using ctor of PreferenceViewHolder in tests.
See the topic for related change in the support lib.

Bug: b/33774880
Test: N/A
Change-Id: I3514821db649e26068f151bd69c687faab5ae222
2017-04-05 11:12:11 +01:00
Soroosh Mariooryad
1a12804aec Merge "Adding APIs for smart search ranking." 2017-04-04 21:37:28 +00:00
TreeHugger Robot
c8e06b3fb6 Merge "Adds the Clear App dialog for Instant Apps" into oc-dev 2017-04-04 17:50:00 +00:00
Sean Stout
87350960d7 Merge "Added Night Light Suggestion and tests" into oc-dev am: 1512b07a9b
am: c2ed9f8b7e

Change-Id: I70ce8e5ae91c3eebc8322ebc0f495b572247c8f0
2017-04-04 17:38:14 +00:00
Soroosh Mariooryad
172f888ad5 Adding APIs for smart search ranking.
Test: RunSettingsRoboTests
Bug: 36866337

Change-Id: I20a26e5ac7a57582cea24951120717a4f2c93ce0
2017-04-04 10:33:58 -07:00
Sean Stout
1512b07a9b Merge "Added Night Light Suggestion and tests" into oc-dev 2017-04-04 17:19:44 +00:00
jackqdyulei
273ad50a3a Ui changes in battery main page
1. Refine the battery header view
2. Move stats section to the place above power management
3. Add last full charge battery stat
4. Add the disclaimer as a footer

Also update the method name in test file, and this ui changes
also fix the header flash problem.

Bug: 36576021
Bug: 36494178
Test: RunSettingsRoboTests
Change-Id: I9784dbbbe16e61da7287f300183347dd4eee6a2b
(cherry picked from commit edfd09d590)
2017-04-04 10:06:35 -07:00
Jesse Evans
5c9f7a88b4 Adds the Clear App dialog for Instant Apps
Adds a confirmation dialog for the user when tapping clear app.

From this dialog the user can either cancel, or confirm they
want to clear the app.

Test: make RunSettingsRoboTests

Bug: 36536695
Change-Id: Idffcf5ef318578ae2e075ea2cbb35323d41acade
2017-04-04 08:30:38 -07:00