Commit Graph

6510 Commits

Author SHA1 Message Date
TreeHugger Robot
5700ff5dde Merge "Remove LocalePickerWithRegion class in Settings." 2018-07-18 07:38:38 +00:00
Jason Chiu
9b5020c1d2 Fix a test broken by fragment migration.
Change-Id: I68e4f9b53d3492817ea9416fd4127fbe15337ce6
Fixes: 111193572
Test: robotests
2018-07-18 10:53:28 +08:00
jackqdyulei
35015741b2 Hook up anomaly active hour to BatteryTipPolicy
So we can control it from server side.

Bug: 80192137
Test: RunSettingsRoboTests
Change-Id: Ic9a4db44029bdcd7e45f4f9fb6b7d71c8c07c429
2018-07-17 15:42:52 -07:00
TreeHugger Robot
d3e18dcf0a Merge changes from topic "rm_odr_anomaly"
* changes:
  Move anomaly code to BatteryTipUtils
  Remove the anomaly detection added in O-DR
2018-07-17 21:09:36 +00:00
jackqdyulei
5918cd5ff9 Move anomaly code to BatteryTipUtils
Then we could reuse it across settings.

Bug: 74529048
Test: robo test that cover each components still pass
Change-Id: Ied0bbc6e6a1dca9628c2c084c3284ffab2f85160
2018-07-17 12:42:57 -07:00
jackqdyulei
dd9b8af6b9 Remove the anomaly detection added in O-DR
1. Remove unused class and resources
2. Update function in AdvancedPowerUsageDetail since
we don't need pass in anomaly anymore

Change-Id: I96fbe5ddaae902b34b756c7aae0338e49afef1f3
Bug: 74529048
Test: 1. manual test in settings page. 2. robo test still pass
2018-07-17 12:42:43 -07:00
TreeHugger Robot
2e246bb66c Merge "Allow activity to delegate onActivityResult to fragments" 2018-07-17 19:30:39 +00:00
Fan Zhang
af32e726e6 Allow activity to delegate onActivityResult to fragments
Change-Id: Iac388f1726269239313d666f3123f28348e0c90a
Fixes: 111531567
Test: rototests
2018-07-17 10:59:02 -07:00
tmfang
c0ed614252 Remove LocalePickerWithRegion class in Settings.
This class is too complex, we can't afford maintaining this long term.
We need a new Activity that wraps the framework version of LocalePickerWithRegion.

Bug: 111373939
Test: manual test & make RunSettingsRoboTests -j56

Change-Id: I93c719246b84350d2eee4e8ce1ffd97cd168925b
2018-07-17 17:34:00 +08:00
Jason Chiu
baea63bf72 Fix a test broken by fragment migration.
Test: make ROBOTEST_FILTER=SettingsLicenseActivityTest RunSettingsRoboTests
Bug: 111194177
Change-Id: Ifd2d980bbf397ad9875b43d654ab4fc52c4627c2
2018-07-17 15:46:48 +08:00
TreeHugger Robot
e64a75812e Merge "Add a back-up icon resource to icon-less Slices" 2018-07-17 00:21:23 +00: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
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
TreeHugger Robot
c5e51f0317 Merge "Disallow VoiceInteractionService as assist on LowMemDevice" 2018-07-13 21:27:19 +00:00
Jordan Liu
a9ec524463 Merge "Preserve leading 0s in mcc mnc" 2018-07-13 20:57:52 +00: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
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
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
TreeHugger Robot
87873071df Merge "Fix crash when starting daydream setting with wrong context" 2018-07-13 01:09:39 +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
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
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
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
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
TreeHugger Robot
412222ea80 Merge "Add some pages to search index." 2018-07-12 00:50:00 +00:00
Fan Zhang
af1552251f Add some pages to search index.
* Notification access page
* VR Listener page
* Feature flags in dev options
* QS Tile developer options
* User dictionary
* Billing cycle
* Some accessibilty pages

Bug: 70720645
Test: robotests
Change-Id: I4f7d3d65b2803cebf178ac345a79721232df707c
2018-07-11 16:39:29 -07:00
Lei Yu
601beeefe1 Merge "Add sanity check method for BatteryTip" 2018-07-11 22:23:36 +00:00
Kevin Chyn
483bd692ef Merge "4/n: Add basic enrollment for Face" 2018-07-11 03:27:02 +00:00
Kevin Chyn
ea65b51a36 4/n: Add basic enrollment for Face
Bug: 110589286

Test: fingerprint enrolling still works
Test: enrollment flow with and without a pin set up still works properly
Test: enrollment continues when configuration changes, stops otherwise

Change-Id: I39f76c7f1a16e9533cef573f87cf4b81cb20cb18
2018-07-10 18:39:19 -07:00
Lei Yu
b07d1f34c6 Add sanity check method for BatteryTip
This method is used to check whether data in battery tip is still
valid. If not, try recover the data or dismiss the tip.

Change-Id: Idc9e4d49f99e33d3f5e82e694dc78227fc1da41c
Fixes: 111218723
Test: RunSettingsRoboTests
2018-07-10 18:06:17 -07:00
Fan Zhang
4560ab7a35 Add a few pages to search index.
- Data saver
- A few special permission access pages
   - Picture-in-picture
   - Premium sms
   - do not disturb access
- And a unrelated cleanup: move EmptyTextFragment from
  notification/ to widget/

Bug: 70720645
Test: robotests
Change-Id: I6a87f712bf81f9fd32fa9a3826fba851ca748409
2018-07-10 17:02:09 -07:00
Lei Yu
dc313813e6 Merge "Remove DeviceProfilesSettings" 2018-07-10 23:01:13 +00:00
TreeHugger Robot
7b52cb3059 Merge "Update auto brightness pref summary to show on/off" 2018-07-10 20:36:44 +00:00
jackqdyulei
af129e4f6b Remove DeviceProfilesSettings
It's not used anymore since we have a bt detail page.

Change-Id: Ib2ecfabf544913701ca613048e9f37e297ffff18
Fixes: 111305587
Test: robo still pass
2018-07-10 13:31:15 -07:00
Salvador Martinez
3ba12d0086 Merge "Fix incorrect method call to wifiManager in Tether" into pi-dev am: 4804c2c7a5
am: 94bebd2f80

Change-Id: Ia5274cd69ce2d6208cf9490b7a41ec080090cb6f
2018-07-10 12:46:09 -07:00
TreeHugger Robot
4804c2c7a5 Merge "Fix incorrect method call to wifiManager in Tether" into pi-dev 2018-07-10 19:33:29 +00:00
Fan Zhang
b0eab98754 Update auto brightness pref summary to show on/off
Change-Id: I7914957cc9dbffcc12e34fc714bb9c37783a4f33
Fixes: 109885418
Test: robotests
2018-07-10 11:27:25 -07:00
Hall Liu
ed31d718ad Merge "Fix usage of SubscriptionInfo ctor" 2018-07-10 00:08:14 +00:00
TreeHugger Robot
d7f4782bbc Merge "Handle special case slices" 2018-07-09 23:17:59 +00:00
Salvador Martinez
78c3f368c3 Fix incorrect method call to wifiManager in Tether
In the WifiTetherApBandController the incorrect method was
being called to check if the device is 5Ghz compatible. We
were calling is5GhzBandSupported directly, but we were
supposed to call isDualBandSupported instead.

Test: robotests updated
Bug: 110793581
Change-Id: I61d3ff10abedde6196b8e29591ebfd3272dbbcd9
2018-07-09 11:52:34 -07:00
Matthew Fritze
56b2bad05e Handle special case slices
Create a handler for any slice that doesn't include anything
from a PreferenceController.

Test: robotests
Change-Id: If23947152d61877537d0cac6240e96b9ab977bce
Bug: 80263568
2018-07-09 11:21:25 -07:00
TreeHugger Robot
416a11855e Merge "Ask profile password before unifying to prevent untrusted reset" 2018-07-09 18:07:36 +00:00
Pavel Grafov
80d9020cc2 Ask profile password before unifying to prevent untrusted reset
Test: make -j RunSettingsRoboTests
Test: manual, unify when profile lock is compliant
Test: manual, unify when profile lock is not compliant
Test: manual, unify when profile lock is empty
Fixes: 110262879

Change-Id: I0dfa885f2a0e44e09c217b3e7766b367f1340c9e
2018-07-06 14:40:10 +01:00
TreeHugger Robot
9fa595f9c2 Merge changes from topic "q_dark_theme"
* changes:
  Move NightMode to Display settings
  Revert "Setting to change sysui theme"
2018-07-05 03:46:24 +00:00
Pavel Grafov
f9429262d2 Use primary user's LOCK_SCREEN_SHOW_NOTIFICATIONS.
Only primary user can set LOCK_SCREEN_SHOW_NOTIFICATIONS,
profile can only set notifications to be redacted. When the
user changes notification settings for a work app, this class
is invoked from the profile, meaning it attempts to read
LOCK_SCREEN_SHOW_NOTIFICATIONS for the profile, which is not
there. As a result the function always returs 0 for work apps.

Bug: 111112011
Test: atest packages/apps/Settings/tests/robotests/src/com/android/settings/notification/VisibilityPreferenceControllerTest.java
Change-Id: Ifb50209ea8ea8fb6639f00ca8b7cf8a4295890ad
Merged-In: Ifb50209ea8ea8fb6639f00ca8b7cf8a4295890ad
(cherry picked from commit f14de789f4)
2018-07-04 13:02:03 +00:00
TreeHugger Robot
6098784bd5 Merge "Fix new user setting in a call" 2018-07-03 22:35:45 +00:00
TreeHugger Robot
ea97a66383 Merge "Conditionally block battery percantage from search" into pi-dev 2018-07-03 21:35:32 +00:00
Yongjiang Wu
5b120e7479 Fix new user setting in a call
In a call, the flag of UserManager is changed, then "Add user" and
"Guest" items in Settings are still enabled.
To fix this issue, these items will be disabled according to
"UserManager#canSwitchUsers".

Bug: 80447394
Test: make RunSettingsRoboTests ROBOTEST_FILTER=UserSettingsTest
Change-Id: Ib4c754603418528f5c6f1c78b8aabf33e863c8b9
2018-07-03 14:20:39 -07:00
TreeHugger Robot
2fcd7a1cd3 Merge "Use primary user's LOCK_SCREEN_SHOW_NOTIFICATIONS." 2018-07-03 20:54:29 +00:00