Commit Graph

4709 Commits

Author SHA1 Message Date
Andreas Gampe
8f4716c401 Settings: Disable failing assert
Temporarily disable.

Bug: 73892004
Test: m RunSettingsRoboTests
Change-Id: I67dbf04ae59e54632155c3eda67c70335147fd19
2018-02-26 12:35:13 -08:00
Andreas Gampe
8123135388 Settings: Disable failing test
Disable temporarily.

Bug: 73892683
Test: m RunSettingsRoboTests
Change-Id: I8dcc30b0b090fef1f2fd8fa3c6de7bf69e8b97a9
2018-02-26 12:31:05 -08:00
Andreas Gampe
d20728e4ef Settings: Disable failing test
Disable temporarily.

Bug: 73892555
Test: m RunSettingsRoboTests
Change-Id: I85292ad20de2cb169825eccb19dff1eb82e6fbe1
2018-02-26 12:31:05 -08:00
Andreas Gampe
72eb284ae7 Settings: Fix assertThat in tests
Truth.assertThat is a fluent-style API. Fix the tests to actually
do something.

Found by errorprone.

Bug: 73513670
Test: m RunSettingsRoboTests
Test: m javac-check RUN_ERROR_PRONE=true
Change-Id: Ie0ab35348fa56c73e6257477a50ff130450e74e7
2018-02-26 12:26:36 -08:00
Andreas Gampe
b506fb9b19 Settings: Disable failing tests.
Temporarily disable.

Bug: 73892008
Test: m RunSettingsRoboTests
Change-Id: I06df032d4a4de84c2f9f46e5086d97f688b0c989
2018-02-26 12:24:53 -08:00
Andreas Gampe
22bad556a1 Settings: Fix assertThat in tests
Truth.assertThat is a fluent-style API. Fix the tests to actually
do something.

Found by errorprone.

Bug: 73513670
Test: m RunSettingsRoboTests
Test: m javac-check RUN_ERROR_PRONE=true
Change-Id: Ib923de28ce5dcf79b9dec718306877e31e58e024
2018-02-26 12:21:06 -08:00
Andreas Gampe
025ec2ba58 Settings: Fix assertThat in test
Truth.assertThat is a fluent-style API. Fix the tests to actually
do something.

Found by errorprone.

Bug: 73513670
Test: m RunSettingsRoboTests
Test: m javac-check RUN_ERROR_PRONE=true
Change-Id: I032f6741ac0c728781a9d22ab6158e7b74a30167
2018-02-26 12:13:00 -08:00
Zhizhi Liu
4b01eebe8b Merge "Move IconCache to SettingsLib(II)." 2018-02-26 19:22:04 +00:00
Victor Chang
61f7288166 Fix not delivering result to fragment using SubSettingLauncher
- Call Fragment.startActivityForResult instead of Activity's one

Test: make RunSettingsRoboTests
Test: App info page is closed instantly after uninstalling the package
Change-Id: If29c097c988101f89dcd9d0a5c1c68deed04eaa9
2018-02-26 15:41:52 +00:00
TreeHugger Robot
ce281e060d Merge "Fix bug causing the Overlay Settings page to be hidden behind overlays." 2018-02-26 13:38:47 +00:00
Peter Visontay
9aeaa197a9 Fix bug causing the Overlay Settings page to be hidden behind overlays.
Test: Manually using an app that displays a full-screen overlay.
Test: make RunSettingsRoboTests -j32 ROBOTEST_FILTER=DrawOverlayDetailsTest
Bug: 72734249

Change-Id: I84b61fea2a793bebfac025ca3a209286ceeef963
2018-02-26 12:04:57 +00:00
Fan Zhang
f7843adabd More renaming in DashboardFragment
getPreferenceControllers() -> createPreferenceControllers() for the same
reason as in ag/3647936

Bug: 73668763
Test: robotests
Change-Id: I97670a91a2a38d1c844d1b9d37f4222c5e6f45a0
2018-02-23 16:56:30 -08:00
Fan Zhang
aed8994f6f Rename Indexable::getAllPreferenceControllers.
To getPreferenceControllers. "all" is redundant. Then internally, the
old getPreferenceControllers() is renamed to
createPreferenceControllers() to emphasize the controllers are created
from code (versus the ones created from xml).

Bug: 73668763
Test: robotest
Change-Id: Ifec46aefdc2a418031c8e152028b30bdcd396fc7
2018-02-23 16:37:28 -08:00
TreeHugger Robot
8e6d5ad27e Merge "Instantiate pref controllers from xml if it's defined." 2018-02-24 00:13:45 +00:00
TreeHugger Robot
158096d25d Merge "Settings: Move DefaultAppInfo CandidateInfo to SettingsLib" 2018-02-23 23:31:47 +00:00
TreeHugger Robot
43a2ac6c7c Merge changes from topic "ww_5_auto_restrict"
* changes:
  Add special check for excessive bg anomaly
  Add auto restriction for excessive background
2018-02-23 22:56:48 +00:00
Fan Zhang
917f101899 Instantiate pref controllers from xml if it's defined.
- If a <preference> tag also defines a controller, we will try to
  instantiate it before displaying the UI. The same logic is shared by
  BaseSearchIndexProvider so it also drives search suppression.

- If user also defines a list of controllers programatically, the
  programatically created ones takes precedence.

Bug: 73668763
Test: WIP
Change-Id: I7aecec270bcd3af261e012ef1f6995d2a523cfa1
2018-02-23 14:08:51 -08:00
Dake Gu
fef14cac00 Settings: Move DefaultAppInfo CandidateInfo to SettingsLib
Bug: 3600711
Test: Moved DefaultAppInfoTest to SettingsLib
      m RunSettingsRoboTests
Change-Id: If9e2288009277f1940b9769790b78bb0a58b626a
2018-02-23 13:23:16 -08:00
TreeHugger Robot
7d8e770bcb Merge "Actually test for truth." 2018-02-23 20:53:16 +00:00
TreeHugger Robot
f783267a57 Merge "Fix reset button being disabled." 2018-02-23 20:51:28 +00:00
Maurice Lam
b93f6c171c Merge "Improve pattern layout for tiiiny screens" 2018-02-23 19:00:43 +00:00
Vishnu Nair
a206e58079 Merge "Simplify Window/Surface trace by using one QS Tile" 2018-02-23 18:25:04 +00:00
jackqdyulei
457fb842eb Add special check for excessive bg anomaly
To check whether this app has battery usage more than x%

Bug: 72385333
Test: RunSettingsRoboTests
Change-Id: I87e6b01c866a053658f84ce3486120ae82963fd9
2018-02-23 10:12:05 -08:00
jackqdyulei
3ee28c810d Add auto restriction for excessive background
If it is excessive bg anomaly and auto restriction is on, then
restrict the anomaly in receiver and store it in database.

Also in this cl we move the anomaly logic to a JobService, so all
works are done in a background thread and won't interfere the main
thread.

Bug: 72385333
Test: RunSettingsRoboTests &&
Will add auto restriction test once robo framework is updated(b/73172999)
Change-Id: Id0ec5fb449ce26bf19a292bcbe63838d621cfd8e
2018-02-23 10:11:34 -08:00
Narayan Kamath
42614c6787 Merge "AnomalyTester: Remove dependency on bouncycastle." 2018-02-23 17:36:59 +00:00
TreeHugger Robot
019ed399fb Merge "Settings: Change an assert in test" 2018-02-23 12:54:22 +00:00
hansson
a42bfa83df Merge "packages/apps/Settings: Set LOCAL_SDK_VERSION where possible." am: f5b75dd74d am: aa0812f42b
am: 685b923a1b

Change-Id: I39a6aad6f8bf21741de4feb838694ab43dc5d074
2018-02-23 07:35:31 +00:00
hansson
685b923a1b Merge "packages/apps/Settings: Set LOCAL_SDK_VERSION where possible." am: f5b75dd74d
am: aa0812f42b

Change-Id: I6ef97b4506cf656194090bcf9b0df543190f1e79
2018-02-23 07:30:14 +00:00
hansson
aa0812f42b Merge "packages/apps/Settings: Set LOCAL_SDK_VERSION where possible."
am: f5b75dd74d

Change-Id: Ie9aa31d9a2d89a330b682c8602320ad58cbc8ae1
2018-02-23 07:24:45 +00:00
TreeHugger Robot
41baba147c Merge "Fix NPE in InstantAppButtonsPreferenceController" 2018-02-23 06:53:32 +00:00
TreeHugger Robot
c55276c919 Merge "Revert "[Settings] Add focus for SSIDtext to show IME"" 2018-02-23 06:43:23 +00:00
TreeHugger Robot
db88fb8de5 Merge "Settings: Annotate JUnit4 test with @Test" 2018-02-23 06:19:08 +00:00
Andreas Gampe
a8e5e217d5 Settings: Change an assert in test
Avoid isEqualsTo for a self-equality test.

Bug: 73797873
Test: m javac-check RUN_ERROR_PRONE=true
Test: m RunSettingsRoboTests
Change-Id: I6f0398b4518d6c967c8cfea38b5c075304b5f368
2018-02-22 22:00:10 -08:00
Andreas Gampe
f259c55eed Settings: Annotate JUnit4 test with @Test
Mollify Errorprone.

Bug: 72076216
Bug: 73796195
Test: m javac-check RUN_ERROR_PRONE=true
Test: m RunSettingsRoboTests
Test: atest WifiSettingsUiTest
Change-Id: I9bc950f0ecf8d6de89b9401ea4cf1c50fd3acbcd
2018-02-22 20:33:37 -08:00
TreeHugger Robot
9cb0c7f3e2 Merge "Setting to control UI mode" 2018-02-23 04:24:54 +00:00
Yuchen Chang
a253de1906 Revert "[Settings] Add focus for SSIDtext to show IME"
This reverts commit c6233057ca.

Reason for revert: cause side effect for other cursor focus missing

Change-Id: I9c788a2726bdd6bc7c663e9115bbc24538f871de

Bug: 73702700
Bug: 72882629
2018-02-23 04:01:07 +00:00
Tracy Zhou
2b730e420d Merge "Correct picture-in-picture setting behavior for managed profile." 2018-02-23 03:13:00 +00:00
Doris Ling
1f49715466 Fix reset button being disabled.
- When doing factory reset, we will launch the account credential
confirmation. If this fails, the settings page is re-initialized.
This steps might trigger multiple layout changes for the scrollview
before it is finalized. However, we are removing the global layout
listener once we receive the first update, which could result in the
reset button being disabled incorrectly, as the scroll state is
calculated based on wrong view heights. Remove the call that remove
the layout listener, so that we can still receive further updates.

- also remove the scroll listener once we enable the reset button
from scroll, as no more action is really needed on suceeding scroll.

Change-Id: I6ec1f592991629c15e5ad2bcb29fdd679d598f70
Fixes: 73298075
Test: make RunSettingsRoboTests
2018-02-22 16:33:07 -08:00
Tracy Zhou
8ce416977c Correct picture-in-picture setting behavior for managed profile.
- Show picture-in-picture setting in the app info page for managed
profile.
- Navigate to work app setting instead of non-work app setting on
tapping setting icon from picture-in-picture window. This requires
correctly processing passed-in UserHandle to fetch the right package
info.

Bug: 71592457
Test: make RunSettingsRoboTests
Change-Id: Id3dd04e88a57ae3d8c319c17615992637128589b
2018-02-22 16:00:28 -08:00
Hansong Zhang
f4a168d0fe Add developer menu entry to enable Bluetooth AVDTP delay reports
Bug: 32755225
Test: Manual test with a device that supports delay reporting;
Robolectric tests
Change-Id: I8f121dd7f94bce3a07deb9cb23c698829cbecd96
2018-02-22 21:54:44 +00:00
Lei Yu
87a17d01a6 Merge "Add action to open the anomaly detail page" 2018-02-22 20:55:46 +00:00
Lei Yu
0bb26fef09 Merge "Fix the update error in EarlyWarningTip" 2018-02-22 20:27:53 +00:00
Lei Yu
6e42055dc7 Merge changes from topics "ww_4_delete_data", "ww_3_checkconfig", "ww_2_uploadIntent", "ww_1_receiver"
* changes:
  Add JobService to delete obsolete anomaly data
  Add code to handle anomaly config update
  Add AnomalyConfigReceiver
  Add AnomalyDetectionReceiver
2018-02-22 20:27:00 +00:00
Zhizhi Liu
c4e8369ab0 Move IconCache to SettingsLib(II).
Remove IconCache from Settings.

Test: Setting tests passed.
Change-Id: If4d256c5baec2fae8a1cba3cc3a62d4612a2d417
2018-02-22 12:26:26 -08:00
Vishnu Nair
8443e8f74b Merge "Add QS dev tiles to active tiles area when enabling it from dev options" 2018-02-22 19:13:18 +00:00
Doris Ling
8f7edfa108 Fix NPE in InstantAppButtonsPreferenceController
- check for valid install options menu before trying to disable it.

Change-Id: Ibe644a506094e66b0f657092a25557f5096d4942
Fixes: 73767192
Test: make RunSettingsRoboTests
2018-02-22 10:39:13 -08:00
Anton Hansson
861554a2d9 packages/apps/Settings: Set LOCAL_SDK_VERSION where possible.
This change sets LOCAL_SDK_VERSION for all packages where
this is possible without breaking the build, and
LOCAL_PRIVATE_PLATFORM_APIS := true otherwise.

Setting one of these two will be made required soon, and this
is a change in preparation for that. Not setting LOCAL_SDK_VERSION
makes the app implicitly depend on the bootclasspath, which is
often not required. This change effectively makes depending on
private apis opt-in rather than opt-out.

Test: make relevant packages
Bug: 73535841
Change-Id: Ic906adbd670c4dbfe2cdf0b71cdbeaf9ac08a27e
2018-02-22 16:12:29 +00:00
Vishnu Nair
74100b3ac7 Simplify Window/Surface trace by using one QS Tile
- Trigger both traces using a new Winscope Trace Tile

Bug: 73496681
Test: make RunSettingsRoboTests ROBOTEST_FILTER=WinscopeTraceTest
Test: flash and manually click on new tile
Change-Id: I3e05f625a983c382e58cc797d293a695223c630a
2018-02-22 07:14:36 -08:00
Vladislav Kuzkokov
38bfe2e43d Merge "Add policy disclosure for printing." 2018-02-22 14:54:36 +00:00
jackqdyulei
1b472be833 Add action to open the anomaly detail page
This action is used to go to the anomaly detail page.
This cl also refactored the RestrictedAppDetails to take AppInfo
as the input, not AppOpsManager.PackageOps.

Bug: 72385333
Test: RunSettingsRoboTests

Change-Id: I5b4481091635e1250629ea21c2b650db929c18ed
2018-02-21 17:58:36 -08:00