Commit Graph

2577 Commits

Author SHA1 Message Date
TreeHugger Robot
4f5b13f97a Merge "Fix crash when there is no emergencybroadcast app on device" into oc-dev 2017-05-06 02:42:38 +00:00
Fan Zhang
0335cd1e9b Fix crash when there is no emergencybroadcast app on device
Some devices do not have emergencybroadcast app installed, so we should
not show the preference item for it. Add the preference controller into
AppAndNotificationFragment properly hides it.

Change-Id: Ic39ba24da9bd8f3200a5e44232a5489e35c48c0a
Fix: 37945069
Test: make RunSettingsRoboTests
2017-05-05 17:42:25 -07:00
TreeHugger Robot
1ca442e66e Merge "Prevent race conditions after dropping database" 2017-05-06 00:37:11 +00:00
Doris Ling
a39f7c2906 Merge "Fix crash when primary user select app installed by secondary user." into oc-dev am: f9d9524574
am: 7c5ef68505

Change-Id: Ia7956ad53ecb8aed962f2d0f3950243ab4c6b06e
2017-05-06 00:11:39 +00:00
Doris Ling
7c5ef68505 Merge "Fix crash when primary user select app installed by secondary user." into oc-dev
am: f9d9524574

Change-Id: I8b02370267e682ec17efcdf877c960e4189304ae
2017-05-06 00:02:54 +00:00
TreeHugger Robot
f9d9524574 Merge "Fix crash when primary user select app installed by secondary user." into oc-dev 2017-05-05 23:59:29 +00:00
Fan Zhang
4f8b9ebd58 Merge "Update tether summary text when airplane mode turns on" into oc-dev am: fe5d64feb0
am: 12cc6aad3c

Change-Id: If61ae23a8a908452f26c07c7908d1cdd365feb4a
2017-05-05 22:54:11 +00:00
Matthew Fritze
be0989cc61 Prevent race conditions after dropping database
Manual merge from: ag/2155898

Bug: 37501479
Test: make RunSettingsRoboTests
Change-Id: I02f8423c0ffc27abbb8ceb61a8c47d2f0796d0bb
2017-05-05 15:30:39 -07:00
Fan Zhang
12cc6aad3c Merge "Update tether summary text when airplane mode turns on" into oc-dev
am: fe5d64feb0

Change-Id: I3bfc37b5bcdcf562faf2c528048e0a5c9427a8f2
2017-05-05 22:14:10 +00:00
Doris Ling
cc28cb372d Fix crash when primary user select app installed by secondary user.
- PackageManager.getPackageInfo() can return null. When trying to check
the app permission info, check for null package info and only process
the permission info when package info is available.
- Update usage of PackageManager.MATCH_UNINSTALLED_PACKAGES to
PackageManager.MATCH_ANY_USER, as the implementation for querying
packages for other users have been changed.
- Add PackageManager APIs used by AppStateAppOpsBridge to
IPackageManagerWrapper for test purpose.
- Change UserManager.get() to Context.getSystemService() to fix test
failure.

Change-Id: I52de924618aa252ffaae02b8f06ebe5b1d0def61
Fix: 37409266
Test: make RunSettingsRoboTests
2017-05-05 14:53:32 -07:00
TreeHugger Robot
fe5d64feb0 Merge "Update tether summary text when airplane mode turns on" into oc-dev 2017-05-05 21:52:07 +00:00
Fan Zhang
cdca63c4c7 Remove summary template in sleep timeout setting.
The template causes incorrect display in search, and it's not
needded by anyone in code.

Bug: 36101902
Test: rerun robotests
Change-Id: Ib399e15c799e08d377b124e88eda0b8f13494ed3
2017-05-05 13:40:36 -07:00
Fan Zhang
768824d7ad Update tether summary text when airplane mode turns on
Change-Id: I62c52351abbad50aeac077785afb21822773956e
Fix: 37934871
Test: make RunSettingsRoboTests
2017-05-05 12:55:11 -07:00
jackqdyulei
72cce92768 Merge "Only use PROCESS_STATE_TOP as foreground time." into oc-dev am: 651261c7dd
am: 83e2511d45

Change-Id: I217d9f4a835f8352dcc7868067f09a5cd9b313ae
2017-05-05 19:35:55 +00:00
jackqdyulei
83e2511d45 Merge "Only use PROCESS_STATE_TOP as foreground time." into oc-dev
am: 651261c7dd

Change-Id: I3c030efa5dc025dbeae7dfa059d58cd617f2691a
2017-05-05 19:24:11 +00:00
TreeHugger Robot
651261c7dd Merge "Only use PROCESS_STATE_TOP as foreground time." into oc-dev 2017-05-05 18:55:29 +00:00
TreeHugger Robot
658599328e Merge "Change the logic for showing "App info" vs "show more"" 2017-05-05 18:36:42 +00:00
jackqdyulei
01e690e377 Only use PROCESS_STATE_TOP as foreground time.
There are some miscalculations in state FOREGROUND_SERVICE and
FOREGROUND, so we move them out of the foreground time for now.

We will fix it after O and may add them back later.

Bug: 37000096
Test: RunSettingsRoboTests
Change-Id: Ic3f2f7fa69e8a213895c601630d1cca94fd32220
2017-05-05 10:23:09 -07:00
Fan Zhang
daad10b428 Change the logic for showing "App info" vs "show more"
Fix: 33265548
Test: robotests

The old logic shows "show more" when there is any recent app, new logic
first checks if there is any displayable recent app. Otherwise go back
to display "app info".

Change-Id: I485725eaa025b9e2cfffc5e9e1923aa771bb0e12
2017-05-05 09:39:24 -07:00
TreeHugger Robot
910f69c62a Merge "Add ability to speak to provider for enhanced estimate" 2017-05-05 04:50:14 +00:00
TreeHugger Robot
78a3f9a748 Merge "Fix randomly showing anomaly icon" 2017-05-05 03:13:58 +00:00
Salvador Martinez
126c032afa Add ability to speak to provider for enhanced estimate
Added code that checks if the provider for the enhanced battery
drain estimate is available. If it is available we use that
value instead of the one computed by BatteryStats.

Test: Robotests
Bug: 37753227
Change-Id: I7eae01b56f85d33eafc42ee0f18bb752779581b2
2017-05-04 20:05:53 -07:00
TreeHugger Robot
161e356de4 Merge "Limit the summary text for App info->Permissions to one line." 2017-05-05 02:22:50 +00:00
TreeHugger Robot
81586b5681 Merge "Add impl for force stop action" 2017-05-05 01:27:24 +00:00
jackqdyulei
3bd2420911 Fix randomly showing anomaly icon
Sometimes PowerGaugePreference will show anomaly icon when they
shouldn't. I think it is because PreferenceViewHolder has cache
about the previous data.

This cl fixes it by setting compound drawable as 0 when
showAnomalyIcon is false.

Bug: 36924669
Test: RunSettingsRoboTests
Change-Id: I5ea0dc307aafcce386c84963e618d1213de5ec19
2017-05-04 18:08:31 -07:00
Doris Ling
e249c00a3c Limit the summary text for App info->Permissions to one line.
- the summary text is the list of permissions that the app has. It is
dynamic, and when the list is long, setting the summary will expand
the text view height and make the page launch looks janky. We cannot
pre-set the summary to certain line, since the permissions list for each
app is unknown beforehand. To avoid the jank, limit the summary to 1
line and truncate it if necessary.

Change-Id: I1acb1ac9f46c55808ce03626e53cf71502231ab2
Fix: 36413664
Test: make RunSettingsRoboTests
2017-05-04 23:20:32 +00:00
Daniel Sheng
7b9e3fdd08 Camera lift preference now saves correctly
Bug: 37751057
Test: manual + make RunSettingsRoboTests

Fixed issue where camera lift preference was saving the opposite value
of what it was supposed to. Added test to cover saving of value on
preference change.

Change-Id: I2d2c454eb478afb7f73519f9f05c9a9a1933938b
2017-05-04 15:14:39 -07:00
TreeHugger Robot
c2e6c82c66 Merge "Add control for the anomaly detection" 2017-05-04 21:32:31 +00:00
Daniel Nishi
8381755263 Fix Settings crash in Storage settings.
If you tap aggressively before the fragment has fully initialized, it
was possible to NPE. This null-checks to avoid this.

Change-Id: I3488245d230cf1e16b23e34614c8e6b43ea14ff1
Fixes: 37945253
Test: Robotest
2017-05-04 14:12:45 -07:00
Daniel Nishi
31de4c1766 Merge "Fix a bug where override filter was always on." into oc-dev am: 408fd90102
am: 7d50d9db12

Change-Id: Ie9e9b3978e7a2f52fdd63e203a740068188dc285
2017-05-04 17:38:31 +00:00
jackqdyulei
66242d0e3d Add impl for force stop action
Also refactor the AnomalyAction so it could take source id as
a parameter, which represents the fragment that invokes it.

Bug: 36924669
Test: RunSettingsRoboTests
Change-Id: Ib53865f92e1a6f1e9dcc1480c0c74fbcfb0226f4
2017-05-04 10:37:42 -07:00
Daniel Nishi
7d50d9db12 Merge "Fix a bug where override filter was always on." into oc-dev
am: 408fd90102

Change-Id: I800644b0b754b6d2ff844531bfccce47caebfbe1
2017-05-04 17:30:41 +00:00
Daniel Nishi
408fd90102 Merge "Fix a bug where override filter was always on." into oc-dev 2017-05-04 17:18:37 +00:00
jackqdyulei
3dbd77e5ae Add control for the anomaly detection
Bug: 36924669
Test: RunSettingsRoboTests
Change-Id: Id71b1324f567e7aa9b51dc25247fff9151d4e108
2017-05-04 10:11:54 -07:00
Lei Yu
5a24c1b84c Merge "Add icon in PowerUsageAnomalyDetails" 2017-05-04 16:56:21 +00:00
Fan Zhang
6db910ab85 Merge "Skip "null" string when building advanced button summary" into oc-dev am: e4eb65c00e
am: d8b6244d82

Change-Id: I0ea1c236ee55c1bb784a39bc8a4990d47616397b
2017-05-04 16:20:46 +00:00
Fan Zhang
d8b6244d82 Merge "Skip "null" string when building advanced button summary" into oc-dev
am: e4eb65c00e

Change-Id: Ife67012f081f60d06fc3cec7d40673dfb3e032dc
2017-05-04 16:17:46 +00:00
Fan Zhang
e4eb65c00e Merge "Skip "null" string when building advanced button summary" into oc-dev 2017-05-04 16:12:27 +00:00
Amin Shaikh
dec19d10c2 Show "Forget" button for ephemeral networks.
- Move forget button preference handling logic to
WifiDetailPreferenceController
- Remove unnecessary updateInfo call in onResume since
NETWORK_STATE_CHANGED_ACTION is a sticky broadcast
- Populate network state fields and set up initial wifi state
when the Preference is displayed instead of waiting for onResume

Bug: 37751816
Test: m RunSettingsRoboTests && manually tested on device
Change-Id: I509013c72a0d26fc9a3feca564d92a0ab8414d1e
2017-05-03 21:17:25 -07:00
Lorenzo Colitti
23671e84ba Merge "Add a "sign into network" button to the wifi details page." into oc-dev am: 33b0104cfc
am: fdd0f1e141

Change-Id: I528df44eb284ca162ba5daf937aa8a020d65bc4c
2017-05-04 02:15:09 +00:00
Lorenzo Colitti
fdd0f1e141 Merge "Add a "sign into network" button to the wifi details page." into oc-dev
am: 33b0104cfc

Change-Id: I38a3dfa0dcd17e073b6346dddfdd2d1434035b4a
2017-05-04 02:12:20 +00:00
Lorenzo Colitti
33b0104cfc Merge "Add a "sign into network" button to the wifi details page." into oc-dev 2017-05-04 02:06:50 +00:00
Android Build Merger (Role)
b1726776c6 Merge "Merge "Update "Phone idle" subtext" into oc-dev am: 3a1d6db0e7 am: 85950d5ebd" 2017-05-04 01:28:52 +00:00
jackqdyulei
5c39601738 Merge "Update "Phone idle" subtext" into oc-dev am: 3a1d6db0e7
am: 85950d5ebd

Change-Id: I0d3d67b274242f72fa46c157c7cee883a476a2e2
2017-05-04 01:28:37 +00:00
Android Build Merger (Role)
6502eba7e0 Merge "Merge "Fix null pointer exception in wifi settings" into oc-dev am: eb6eb99a56 am: 11853a75e3" 2017-05-04 01:28:31 +00:00
TreeHugger Robot
6c4f768e0e Merge "Add anomaly icon for PowerGaugePreference" 2017-05-04 01:28:21 +00:00
Glen Kuhne
f791573f95 Merge "Fix null pointer exception in wifi settings" into oc-dev am: eb6eb99a56
am: 11853a75e3

Change-Id: I220e8f46313c3ede6a183c6485002f3b9e921df5
2017-05-04 01:28:07 +00:00
jackqdyulei
85950d5ebd Merge "Update "Phone idle" subtext" into oc-dev
am: 3a1d6db0e7

Change-Id: I2c9b8a4c1d80911467d51ee883fb0a9a8bd01b43
2017-05-04 01:16:08 +00:00
Glen Kuhne
11853a75e3 Merge "Fix null pointer exception in wifi settings" into oc-dev
am: eb6eb99a56

Change-Id: Id7fa8980306e02e5b441278b76f01d9343119ecf
2017-05-04 01:15:47 +00:00
TreeHugger Robot
3a1d6db0e7 Merge "Update "Phone idle" subtext" into oc-dev 2017-05-04 01:11:24 +00:00