Commit Graph

47118 Commits

Author SHA1 Message Date
Jackal Guo
6490923251 Change the order of preferences in a11y
Some preference items have the same order, and it makes these items
be sorted in different position per languages. Use unique order for
each items instead.

Bug: 77949267
Test: atest CtsAccessibilityTestCases
Test: manual check the order in different languages
Change-Id: Ibfcb316c4299266b053053d9d88819a7dcc158fa
2018-07-17 11:19:05 +08:00
TreeHugger Robot
0c605c80a7 Merge "Move non-theme styles to styles.xml" 2018-07-17 02:33:50 +00:00
Fan Zhang
a122be1c35 Move non-theme styles to styles.xml
1. Move SUW related themes into its own theme file.
2. Move non-theme styles into styles.xml
3. Move theme styles to themes.xml
4. Group all TextAppearence together in styles.xml
5. And remove some unused resources

Bug: 111454230
Test: manual
Change-Id: I1067a01cf1960bc72ec92528177ac5fcbd4faa3a
2018-07-16 17:59:07 -07:00
TreeHugger Robot
20f85d2a27 Merge "Remove more unused theme customization" 2018-07-17 00:23:46 +00:00
TreeHugger Robot
e64a75812e Merge "Add a back-up icon resource to icon-less Slices" 2018-07-17 00:21:23 +00:00
Fan Zhang
dec6b8cd38 Remove more unused theme customization
Bug: 111454230
Test: manual
Change-Id: I704247ffe1092165365f7604f17372c79afd46ed
2018-07-16 16:14:56 -07:00
Matthew Fritze
c38f7e1d0a Add a back-up icon resource to icon-less Slices
Currently, when a Settings Slice dosen't have an icon, we add an IconCompat
object with the resource 0x0 - which gives an empty icon. This is from the UX
direction that we should only have icons for Settings Slices when the
corresponding Settings have icons in the Settings UI.

However, this causes an issue with a recent change to SliceView, which crashes
the UI when a Slice is rendered without an icon. Previously, the icon code path
was only exercised when the Slice Shortcut view was being used, but after the
change, the icon path is always used and thus crashes when trying to fetch a
resource with id 0x0 from Settings or another provider.

About 2/3rds of Settings Slices do not have icons.

This change adds the Settings App icon as the back-up icon for any Slice which
would otherwise not have an icon.

The impact of missing this change is:
- Settings Slices cannot be shown in launcher spaces until a post-P update comes
from the support library.
- If Settings launches with the bug, Slices cannot patch the API which would require
all Slices to have a non empty icon (b/111438616)

Bug: 111082093
Test: Robotests, Settings Search UI testing, Slice browser testing
Change-Id: I6f326b6b41bf59011a211c6340dd639f68e754e1
2018-07-16 15:34:24 -07:00
TreeHugger Robot
cd489ea2d5 Merge "Clean up theme part 1: move attrs to attrs.xml" 2018-07-16 22:12:05 +00:00
Brad Ebinger
c30af9b8d1 Merge "IMS: Use the slot based ImsManager factory reset API." am: 9e4ff6fca6 am: 15ca33865c
am: aca1e304bd

Change-Id: I0b3b6198e895caf4c33354ffb2fc20b599540387
2018-07-16 14:21:57 -07:00
TreeHugger Robot
9eb270e15e Merge "Fix a incorrect type cast for alert dialog" 2018-07-16 21:08:21 +00:00
Fan Zhang
612fc1ea40 Clean up theme part 1: move attrs to attrs.xml
And remove unused theme and layouts.

Bug: 111454230
Test: rebuild
Change-Id: Iaf418a9a3dc014fc0eac096e60b0e4581c6ededb
2018-07-16 14:00:20 -07:00
Brad Ebinger
aca1e304bd Merge "IMS: Use the slot based ImsManager factory reset API." am: 9e4ff6fca6
am: 15ca33865c

Change-Id: I5fcdcb5b74a828d4377d2bc4e8e567f61ff9a899
2018-07-16 13:55:25 -07:00
Brad Ebinger
15ca33865c Merge "IMS: Use the slot based ImsManager factory reset API."
am: 9e4ff6fca6

Change-Id: I42b0a06ed5707475d105646233ac49958de29d75
2018-07-16 13:32:55 -07:00
Brad Ebinger
9e4ff6fca6 Merge "IMS: Use the slot based ImsManager factory reset API." 2018-07-16 19:57:31 +00:00
Fan Zhang
420f385a18 Fix a incorrect type cast for alert dialog
Change-Id: I2265c4510785f88ef7950cd29779848eb2e58dc4
Fixes: 111488148
Test: manual
2018-07-16 12:23:57 -07:00
Doris Ling
ed2486a6c1 [automerger skipped] DO NOT MERGE Fix summary text for advanced button. am: 20e7c9d0ba -s ours
am: ca9617ac6b  -s ours

Change-Id: I163ccd679b9321013ec064172442146e732d8e3e
2018-07-16 11:51:46 -07:00
Doris Ling
ca9617ac6b [automerger skipped] DO NOT MERGE Fix summary text for advanced button.
am: 20e7c9d0ba  -s ours

Change-Id: I357656196bb6d24404aa797f380e1935264c1ac6
2018-07-16 11:46:54 -07:00
TreeHugger Robot
9bd5b318fc Merge "Remove custom style for preferenceFragmentStyle" 2018-07-14 02:46:16 +00:00
Fan Zhang
1b11c68642 Remove custom style for preferenceFragmentStyle
Bug: 111454230
Test: manual
Change-Id: I84d3ba3876c636461afaeb6d77a8a759b339f733
2018-07-13 18:13:41 -07:00
TreeHugger Robot
64f0a05471 Merge "Fix incorrect imports for AlertDialog" 2018-07-13 22:56:18 +00:00
Fan Zhang
33bef3748e Merge "Fix a crash when trying to find fingerprint sensor" 2018-07-13 21:51:18 +00:00
TreeHugger Robot
c5e51f0317 Merge "Disallow VoiceInteractionService as assist on LowMemDevice" 2018-07-13 21:27:19 +00:00
Fan Zhang
fb5bc069e7 Fix incorrect imports for AlertDialog
Test: robotests
Change-Id: Ic17121cfd4dbe2d15f6d2250649cc71b82aa2c15
2018-07-13 14:21:15 -07:00
TreeHugger Robot
1f8efc14c9 Merge "Clean up: fix incorrect @VisibleForTesting imports" 2018-07-13 21:11:26 +00:00
Jordan Liu
a9ec524463 Merge "Preserve leading 0s in mcc mnc" 2018-07-13 20:57:52 +00:00
Fan Zhang
1b7ab5b40d Fix a crash when trying to find fingerprint sensor
Change-Id: I5bd237fde6d08ace7f8910808a88ba7b62610cba
Fixes: 111443778
Test: manual
2018-07-13 13:32:57 -07:00
Fan Zhang
176ccd0c35 Clean up: fix incorrect @VisibleForTesting imports
Test: rebuild and robotests
Change-Id: I33d7ee1c0622c01f592920baaf01d44ad19d9a13
2018-07-13 13:08:53 -07:00
Fan Zhang
b918f226d7 Disallow VoiceInteractionService as assist on LowMemDevice
Bug: 111443156
Test: robotests
Change-Id: Ic3413af2b5450c43c4749b7748b676a01209a5ac
2018-07-13 12:55:50 -07:00
Doris Ling
20e7c9d0ba DO NOT MERGE Fix summary text for advanced button.
- the resource for the summary text is in the support library. However,
the prebuilt version in the build does not contain the latest change for
the summary text. Add the overlay for the summary resource here with the
updated translation to remove the redundant summary prefix in the
advanced button.

Change-Id: Ib6db0c402d79a2d965e6060b1851d7b898ae3f94
Fixes: 111195268
Test: manual
2018-07-13 12:32:00 -07:00
Hall Liu
ae1bac1837 Fix usage of SubscriptionInfo ctor am: f0072b7345
am: f9b76dfda1

Change-Id: I73d41c06ee5006310ccc5b0ece5b73919370231f
2018-07-13 11:41:21 -07:00
Hall Liu
f9b76dfda1 Fix usage of SubscriptionInfo ctor
am: f0072b7345

Change-Id: I0ec1335abfef8fc30c638636e3bb1ac24a221743
2018-07-13 11:27:19 -07:00
Jordan Liu
21d5942006 Preserve leading 0s in mcc mnc
Fixes: 79408450
Test: ApnEditorTest.java
Change-Id: Iad7ffe04f23b30857588e50d7f5f0dd307bd2c6e
2018-07-13 10:44:39 -07:00
TreeHugger Robot
3889acd53f Merge "Fix 2 tests broken by fragment migration." 2018-07-13 17:20:48 +00:00
Hall Liu
f0072b7345 Fix usage of SubscriptionInfo ctor
Use string arguments instead of ints for mcc/mnc

Bug: 35064313
Test: manual, unit
Change-Id: Ib460d6294d8fb86de7c2fee065defb0a890af15a
(cherry picked from commit 02c5f3c7ac)
2018-07-13 10:13:46 -07:00
hughchen
244c7586f9 Use corresponding profile to get active bluetooth device
- Do not use streamType to decide which active device should return.
  Base on b/80453878 comment#6, the steamType intent will only be sent
  if an action is made on stream volume or a media route is changed:
  For instance when a call to setStreamVolume() or getDeviceForStream() is made.
  It is not broadcast on actual routing changes.
  It should not be used as an indicator that the route changed during a call.
  There is no callback API and the only option is polling with getDeviceForStream().
- Use corresponding profile to get active bluetooth device
  instead of streamType
- Add test to verify the result of findActiveDevice()
  eg:
  1. A2dp device active, hearing aid device not active : return a2dp device
  2. A2dp device not active, hearing aid device not active : return null
  3. hfp device active, hearing aid device not active : return hfp device
  4. hfp device not active, hearing aid device not active : return null

Bug: 80453878
Test: make -j42 RunSettingsRoboTests
Change-Id: I5bd94899a5d508e60ce911da9689b727ad1fc20c
2018-07-13 09:11:04 +00:00
Hall Liu
2061c2bda8 Fix usage of SubscriptionInfo ctor
am: 1b3985010d

Change-Id: Ie4c85110eb1f9de5c8d7aba2f76b076b622872e3
2018-07-12 21:15:24 -07:00
TreeHugger Robot
87873071df Merge "Fix crash when starting daydream setting with wrong context" 2018-07-13 01:09:39 +00:00
Hall Liu
1b3985010d Fix usage of SubscriptionInfo ctor
Use string arguments instead of ints for mcc/mnc

Bug: 35064313
Test: manual, unit
Change-Id: Ib460d6294d8fb86de7c2fee065defb0a890af15a
(cherry picked from commit 02c5f3c7ac)
2018-07-13 00:24:39 +00:00
Xiangyu/Malcolm Chen
0f07f45494 Merge "Fix bug of phoneListener always listens to default subId in WFC." 2018-07-13 00:09:12 +00:00
Fan Zhang
0a80d936f8 Fix 2 tests broken by fragment migration.
Change-Id: Ieda64e5c2ed9ca43158ce361f79eff9c6b35f464
Fixes: 111194289
Test: robotests
2018-07-12 16:38:26 -07:00
Malcolm Chen
c68e6b3d90 Fix bug of phoneListener always listens to default subId in WFC.
In WiFi calling settings, although each WifiCallingSettingsForSub
instance has its mSubId, the mPhoneStateListener always listens to
state of default subId, which is incorrect. This is to fix that.

Bug: 109787945
Test: In DSDS device, open WFC settings. Make phone call using default
voice phone, and check that WFC setting tab of the other phone is
not greyed out.
Change-Id: I126047c6099bf156b40e0145aa55df0fdf8ef882
2018-07-12 22:32:20 +00:00
Fan Zhang
6269e50e8e Fix crash when starting daydream setting with wrong context
The context must be a UI context. This is a new requirement in P.

(Also converted the CurrentDream controller to be slice compatible)

Change-Id: I28874f296da617f4cedf6706b0663b76671f1780
Fixes: 111375261
Test: robotests
2018-07-12 14:40:28 -07:00
TreeHugger Robot
01911cf9f6 Merge "Fix a crash when setting lock pattern in SUW" 2018-07-12 20:04:33 +00:00
Fan Zhang
81b4d99ae3 Fix a crash when setting lock pattern in SUW
Change-Id: Ic2f1bc5946014d126f2d600966764e1f00be6559
Fixes: 111381755
Test: manual in SUW
2018-07-12 12:06:17 -07:00
Fan Zhang
5c3816ba03 Remove NewDeviceIntroSuggestion
The functionality is entirely replaced by other apps.

Change-Id: Id3d425cf92a07bae070cd22c0d726aba0472dd5d
Fixes: 111195449
Test: robotest
2018-07-12 11:23:38 -07:00
Raff Tsai
00d42c510d Modify icon color and fix search bar corner
- add android:colorAccent attribute in theme
- fix wrong xmlns

Change-Id: Ia8a0a715edf40959c952f8982298a830bedfa156
Fixes: 111359684
Test: manual
2018-07-12 17:32:46 +08:00
TreeHugger Robot
368eec88b5 Merge "Add new widget SingleTargetGearPreference" 2018-07-12 08:16:32 +00:00
tmfang
f12e6adcdc Settings Fragment Migration (Fix test cases)
Fix all Roboletric test cases.
In this CL, some test cases are broken.
So, We ignored these test cases temporarily.

Test: make RunSettingsRoboTests -j56
Bug: 110259478
Change-Id: I1a3075438a614432a2de4f2d96d8abf9a83ce58c
2018-07-11 18:24:51 -07:00
tmfang
27c84de325 Settings Fragment Migration (Build pass app)
This patch focused on fixing compile errors and some runtime errors.

Test: We can't test it now. But we will have an integration test later.
Bug: 110259478
Change-Id: I16c471ddcd0fa1460c665b7f74d86fcace5ee67b
2018-07-11 18:24:51 -07:00
tmfang
99cc23d0da Settings Fragment Migration (Change imports)
This commit *only* changes imports and optimize imports.
We don't do anything else.

This patch can't compile pass and run test case.
We will update other patches to fix these problem.

Change list.

1. import android.app.Fragment; ->
   import androidx.fragment.app.Fragment;
2. import android.app.DialogFragment; ->
   import androidx.fragment.app.DialogFragment;
3. import android.app.ListFragment; ->
   import androidx.fragment.app.ListFragment;
4. import android.app.LoaderManager; ->
   import androidx.loader.app.LoaderManager;
5. import android.content.AsyncTaskLoader; ->
   import androidx.loader.content.AsyncTaskLoader;
6. import android.content.Loader; ->
   import androidx.loader.content.Loader;
7. import android.app.FragmentTransaction; ->
   import androidx.fragment.app.FragmentTransaction;
8. import android.app.FragmentManager; ->
   import androidx.fragment.app.FragmentManager;
9. import android.app.LoaderManager.LoaderCallbacks; ->
    import androidx.loader.app.LoaderManager.LoaderCallbacks;

Bug: 110259478
Test: Can't test it.
Change-Id: I0a3f98fff34a3494a839c3c42aeabcec3df2c8b3
2018-07-11 18:23:51 -07:00