Commit Graph

5516 Commits

Author SHA1 Message Date
Lei Yu
5a9ff423f2 Merge changes I77a53f70,I853d3611
* changes:
  Add functions for table action.
  Create table to store user action.
2018-07-27 01:34:25 +00:00
TreeHugger Robot
143bd993ab Merge "Update AppCheckBoxPreference to show summary" 2018-07-27 00:37:43 +00:00
TreeHugger Robot
f9341c4c0b Merge "When wallpaper colors not ready set sys ui flags when ready" 2018-07-26 23:21:36 +00:00
jackqdyulei
6b09f54e06 Add functions for table action.
1. Insert/Update/Query/Delete
2. Update the action when app been restricted
3. Display restriction time in RestrictedAppDetails

Bug: 111366678
Test: RunSettingsRoboTests
Change-Id: I77a53f70e1ce4b612aabe28b7a1bb5df8f3ec9d5
2018-07-26 16:19:25 -07:00
Matthew Ng
932b20272a When wallpaper colors not ready set sys ui flags when ready
Uses a listener on wallpaper manager to get the wallpaper colors for
fallback home. When the colors are ready it can correctly set the system
ui flags.

Change-Id: I7119c0f035245539cb69bec1ccccecef64d3aff5
Fixes: 79776583
Test: reboot phone, unlock with pin/pattern with light them wallpaper
Test: make RunSettingsRoboTests ROBOTEST_FILTER=FallbackHomeActivityTest
2018-07-26 15:22:41 -07:00
jackqdyulei
db0b4f49c9 Update AppCheckBoxPreference to show summary
The summary is invisible by default if we use preference_app.xml,
this CL turn it on if summary is not empty.

Bug: 111366678
Test: RunSettingsRoboTests
Change-Id: I3fe5827a5e80a8e21309b163dbbaa1070f5ee61e
2018-07-26 15:06:45 -07:00
TreeHugger Robot
44a8768fb1 Merge "Pass in context when loading icons from Tile" 2018-07-26 21:58:49 +00:00
TreeHugger Robot
02e4a027c9 Merge "PowerUsageSummary: move controllers to xml" 2018-07-26 20:13:44 +00:00
Fan Zhang
1c61a58f0d Pass in context when loading icons from Tile
Bug: 111860183
Test: robotests
Change-Id: I836ad66eb420f4e0bd0bbded541f4dfe947c9b18
2018-07-26 13:09:25 -07:00
jackqdyulei
076b674764 PowerUsageSummary: move controllers to xml
Also change the following controllers to have standard constructor
1. BatteryHeaderPreferenceController
2. BatteryTipPreferenceController

Change-Id: I2e68082295eb8ef18de9fef9483a10b070c77a47
Fixes: 111131567
Test: robotest
2018-07-26 11:40:28 -07:00
Prabir Pradhan
ee8bf5d463 Merge "Add a boolean flag to show or hide the device name in About device." 2018-07-26 05:24:49 +00:00
TreeHugger Robot
c793e454ec Merge "Fix the empty preference after clicking gear icon" 2018-07-26 03:34:36 +00:00
felkachang
c2b6764057 Fix the empty preference after clicking gear icon
Because there is no other options for 'None' or 'Swipe, there is no
necessary for showing the gear icon to show options.

'Lock screen message' could be found in
Settings > Display > Lock screen display.

Add testcase to verify the ChangeScreenLockPreferenceController's
behavior.

Test: make ROBOTEST_FILTER=ChangeScreenLockPreferenceControllerTest \
      RunSettingsRoboTests -j40
Change-Id: Icdcd672261749d106162053d6f5228cee420a810
Fixes: 110848852
2018-07-26 10:16:12 +08:00
Prabir Pradhan
7758fcc6dd Add a boolean flag to show or hide the device name in About device.
The following boolean flag is added:
config_show_device_name

When set to false, the device name will not be shown in System > About
Device.

Bug: 111653180
Test: Updated robotests
Change-Id: Id9610e2009604c9d9693428adff01adc7d606565
2018-07-25 17:06:21 -07:00
TreeHugger Robot
6c5d13aadb Merge "Use Tile.getIcon() to avoid caching issue" 2018-07-25 23:25:54 +00:00
Ben Lin
96dc235f6e Check for WiFi controller for summary population.
WiFiController might return not available, so we should only surface
"Wi-Fi" as a summary entry if it's available in the settings page.

This also checks for empty strings in case they are declared as such in
the XML (since XML can be device/product overlay'd), to avoid situations
such as ", data usage".

Bug: 111398942
Test: Manual check, and I see Wi-Fi no longer visible for cases where
Wifi controller isn't available.
Test: make RunSettingsRoboTests
Change-Id: I24736a6240c50e2ea38ce424fbac2316721290d8
2018-07-25 14:14:11 -07:00
Fan Zhang
701b65eccc Use Tile.getIcon() to avoid caching issue
Bug: 77600770
Test: robotests
Change-Id: Icb21f5da9b542abc239b04b71813290ad3104ffb
2018-07-25 12:06:10 -07:00
Doris Ling
c879386e5a Merge "Fix new account not shown for work profile." 2018-07-24 17:57:43 +00:00
Kevin Chyn
3d3219eb02 Merge "Update Security & location preference summary depending on biometrics" 2018-07-24 17:42:36 +00:00
Kevin Chyn
eb0de79ffc Update Security & location preference summary depending on biometrics
Fixes: 110960063

Test: manual
Test: make -j56 SettingsRoboTests ROBOTEST_FILTER=SecuritySettingsTest
Change-Id: Ia9186af37c84f4ff0391d1b72043948934ed997b
2018-07-23 21:21:53 -07:00
Doris Ling
ce5f9c07da Fix new account not shown for work profile.
When refreshing the Accounts settings UI, we uses the cached user info
for checking user status. However, when the work profile is being
updated, the UserInfo obejct for the user might be updated even the
user id is the same. Using the cached data causes stale info to be
returned for the user and results in the latest account data not
being shown properly for the user. Update the cache to the latest user
info retrieved from user manager.

Change-Id: Ic0127842203f0288f2fdea6c6346cd11e42a8bf0
Fix: 38302246
Test: make RunSettingsRoboTests
2018-07-23 16:13:39 -07:00
Fan Zhang
75bafefa49 Move CategoryManager to Settings.
Bug: 77600770
Test: robo
Change-Id: Id4a0c89938d43d21147944b820a191486c589238
2018-07-23 15:09:41 -07:00
TreeHugger Robot
167b232242 Merge "Hide lock screen display in search if it's not in Settings" 2018-07-20 23:10:28 +00:00
Doris Ling
c24865e242 Merge "Fix battery animation not being played." 2018-07-20 22:28:53 +00:00
Fan Zhang
44acde5ee1 Hide lock screen display in search if it's not in Settings
Change-Id: Iacf16eb947a679e08a6c55e0764416cd53cac2e7
Fixes: 111641373
Test: robotests
2018-07-20 14:50:02 -07:00
Doris Ling
09f527d053 Fix battery animation not being played.
- VideoPreference now checks the view visible flag to see if it
should start playing the video when the surface texture is being
updated. Added a default controller for the VideoPreference to
update the view visible flag of the VideoPrefernece when the
setting page is paused/resumed accordingly.
- add the default controller to the adaptive battery video and the
adaptive brightness video.

Change-Id: I1aae2148c27c7157c97541346790542c74377e5a
Fixes: 111103815
Test: make RunSettingsRoboTests
2018-07-20 14:10:25 -07:00
tmfang
5bd7151413 Migrate all AlertDialogs to AndroidX version
- Let test cases can be compatible with AndroidX AlertDialog.
- Theme of Transparent needs to support AndroidX AlertDialog.

Change-Id: I0789b66f52feef30ebab7fb824d0e39d5ae9cc96
Fixes: 111413092
Test: make RunSettingsRoboTests -j56
2018-07-20 13:38:58 +08:00
TreeHugger Robot
6cf7a6e564 Merge "Move logic from SavedAccessPoint fragment to controller" 2018-07-19 23:07:09 +00:00
Fan Zhang
2ff710a911 Move logic from SavedAccessPoint fragment to controller
Change-Id: Ic54e536f97490cec1746fa58c42ec55b60d17f0e
Fixes: 64806699
Test: robotests
2018-07-19 14:49:14 -07:00
TreeHugger Robot
f8d595db54 Merge "Fix cached app icon being used in app list." 2018-07-19 21:16:34 +00:00
Doris Ling
8a5472f516 Fix cached app icon being used in app list.
- change to use the icon from IconDrawableFactory instead of from app
info when building the application list.

Fixes: 63978676
Test: manual, reinstall an app with updated icon and launch
settings->Apps & notifications->See all apps and check the app icon.

Change-Id: I99028ef97fb4fec8c90708b26caaddb7325c1ddb
2018-07-19 12:50:36 -07:00
TreeHugger Robot
295980fbb5 Merge "Use SettingsRobolectricTestRunner in settings app" 2018-07-19 19:25:49 +00:00
TreeHugger Robot
39bb6cec3e Merge "Make app predicates singleton" 2018-07-19 18:50:36 +00:00
jackqdyulei
63a5c6f9ab Use SettingsRobolectricTestRunner in settings app
Change-Id: I3682ea52c53ff4fcce7e9aa52a4a6827bb31b2cb
Fixes: 111646366
Test: robotest
2018-07-19 11:21:20 -07:00
jackqdyulei
341ad63da7 Make app predicates singleton
1. AppLabelPredicate
2. AppRestrictionPredicate

Change-Id: I1fd8611c5dd7ffa6318bcb23de7a973c111910b6
Fixes: 111323520
Test: RunSettingsRoboTests
2018-07-19 10:51:42 -07:00
TreeHugger Robot
e64020540c Merge "Fix a test broken by fragment migration." 2018-07-19 17:44:48 +00:00
Lei Yu
499f71988f Merge "Hook up anomaly active hour to BatteryTipPolicy" 2018-07-19 17:14:45 +00:00
Aarthi Balachander
d779db4009 Move functions to settingslib for more code reuse
Bug: 110376110
Test: Tested on device
Change-Id: I2bbb8d01f675fc254e783b97b44d16f36846a416
2018-07-18 20:05:24 -07:00
TreeHugger Robot
ec7a9df676 Merge "Use the migrated injected setting code in settingslib. Manual merge to master from pi-car-dev Bug: 68198078 Test: Tested on device Change-Id: Iff767cd6bf7408b45ce9594628d3fd0a71744e9f" 2018-07-19 02:10:46 +00:00
Raff Tsai
0f4affb9a0 Merge "Fix AlertDialog corner and color accent" 2018-07-19 01:00:28 +00:00
TreeHugger Robot
4cbf887d94 Merge "Convert SavedAccessPoints to DashboardFragment (step 1)" 2018-07-19 00:25:14 +00:00
TreeHugger Robot
1d7ee9b997 Merge "Clean up saved network screen" 2018-07-18 23:32:10 +00:00
Fan Zhang
d5547c68bf Convert SavedAccessPoints to DashboardFragment (step 1)
Change-Id: I5d8fa8497e04c9314dead9af7534df4507ffd591
Bug: 64806699
Test: robotest
2018-07-18 16:21:24 -07:00
Fan Zhang
661049f4d9 Clean up saved network screen
Bug: 64806699
Test: rebuild
Change-Id: I4392809f08034c7c13575db2f5c41468fcea0987
2018-07-18 15:13:21 -07:00
TreeHugger Robot
ad2e828f57 Merge "Unrestrict SMS/PHONE app if it been set active" 2018-07-18 20:43:38 +00:00
Aarthi Balachander
d0f835981c Use the migrated injected setting code in settingslib.
Manual merge to master from pi-car-dev
Bug: 68198078
Test: Tested on device
Change-Id: Iff767cd6bf7408b45ce9594628d3fd0a71744e9f
2018-07-18 13:34:25 -07:00
jackqdyulei
f1213365fc Unrestrict SMS/PHONE app if it been set active
If an app been set default SMS/PHONE app, we need to unrestrict this
app. This CL extract a common function and invoke it when necessary.

Change-Id: Id29c5138438aa6f6f22cdd9c4ecf336de8481782
Fixes: 80305978
Test: robotests
2018-07-18 12:32:34 -07:00
tmfang
1d44acce67 Fix test cases broken
- AndroiX AlertDialog needs to use Theme.AppCompat.
- Create a ShadowAlertDialogCompat which can be compatible with AndroidX AlertDialog.

Fix: 111247403
Test: make RunSettingsRoboTests -j56 ROBOTEST_FILTER=com.android.settings.password.ChooseLockTypeDialogFragmentTest

Change-Id: I3e4bca285ecaefa5705c8d170050c21d1bc649e0
2018-07-18 19:39:39 +08:00
Raff Tsai
0810afee9b Fix AlertDialog corner and color accent
- Add some attributes in Theme.AlertDialog

Change-Id: Ifb9ca98ee11f6c82cda4a576d10b5fde54f788be
Fixes: 110917586
Test: mannual
2018-07-18 15:40:51 +08:00
TreeHugger Robot
5700ff5dde Merge "Remove LocalePickerWithRegion class in Settings." 2018-07-18 07:38:38 +00:00