Commit Graph

7050 Commits

Author SHA1 Message Date
James Lemieux
3a55de44c5 Prepare tests for impending robolectric merge
Some ShadowUserManager function moved into the basic shadow in
robolectric proper and has been removed from the Settings
ShadowUserManager.

Test: make -j56 RunSettingsRoboTests
Change-Id: I38647dae5d16bc79bc7925ca139c9362a2035393
2018-11-20 16:40:57 -08:00
Maurice Lam
cc2cf5ba5a Remove ShadowLibcoreTimeZoneNames
Bug: 119829838
Test: atest RunSettingsRoboTests
Change-Id: I756265945dcf7c3b7a78a627c4dc32cff3c8e55c
2018-11-20 15:01:22 -08:00
TreeHugger Robot
3673833417 Merge "Prepare tests for impending robolectric merge" 2018-11-20 17:49:57 +00:00
Neil Fuller
1e1961a5b3 Track move of timezone classes to libcore.timezone
Some time zone related libcore classes are moving from
libcore.util to libcore.timezone.

Bug: 119026403
Test: build only
Change-Id: I920411dfa7e000a0da9678826a035e0461211619
2018-11-20 10:52:52 +00:00
Emily Chuang
1e24cb02dc Add contextual card dismissal implementation
When users clcik on the remove button in dismissal view, the card should
be marked as dismissed in the database, and the UI should be refreshed.

Bug: 113783548, 119594116
Test: robotests
Change-Id: I980600c4c0753ad5abc52ae63bac7196a4b818f1
2018-11-20 12:53:19 +08:00
tmfang
012b089a91 Allow below divider for all EntityHeader
- Create an method in LayoutPreference let other class can
  set divider status.
- EntityHeaderController will allow to have a below divider
  by default.

Test: visual, robotest
Bug: 116346008
Change-Id: Ic041b8fef8d22ce1b7ea48eedfbe97c708c41ce7
2018-11-20 11:52:29 +08:00
Johnson Lu
4942fd2aff Merge "Add QrCodeGenerator for QrCode encoding" 2018-11-20 03:33:24 +00:00
Johnson Lu
be878dc06c Add QrCodeGenerator for QrCode encoding
Bug: 118794858
Test: RunSettingsRoboTests
Change-Id: I1e27c7b7bf97c1b683be7d200e1f3bbdc763c4c1
2018-11-20 09:54:59 +08:00
James Lemieux
1fc96ea98d Prepare tests for impending robolectric merge
Setting's ShadowUserManager.reset() was unnecessary and collided with a
newly introduced reset() method in its super class. It has been removed.

Test: make -j56 RunSettingsGoogleRoboTests &&
  make -j56 RunSettingsRoboTests &&
  make -j56 RunSettingsLibRoboTests

Change-Id: I63c50eca0de3581fd4f64f4862233446f5937d0c
2018-11-19 16:56:40 -08:00
Sunny Shao
408dc883f7 Added the launching account page
Settings get account name and account avatar from SI.
According the account name to launch the account page.

Bug: 119608711
Test: robotest
Change-Id: I0d53e9445f4ba5ce470bd079038db0f08f0cc1c8
2018-11-20 07:38:50 +08:00
TreeHugger Robot
565c6ca5b3 Merge "Fix data usage failing test." 2018-11-19 20:28:25 +00:00
Fan Zhang
87c69c0440 Merge "Disable toggling wifi tethering in secondary user." 2018-11-19 18:32:11 +00:00
TreeHugger Robot
f9fcdc1b74 Merge "Refined the CardContentProvider unused operations" 2018-11-19 18:00:25 +00:00
Doris Ling
9f1c617016 Disable toggling wifi tethering in secondary user.
- in previous release, the shortcut widget was for the top level
Hotspot & Tethering settings page. The top level settings has logic to
check whether the page is restricted and remove all preferences and
show a message to tell the user that tethering settings are not
available, and the user will not be able to launch the wifi hotspot
settings page.
- the updated shortcut now launches the wifi hotspot page directly.
The settings does not check for restriction. Copy the logic from the top
level settings to check for restriction and remove all preferences
accordingly.

Change-Id: I76fb7838e2db379f6ffbce7bf14003bccc1b10d3
Fixes: 116642428
Test: make RunSettingsRoboTests
2018-11-16 15:05:22 -08:00
Doris Ling
ac00f2cb76 Fix data usage failing test.
- update the tests that faile when data usage v2 is turned on.

Change-Id: I6bd09245d695791fb1564b6e598600e889d0712f
Fixes: 117433810
Test: make RunSettingsRoboTests
2018-11-16 13:06:37 -08:00
TreeHugger Robot
bd088c4205 Merge "Only update mutable shortcuts." 2018-11-16 19:11:26 +00:00
Raff Tsai
d9d57be243 Merge "Fix Settings crash when clicking search bar" 2018-11-16 15:45:26 +00:00
TreeHugger Robot
3704899fc9 Merge changes from topic "settings-action-button"
* changes:
  Remove setButtonPositive method
  Apply new action button visual design
  Create a new visual design for action buttons
2018-11-16 10:45:29 +00:00
TreeHugger Robot
3f31a7820d Merge "Make UI refresh when there is only one contextual card left." 2018-11-16 09:50:31 +00:00
Sunny Shao
8e5807fcc9 Refined the CardContentProvider unused operations
updated delete and update operations to throw UnsupportedOperationException

Bug: 119647595
Test: robotest
Change-Id: If77662213b89dc91b9ca2d6b028c635a46266eab
2018-11-16 15:44:53 +08:00
Yanting Yang
5b5d4c6d33 Merge "Add Low Storage slice to Contextual Settings Homepage" 2018-11-16 07:36:02 +00:00
tmfang
5c7f4de999 Remove setButtonPositive method
Since new UI design only exist two button in layout,
we don't need these methods anymore.

Test: robotest
Bug: 116346008
Change-Id: If2e8f7dddb9c13e480438f36fe3c5d6affa4e9ff
2018-11-16 14:33:16 +08:00
tmfang
3adb74ea60 Apply new action button visual design
- Add some icon resources.
- Add icon for each button in action button preference.
- Update "Enable" and "Disable" string to "Install" and "uninstall".
- Remove unused string.
- Add divider between entity header and action buttons.

Test: visual, robotest
Fixes: 119203074
Bug: 116346008
Change-Id: Ib8d7aeb2943d39d257e977b84f165f002bf47559
2018-11-16 14:33:03 +08:00
Emily Chuang
9c52951ba6 Make UI refresh when there is only one contextual card left.
After having card dismissal mechanism implemented, it is possible that
the card list loaded from the card loader will be empty (users may
dismiss all cards). When there is only one card remaining on the screen
and user dismiss it, the card should go away.

Fixes: 119580732
Test: robotest
Change-Id: I7ae3b03f16a0b8b009d8aa77811b5a6d39c359e7
2018-11-16 14:15:54 +08:00
Raff Tsai
d103f8eb81 Fix testcase fail
-Ignore testcase in RemoteDeviceNameDialogFragmentTest
-Fix SettingsPreferenceFragmentTest and ApnEditorTest testcase fail

Test: make RunSettingsRoboTests
Change-Id: I63053cd2256c9c00f92b57a813513e5df05fd60a
Bug: 119592320
2018-11-16 12:26:23 +08:00
Doris Ling
79848abfbd Only update mutable shortcuts.
When trying to update the flags for the existing shortcuts, check and
skip the immutable shortcuts, since they should not be modified.

Change-Id: Iee70ed92f45c1b0b0f0c5b902069c017acfa4990
Fixes: 119119713
Test: make RunSettingsRoboTests
2018-11-15 16:29:53 -08:00
Beverly Tai
4fa2b88556 Merge "Add new settings page for apps overriding dnd" 2018-11-15 18:06:06 +00:00
Raff Tsai
a75a724bdd Fix Settings crash when clicking search bar
- When user disable settings suggestion in App Settings, click
search button without leaving settings app. The search button is
still existed.
- Doesn't allow user to disable app in App Settings
- Add check before start search intent

Change-Id: Ifbc4615914678d8df734e14d63bb626403313d1e
Fixes: 118805907
Test: manual
2018-11-15 18:08:40 +08:00
Yanting Yang
04eb082bce Add Low Storage slice to Contextual Settings Homepage
Bug: 114808204
Test: robotests, visual
Change-Id: I0c1a02dc40a0a72b7a2ad8f46505325e52bee942
2018-11-15 16:32:12 +08:00
Leon Liao
d6f13c1c49 Merge "Implement a11y UI for Accessibility timeout feature." 2018-11-15 07:17:40 +00:00
TreeHugger Robot
6f93c8bb31 Merge "Fix App permission doesn't show summary" 2018-11-15 04:10:40 +00:00
Leon Liao
fc29b1c331 Implement a11y UI for Accessibility timeout feature.
This UI control the Accessibility Timeout API in Settings App.
Add a user control to set timeout length to suit their need.

Bug: 119283926
Test: atest AccessibilityTimeoutControllerTest
Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=CodeInspectionTest
Test: atest UniquePreferenceTest
Change-Id: Ic8f7337e6bd7739c1189382cc87d45465b64c6ed
2018-11-15 10:24:43 +08:00
tmfang
8f65efa8f9 Create a new visual design for action buttons
- Create a new style for two action buttons.
- Change the layout of two_action_buttons.
  Since we use same style for positive/nagative
  buttons now, we only remain button1/button2 for
  this layout.
- Create a setButtonIcon interface in ActionButtonPreference.
  So, user can set icon for each button in this preferece.

Test: visual, robotest
Bug: 116346008
Change-Id: I511272cba5fd961349b85cae6d30004ddabe2c8e
2018-11-15 10:15:58 +08:00
TreeHugger Robot
ac6377199e Merge "Show device name in About Phone summary." 2018-11-15 02:13:35 +00:00
TreeHugger Robot
1a2d01b8a6 Merge "Use ColorDisplayManager" 2018-11-15 00:40:26 +00:00
Doris Ling
97d0593298 Show device name in About Phone summary.
- change from using device model to device name for the top level about
phone preference summary.

Change-Id: I6c1891f3867f55cf1501baf76ea147e2df49111e
Fixes: 119157622
Test: make RunSettingsRoboTests
2018-11-14 14:52:41 -08:00
Beverly
7973c635c9 Add new settings page for apps overriding dnd
Close starred contacts cursor

Test: atest ZenModeAllBypassingAppsPreferenceControllerTest
Test: atest ZenModeBypassingAppsPreferenceControllerTest
Bug: 111475013
Change-Id: I84d259aaef1bc5cc907ec5bef08beade91a8b904
2018-11-14 15:56:29 -05:00
tmfang
057539f186 Fix App permission doesn't show summary
Since AppPermissionsPreferenceController assigns
a fixed preference key in constructor, so it can't
be used by same controller in Privacy page.

So, we change contructor directly, let controller
read preference key from xml file.

- Also remove unused imports.

Test: visual
Bug: 116628158
Change-Id: I42d6e978e91f0a2fe796d290cb9f34db596aa1f4
2018-11-14 16:25:48 +08:00
Fan Zhang
97d993fb3e Merge "Update logging: switch a bunch of action() logging calls." 2018-11-14 07:27:14 +00:00
Fan Zhang
a6c7db1888 Update logging: switch a bunch of action() logging calls.
Use generic action(int, int, int, String, int) instead of
action(Context, int, string, Pair...) when possible.

Bug: 117860032
Test: robotests
Change-Id: I5213b52b2b10d80a3c488c37718df81b3b0a428f
2018-11-13 21:50:34 -08:00
TreeHugger Robot
345e154b89 Merge "Sort contextual cards based on their score." 2018-11-14 04:33:23 +00:00
Emily Chuang
f7f1b9b233 Sort contextual cards based on their score.
Fixes: 119493779
Bug: 111822376
Test: robotests
Change-Id: I254cba3c92ca1b58633f2ea6b2fa381607549e0c
2018-11-14 10:37:25 +08:00
Cosmo Hsieh
e57e432160 Merge "Implement NetworkRequestDialog architecture(cont.)" 2018-11-14 01:43:47 +00:00
John Reck
f68130c7c7 Merge "Add force SmartDark dev setting" 2018-11-13 20:33:37 +00:00
Risan
2ebf61cd61 Merge "Allow StubVolume to be browseable in Settings" am: 8f516adef7 am: e613923d66
am: 1670c69b7c

Change-Id: Id567d995f6f25a46225a2080609048051cca2337
2018-11-13 12:13:14 -08:00
Risan
1670c69b7c Merge "Allow StubVolume to be browseable in Settings" am: 8f516adef7
am: e613923d66

Change-Id: I8eea682dec3eba70a2d44c32ba6e28641118300a
2018-11-13 11:57:54 -08:00
Treehugger Robot
8f516adef7 Merge "Allow StubVolume to be browseable in Settings" 2018-11-13 19:20:38 +00:00
TreeHugger Robot
034e218d3a Merge "Read SettingsIntelligence package name from resource" 2018-11-13 10:58:23 +00:00
Neil Fuller
e451323669 Merge "Remove the feature flag and dead code for the old time zone picker" am: 6bb4b5ca43
am: 78e132773a

Change-Id: Ie8890265b7dd1b5248ccef4dbb0f6fd58da55f85
2018-11-13 02:03:38 -08:00
TreeHugger Robot
523418a456 Merge "Add dismissal mechanism for contextual cards." 2018-11-13 09:13:46 +00:00