Commit Graph

48588 Commits

Author SHA1 Message Date
Johnson Lu
62367be28b Merge "Refine QrCamera.getBestPreviewSize method" 2018-11-21 05:38:15 +00:00
James Lemieux
bbb4e91b3f Merge "Prepare tests for impending robolectric merge" 2018-11-21 05:16:08 +00:00
Johnson Lu
b0e66c8807 Refine QrCamera.getBestPreviewSize method
Compares aspect ratio of camera preview and preview window to get better
preview size.

Bug: 118797380
Test: RunSettingsRoboTests
Change-Id: I5c58691b02c2b5d9709ff956e86ca301196d5664
2018-11-21 11:50:36 +08:00
TreeHugger Robot
afc09c5234 Merge "Allow below divider for all EntityHeader" 2018-11-21 03:37:39 +00:00
Maurice Lam
4fc11cee00 Merge "Remove ShadowLibcoreTimeZoneNames" 2018-11-21 02:33:01 +00:00
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
Mill Chen
4b19fecd50 Update new UI for conditional collapsibility
- Add a footer view with collapsing button and this view will be
appended to the last position of condition cards when condition
cards are expanded.
- Add a header view with expanding button when condition cards
are in collapsed state.

Bug: 119593268, 113451905
Test: rebuild, visual
Change-Id: I82c20641d1542e45383da48106f8fedea06a68ed
2018-11-20 23:20:53 +00:00
Maurice Lam
cc2cf5ba5a Remove ShadowLibcoreTimeZoneNames
Bug: 119829838
Test: atest RunSettingsRoboTests
Change-Id: I756265945dcf7c3b7a78a627c4dc32cff3c8e55c
2018-11-20 15:01:22 -08:00
Kevin Chyn
f611fe8689 Merge "Simplify preview logic" 2018-11-20 18:12:42 +00:00
TreeHugger Robot
3673833417 Merge "Prepare tests for impending robolectric merge" 2018-11-20 17:49:57 +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
Kevin Chyn
7d7ffda9ae Simplify preview logic
Fixes: 112564159
Bug: 119786386

Test: manual
Change-Id: I42fba5a53248193fbe820e710a863ec9de728d4a
2018-11-19 18:34:31 -08: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
f8a2304da4 Merge "Tweak strings" 2018-11-19 22:08:46 +00:00
TreeHugger Robot
565c6ca5b3 Merge "Fix data usage failing test." 2018-11-19 20:28:25 +00:00
John Reck
1e136ea046 Tweak strings
Bug: 119120272
Bug: 119621549
Test: n/a
Change-Id: I73a7b594b02f6ebea2e7d15e15ebd681fe9270db
2018-11-19 12:27:39 -08:00
Fan Zhang
1f8e60b1c5 Merge "Apply new action buttons style for instant app" 2018-11-19 18:59:29 +00:00
Fan Zhang
84a1acbcc7 Merge "Add below/above dividers for new action buttons" 2018-11-19 18:35:19 +00:00
TreeHugger Robot
bedd1d1ee1 Merge "Change Switchbar fontFamily and textSize" 2018-11-19 18:33:39 +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
tmfang
86fcd905b0 Add below/above dividers for new action buttons
- App info
- App storage
- Power usage

Test: visual
Bug: 116346008
Change-Id: Ie4a4ad6f41b74e7bc38f3ac99f241da6be19e647
2018-11-19 18:02:09 +08:00
Raff Tsai
667e9137f6 Change Switchbar fontFamily and textSize
Test: manul
Change-Id: I8e03dd9ca500ab5517ed7a0d4abcb6e9edfbe239
Fixes: 116342461
2018-11-19 17:43:18 +08:00
tmfang
787cfb34c8 Apply new action buttons style for instant app
Test: visual
Bug: 116346008
Change-Id: I5a9f31960da28757e51683db4011820f7339e2f9
2018-11-19 14:10:53 +08:00
Kevin Chyn
b4dcebec03 Use the correct manager to generate token
Bug: 111548037

Test: manual
Change-Id: I84f106ace988165f9f6dbc667c46302cbd1c6226
2018-11-16 15:58:02 -08: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
Salvador Martinez
5e568343c2 Merge "Update Settings components for dark theme" 2018-11-16 18:29:48 +00:00
Raff Tsai
d9d57be243 Merge "Fix Settings crash when clicking search bar" 2018-11-16 15:45:26 +00:00
Johnson Lu
dda5cbad68 Merge "Add QrDecorateView for QrCode scanner implementation" 2018-11-16 13:06:27 +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
Johnson Lu
49abb2cc6d Add QrDecorateView for QrCode scanner implementation
This view draw the lines at the corner of the inner frame.

Bug: 118797380
Test: RunSettingsRoboTests
Change-Id: I159dba8d3a23eaa489932a1a13f63a574079b448
2018-11-16 10:45:51 +08:00
Raff Tsai
6c731f4631 Merge "Fix crash on AppInfoDashboardFragment" 2018-11-16 02:14:23 +00: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
Salvador Martinez
2bb9930866 Update Settings components for dark theme
This CL updates the colors and properties of various themes and
widgets to make them follow dark theme UI. Specifically, it changes
the color accent and uses true black for the background.

Test: manual inspection
Bug: 111397440
Change-Id: I15214a4c5d4864244af856312d2fc3e3a7e7ce36
2018-11-15 15:00:44 -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
tmfang
5659fc6ac9 Fix crash on AppInfoDashboardFragment
When AppInfoDashboardFragment launch a new page,
it sets SUB_INFO_FRAGMENT(1) as request code.

This request code is same as REQUEST_REMOVE_DEVICE_ADMIN(1).
So, when AppInfoDashboardFragment got onActivityResult callback,
it will handle the event about REQUEST_REMOVE_DEVICE_ADMIN.

So, we change REQUEST_REMOVE_DEVICE_ADMIN to a unique value.

Test: manual test, robotest
Fixes: 118841475

Change-Id: Idabd62c5062ccfbf4b8acee82df7401fc9ce7484
2018-11-15 16:58:29 +08:00