Commit Graph

829 Commits

Author SHA1 Message Date
TreeHugger Robot
57a0771bf5 Merge "Device management info: Refer to current user, not primary user" into oc-dev 2017-04-01 05:12:39 +00:00
TreeHugger Robot
ef64404f44 Merge "Adds the lightning badge for Instant Apps" into oc-dev 2017-04-01 04:59:53 +00:00
Suprabh Shukla
6221a5b8d2 Disabling switch preference when unknown sources are blocked
When the user restriction DISALLOW_INSTALL_UNKNOWN_SOURCES is set,
changing the preferences in settings is meaningless as package installer
will not let the install proceed. Disabling the settings switch and
updated the summaries to reflect when a switch is disabled. Removing
robolectric test as the logic is no longer testable due to missing stubs
for UserManager and UserHandle.

Test: CtsVerifier -> Device Owner Tests -> Policy Transparency Test

Bug: 34688413
Change-Id: I7cf6cc09a5d29721186a0df9405d3c7e486295ee
Merged-In: I7cf6cc09a5d29721186a0df9405d3c7e486295ee
2017-04-01 02:58:00 +00:00
Bartosz Fabianowski
1fca17ce2e Device management info: Refer to current user, not primary user
The device management info page should show information about the
current user's policies, not the primary user's.

Bug: 32692748
Test: m RunSettingsRoboTests

Change-Id: I5d8afa7fae1c0f3a4da78b085365882827e6721b
(cherry picked from commit b836da263d)
2017-03-31 09:26:12 +00:00
Jesse Evans
0b7037c24e Adds the lightning badge for Instant Apps
Adds the lightning bolt badge for Instant Apps to the
InstalledAppDetails page.

Test: Robolectric test to ensure the badge is shown for Instant Apps
and also that it is not shown for installed apps.

Bug: 36512295
Change-Id: I8496d684fa3a9dc316fa5af16399e6d07f68255a
(cherry picked from commit 2400d31651)
2017-03-31 02:26:15 +00:00
TreeHugger Robot
0df5281fe6 Merge "Add link speed to Wifi details page." into oc-dev 2017-03-30 18:19:45 +00:00
TreeHugger Robot
1261a679bf Merge "Reserve full indexing for SearchFragment" into oc-dev 2017-03-30 16:48:53 +00:00
Lei Yu
ae179f182f Merge "Hide Wifi and Systemui in settings main page" into oc-dev 2017-03-30 01:14:36 +00:00
Lei Yu
b2e213d551 Merge "Add summary for categories in battery advanced page" into oc-dev 2017-03-30 01:14:25 +00:00
Matthew Fritze
8a42b074a7 Reserve full indexing for SearchFragment
Full Index should only be accessible from Search Fragment,
and when only full index should declare a locale to be
indexed.

Test: make RunSettingsRoboTests
Fixes: 36656637
Change-Id: Ie673067118ac6b184570e116ea24a169be027053
2017-03-29 23:55:48 +00:00
Stephen Chen
c6453a5bca Add link speed to Wifi details page.
Also make detail items unselectable.

Bug: 36444504
Test: make RunSettingsRoboTests
Change-Id: I393a3a25c8c036da1df1dc2788accfecb3563e14
2017-03-29 16:28:08 -07:00
Lei Yu
88b57826f5 Merge "Create Controller for app buttons" into oc-dev 2017-03-29 23:16:29 +00:00
jackqdyulei
c577ef0a75 Hide Wifi and Systemui in settings main page
Also move the systemui to category system

Fix: 36644740
Fix: 36645264
Test: RunSettingsRoboTests

Change-Id: I6b64a7dca58091f3a1d8b7d99c8bae7ddf9169f9
(cherry picked from commit 1e95b74f77)
2017-03-29 20:23:50 +00:00
jackqdyulei
f094b87661 Add summary for categories in battery advanced page
If the category only contains one app, show usage time, otherwise
show app with maximum usage.

Also add usage time for apps in battery settings page.

Bug: 35396770
Test: RunSettingsRoboTests
Change-Id: I43fe9c2289535be2c1b95ffded6b52b0ff099589
(cherry picked from commit 3bbaca9c7c)
2017-03-29 20:23:22 +00:00
jackqdyulei
31b8de1e21 Create Controller for app buttons
These two buttons(uninstall + forcestop) are used in both battery page
and app page, we should move the logic for these two buttons into one
place.

This cl creates the AppButtonsPreferenceController for the above
purpose. This cl only copies the logic to controller but hasn't make
InstalledAppDetails use this controller.

Since DialogFragment could not use function in controller directly,
the controller expose DialogListener and all the fragments must
implement this interface. Then they can delegate the method call
to controller directly.

The following cl will:
1. Make the InstalledAppDetails be compatible to controller
2. Make the InstalledAppDetails use this controller.

Bug: 35810915
Test: RunSettingsRoboTests
Change-Id: Ie2aa8064bcec3003233896c18be772825b12930a
(cherry picked from commit 82d07983b4)
2017-03-29 20:21:37 +00:00
Doris Ling
0f01c849cd Only register conditions receiver when needed.
1. Update the dnd receiver to listen when dashboard summary running.
- remove the dnd receiver from Android manifest, and create it inside
the dnd condition.
- add lifecycle implementation to condition manager, so that the dnd
condition can know when to register and unregister the receiver.
- remove getReceiverClass() from dnd condition so that its receiver will
not be disabled by the default condition handling when condition is
silenced.

2. Remove all other conditions receiver from Android manifest.
- the broadcast receivers for HotspotCondition, AirplaneModeCondition,
CellularDataCondition from the manifest and create them inside the
condition classes.
- update Condition.onSilenceChanged() to register/unregister the
receivers instead of enable/disable the receiver class.

Change-Id: Iea6288382680df2b02884d1934b8db85daae404c
Fix: 35968517
Test: make RunSettingsRoboTests
2017-03-29 10:47:04 -07:00
Doris Ling
457c3cbec2 Revert "Convert BT preference to use TwoTargetPreference"
This reverts commit 09c7f15b12.

Change-Id: I29aa67f026c0b54da08b19657f9916275e5a3459
2017-03-28 20:03:10 +00:00
Doris Ling
6709b6d399 Add null check for the media player when surface texture is available.
- Call to MediaPlayer.create() method can return null, and hence we need
to check the return value before trying access the media player.

Change-Id: I4a5e0edbd6db21b678efb05ea733187f34185432
Fix: 36668356
Test: make RunSettingsRoboTests
2017-03-28 18:28:44 +00:00
TreeHugger Robot
f85ebb24bb Merge "Changes to installed app details screen for instant apps" 2017-03-28 01:22:47 +00:00
TreeHugger Robot
f8e9232277 Merge "Update settings tests to use new constructor." 2017-03-28 00:46:53 +00:00
TreeHugger Robot
22e4051ca9 Merge "Fix forget button on wifi details page." 2017-03-28 00:31:06 +00:00
Amin Shaikh
ffd3197510 Fix forget button on wifi details page.
- Corrected logic for forgetting the current network in the network
details page
- After a user has forgotten a network, the button becomes disabled
(TODO final UX on this - go/remaining-wifi-picker-work tracks this)
- Added unit tests for forgetting network flow
- Fixed bug where the current tethering WifiConfiguration was associated
with the currrent network

Bug: 36458941
Test: m RunSettingsRoboTests
Change-Id: Ie3c4bae8b295908b17179e60359c8bc599519744
2017-03-27 16:10:33 -07:00
Daniel Nishi
16e9247d21 Merge "Badge the icons for profile storage screen." 2017-03-27 22:20:09 +00:00
Antony Sargent
09955c3865 Changes to installed app details screen for instant apps
Bug: 35098444
Test: make RunSettingsRoboTests

This implements the following changes to the app details screen:

-Suppresses the "Uninstall" and "Force Stop" buttons
-Adds "Install app" and "Clear app" buttons
-Adds a mechanism for showing a link to the store's app details
 page that can be different from the default for installed apps.

Change-Id: Icea83f7d1fde62d4101cb0c8a6d03849f6c56bca
2017-03-27 14:34:56 -07:00
TreeHugger Robot
08a3bb368b Merge "Update Sound settings." 2017-03-25 18:30:36 +00:00
TreeHugger Robot
4fa5c7b8ba Merge "Move reset options to one place" 2017-03-25 18:17:15 +00:00
Lei Yu
c67e4dbf8a Merge "Revamp the battery usage details page." 2017-03-25 06:17:53 +00:00
TreeHugger Robot
f4004ce808 Merge "Misc fixes for items under system setting" 2017-03-25 04:09:20 +00:00
jackqdyulei
ddba966700 Revamp the battery usage details page.
This cl adds AdvancedPowerUsageDetail to show the usage details page.
The AdvancedPowerUsageDetail contains all the needed ui components:
1. App Header
2. Two buttons
3. Usage breakdown preference category
4. Power management preference category

This cl also adds preference controller for two buttons but the
detail implementation will be added in the following cl.

Following cl will also remove previous detail page.

Bug: 35810915
Test: RunSettingsRoboTests
Change-Id: I17f95d1288762094671c0f148fa73367e51f175e
2017-03-24 20:58:44 -07:00
Fan Zhang
2a9255b33c Misc fixes for items under system setting
- Show summary under virtual keyboard: list all avaiable keyboards
- Set about phone subtext to device model string.
- Update DND Suggestion text

Change-Id: I20acffcf691d1354c7636f5851b376099844700f
Fix: 35959817
Fix: 36395109
Test: robotests
2017-03-25 02:43:23 +00:00
Fan Zhang
51059c5c91 Move reset options to one place
Change-Id: I419c16cbfc69861e01f28c14abdde137bd78f0bb
Fix: 36458355
Test: make RunSettingsRoboTests
2017-03-24 17:26:33 -07:00
TreeHugger Robot
d3eb1f7f1f Merge "Update WriteWifiConfigToNfcDialog." 2017-03-24 23:48:06 +00:00
Amin Shaikh
42cee74e6b Update settings tests to use new constructor.
Bug: 36571359
Test: m RunSettingsRoboTests
Change-Id: Id8a722fa7627e83d3ed4840128cfca0cb03289d2
2017-03-24 15:50:04 -07:00
Doris Ling
df4c67cc69 Update Sound settings.
- change the summary to show the automatic rules info instead.
- removed ringtone preference category
- add dividers above DND and Emergency broadcast

Change-Id: Iee497d194b70af72cfd69b315d639ca62720643b
Fix: 34975939
Test: make RunSettingsRoboTests
2017-03-24 15:46:09 -07:00
Phil Weaver
296b7263ad A11y shortcut settings enhancement
Adding shortcut on/off switch, improving the service picker,
and adding a switch to enable the shortcut on the lock screen.

Also adjusted setting search code to avoid indexing the
accessibility shortcut aside from the main accessibility settings
page.

Bug: 35872328
Bug: 35219988
Test: Ran in a variety of conditions, ran existing settings test.
Also added basic robo test, verified existing robo tests pass.
Change-Id: I4da9bad74caf96d9c8f3640e7db5417b4ee5d602
2017-03-24 13:15:13 -07:00
TreeHugger Robot
849d38b576 Merge "Set about phone subtext to device model string." 2017-03-24 18:50:51 +00:00
Amin Shaikh
bef3c6ddfd Update WriteWifiConfigToNfcDialog.
- Use the new WifiManager API to retrieve the WPS NFC token for the
current network.
- Add WifiManagerWrapper class to support testing because Robolectric
does not yet support testing Android O.

Bug: 35725168
Test: m RunSettingsRoboTests
Change-Id: I7805bdcbe02dc262083bcd371d4ad88d256f8089
2017-03-24 10:14:02 -07:00
TreeHugger Robot
38931ed7c1 Merge "Hide potentially invisible DO Disclosures by default" 2017-03-24 15:26:46 +00:00
Bartosz Fabianowski
9290184ebf Hide potentially invisible DO Disclosures by default
Hiding/unhiding a pref triggers an animation. DO Disclosures that may
not be visible should be hidden by default so that they fade in if
applicable, not fade out if not applicable.

Also, the network and security logging disclosures should only be shown
if logging is currently on or was on in the past and a network log was
retrieved at least once.

Bug: 32692748
Test: m RunSettingsRoboTests

Change-Id: I8c85f2f66ba295f145e5f5e79febb1b1a9bc6ede
2017-03-24 14:37:01 +01:00
Denis Kuznetsov
0c88ff4ed9 Update List of apps on device string,
remove "XX apps" string.

Bug: 32692748
Test: m RunSettingsRoboTests
Change-Id: I64f833497b5362f95cfc56a1057d97d9539ff029
2017-03-24 13:00:49 +01:00
TreeHugger Robot
8bf18d7d3f Merge "Add test for UserSetting's summary provider." 2017-03-24 00:50:34 +00:00
TreeHugger Robot
775cb1479b Merge "Change "When in VR mode" to full screen radio button picker" 2017-03-24 00:47:37 +00:00
Fan Zhang
d53859df7d Set about phone subtext to device model string.
Also remove useless custom preference

Fix: 36395109
Test: robotests
Change-Id: I07297e6ade6991a8262473c9f59c21d914300244
2017-03-23 17:33:33 -07:00
TreeHugger Robot
4a35585197 Merge "Fix bug: UserPreference's gear icon got accidentally hidden" 2017-03-24 00:10:37 +00:00
TreeHugger Robot
af632ab6b2 Merge "Update string for Connected devices page." 2017-03-23 23:42:15 +00:00
Doris Ling
8f62b9e70a Add test for UserSetting's summary provider.
Change-Id: I5197c109f65f4049e27e704552a2206b19919df3
Fix: 36540644
Test: make RunSettingsRoboTests
2017-03-23 16:08:39 -07:00
Fan Zhang
abbe272e6f Fix bug: UserPreference's gear icon got accidentally hidden
Change-Id: I9715c3aff20ca8b7a324bd2f8629755690ddc119
Fix: 36545470
Test: make RunSettingsRoboTests
2017-03-23 15:37:42 -07:00
TreeHugger Robot
be716e423b Merge "Update text for Users & accounts page." 2017-03-23 21:23:53 +00:00
TreeHugger Robot
bc27c06c5b Merge "Refactor DefaultAppPicker to a general radio button picker" 2017-03-23 21:13:58 +00:00
TreeHugger Robot
7d2b05b26a Merge "Update the system info dialog." 2017-03-23 20:56:49 +00:00