Commit Graph

77 Commits

Author SHA1 Message Date
Jihoon Kang
9b946d241d Make java_sdk_library dependencies explicit
modules should specify the submodule of java_sdk_library that the module
actually depends on

Test: CI
Flag: EXEMPT build dependency cleanup
Bug: 358613520
Change-Id: I78dec317d4e74275287e3a5b7f5ffe2b10db05ab
2024-09-10 22:33:56 +00:00
Olivier Nshimiye
b4e6f20567 Add Private Space features flag check to Settings tests
Adding this flag check since we are putting all the implementations of Private Space features behind this flag.

Bug: 326060689
Test: Run presubmits and verify that nothing breaks
Change-Id: I2c0e9a1afc3787232425f79d06d4aeba001283ec
2024-03-04 15:43:47 +00:00
Jigar Thakkar
5bbc1166f3 Use SetScreenLockDialogActivity to power screen lock setup prompt
With this change, we move to using SetScreenLockDialogActivity to enable
the prompt to set up the screen lock. This prompt is shown whenever
someone taps the private space settings page option to either
setup/unlock the space. We will also be using the same dialog prompt in
other places in the framework
(UserManagerService.requestQuietModeEnabled) as well.

Test: atest PrivateSpaceAuthenticationActivityTest
Bug: 316129700
Flag: android.multiuser.show_set_screen_lock_dialog
Change-Id: Ib9fe009d3b36e0eea242fbf894e616b1efcb9d6b
2024-02-20 19:46:54 +00:00
Aditya Choudhary
4f5c1ac5bc [DON'T BLOCK] Test ownership migration rules
This CL is created as a best effort to migrate test targets
to the new android ownership model. If you find incorrect or unnecessary
attribution in this CL, please create a separate CL to fix that.

For more details please refer to the link below,
go/new-android-ownership-model

Bug: 304529413
Test: N/A
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:3f65505208d57fa18be353f815c44fdd6f004f4b)
Merged-In: I7fbd55a92f4302a6e03bcff0283737fd9295165d
Change-Id: I7fbd55a92f4302a6e03bcff0283737fd9295165d
2024-02-09 16:54:41 +00:00
Kevin Jeon
55c8c9b86c Hide Memory usage UI fields if flag is enabled
This change updates the Memory use UI in developer settings to hide
memory fields by default if the AppProfiler PSS deprecation flag is
enabled. A toggle is provided to resume PSS profiling and reinstate the
memory fields, and shows a dialog to reboot if the toggle is updated.

The summary for the "Memory" button in developer settings will show
"Memory profiling disabled" instead of "Avg X GB of Y memory used" if
PSS profiling is not enabled.

Test: With the flag enabled, flash and verify that:
      - The memory fields are hidden by default, and the summary shows
	the expected "Memory profiling disabled" text
      - Clicking the toggle shows the reboot dialog, which will
	correctly change the setting and reboot if accepted, and keep
	the setting and not reboot if denied
      - Check that AppProfiler correctly profiles PSS or RSS based on
	the state of the toggle, which persists across reboots
      - Included UI test for Memory page elements based on flag value.
Bug: 296454553
Change-Id: Ie21791502445a321446cb8110e5800089f47ac58
2023-12-22 01:15:04 -05:00
Fangqiu Su
69c5d2f4af Update the imports to androidx.test.filters.*
Bug: 316941721
Test: mmma .
Change-Id: Id77c442066426ab52fb5c976f980a8881d0f8615
2023-12-19 18:12:48 +00:00
Krzysztof Kosiński
0efd6d855e Clean up obsolete aliases for Truth.
Bug: 255714762
Test: presubmit
Change-Id: I9b83d3dbcc88b91ebfb88d90ebaee6d960ac7d0b
2023-10-24 23:03:57 +00:00
josephpv
31b044ed6a Prompt user to Setup a device lock if not set
This add below changes on selecting private space setting:
1. Prompt user to setup device lock if not already set
2. If device lock is set authenticate user first before displaying private space settings page

Screenshot - https://screenshot.googleplex.com/4SrYHbBMJfVuoRy.png
https://screenshot.googleplex.com/6vNWm7Lg83vfnH8.png
RecordingLink - https://drive.google.com/file/d/1r4zb3ILPRqwvP5tlwfjQ9GgnDAW4vZg6/view?usp=drive_link

Bug: 289016927
Test: atest PrivateSpaceSettingsAuthenticatorTest , atest SecuritySettingsTest
Change-Id: I0e5dfb30213843c0dec60a17d01c30cd91db89b0
2023-10-24 10:42:57 +00:00
Krzysztof Kosiński
c81fbcef2e Clean up obsolete aliases for Truth.
Bug: 255714762
Test: presubmit
Change-Id: I8aab463c74d5e869d949a2b712886a9cc4d15709
2023-10-11 19:39:33 +00:00
Chaohui Wang
56deb8465e New NetworkOperatorSettingsTest
Also DataUsageSettingsTest and NfcSettingsTest.

Fix: 236276001
Test: ui test
Change-Id: Idba525e3d4bbf40fbb414cf76afb9c71166179d9
2023-09-16 13:23:50 +08:00
Chaohui Wang
5b439a3f44 Fix DevelopmentSettingsTest
And MoreWirelessSettingsTests.testVPNMenuLoad

Bug: 290684887
Test: ui test
Change-Id: I37ef70d1f6f75cd1721ab9ba0763f7ec20be80d0
2023-09-15 12:15:39 +08:00
Milton Wu
2c114331aa Merge "[BiometricsV2] Ignore ui tests" into main 2023-09-14 05:59:41 +00:00
Milton Wu
867df4287f [BiometricsV2] Ignore ui tests
Ignore biometricsV2 UI tests

Bug: 299892647
Bug: 299894420
Bug: 299892667
Bug: 299892703
Bug: 299898688
Test: atest FingerprintEnrollmentActivityTest
Change-Id: If7aa509dbc0943aa53ffcc9d118ecc19e59b127f
2023-09-13 08:37:44 +00:00
Chaohui Wang
5bf2981d08 Fix SettingsUITests flakiness
Bug: 290684887
Test: atest SettingsUITests
Change-Id: I8f85c9c50eb3426b740c7ef3bf8996d6655bca0a
2023-09-12 11:44:50 +08:00
Chaohui Wang
e2e0af282a Add DevelopmentSettingsTest
Bug: 290684887
Test: atest SettingsUITests
Change-Id: I3acda74c96679fcdb531990848e456d5da0ae239
2023-09-11 16:10:22 +08:00
Chaohui Wang
a35c6bc139 Fix more SettingsUITests
Also add SettingsUITests to postsubmit.

Bug: 290381395
Test: ui test
Change-Id: Ib1dd35bf7823290bf77deb31366e9cb6ae9f65f7
2023-09-09 22:02:56 +08:00
Chaohui Wang
1caab182a7 Fix some SettingsUITests
Bug: 290381395
Test: atest AppsSettingsTests
Test: atest AppsSettingsRetainFilterTests
Test: atest AboutPhoneSettingsTests
Change-Id: I4c22afabbfc6ef5ed0e5fdcf86370ea0aaae5c74
2023-09-08 15:48:29 +08:00
Milton Wu
f94932801a [BiometricsV2] Add retry button
Add retry button for FingerprintEnrollErrorDialog and make sure that
this button works well in the whole enrollment flow.

Bug: 287168522
Test: manually test this dialog with error and rotate devices
Test: atest FingerprintEnrollEnrollingViewModelTest
Test: atest FingerprintEnrollErrorDialogViewModelTest
Test: atest FingerprintEnrollProgressViewModelTest
Test: atest FingerprintEnrollmentActivityTest
Test: atest biometrics-enrollment-test

Change-Id: Ica1d91d077ca322caca5551068f2a3c23b544361
2023-07-11 17:25:26 +08:00
Milton Wu
570b23e0a0 [BiometricsV2] Fix intro overlap enrolling page
Fix fragment overlapped if user rotates device on findSensor page, then
enter enrolling page and back again.

It is because the flag isFirstFragmentAdded is not saved and restored
after activity recreated

Bug: 288212767
Test: atest FingerprintEnrollmentActivityTest
Test: atest FingerprintEnrollmentViewModelTest
Test: atest biometrics-enrollment-test
Test: Manually test this scenario
Change-Id: I5b582582d97caac2488b787f551c50abec9f810c
2023-06-28 13:28:44 +08:00
Milton Wu
940e5d04a6 [BiometricsV2] Rewrite Activity to Kotlin
Refactor FingerprintEnrollmentActivity as kotlin

Bug: 286197261
Test: atest FingerprintEnrollmentActivity
Test: atest biometrics-enrollment-test
Change-Id: I45d2db832b0111cb865b657aee56f84b0b295efa
2023-06-16 20:36:37 +08:00
Milton Wu
bc2dbee762 [BiometricsV2] Refine fingerprint activities
Seperate FingerprintEnrollmentActivity to another InternalActivity and
SetupActivity. InternalActivity is used for FingerprintSettings.
SetupActivity is used for setupwizard flow.

Bug: 284248001
Test: atest FingerprintEnrollmentActivityTest
Test: atest for biometrics/biometrics2 in unit tests
Test: settingRoboTest for biometrics
Change-Id: I9fb5dc34300060b9ccf857a3335b81a5d4bf5c7b
2023-05-25 06:25:58 +00:00
Fangqiu Su
064c80b470 Merge "Update uiautomator references in packages/apps/Settings/tests/uitests" am: 68903eb9cb am: 378e7af38e am: 5ce99863ea
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2558450

Change-Id: I62bb7a4c90c78cf5631bdd933f8f6e0e9f64797b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-04-25 07:59:00 +00:00
Fangqiu Su
643e908ec4 Update uiautomator references in packages/apps/Settings/tests/uitests
* Remove unused dependencies.
* Replace "ub-uiautomator" (v2.2.0) with
  "androidx.test.uiautomator_uiautomator" (v2.3.0).

Bug: 235842600
Test: mmma .
Change-Id: I216758dc3898875c41f865f5aa25d20bf0386aed
2023-04-24 18:03:02 +00:00
Milton Wu
3024352f85 [BiometricsV2] Fix fingerprint add another fail
Fix enrolling can't finished because FingerprintEnrollment attaches to
wrong ViewModel during onCreate() with non-null savedInstance after
rotation.

Read latest fragment through findFragmentById to fix it

Bug: 275513362
Test: atest FingerprintEnrollmentActivityTest
Change-Id: Icb2c0edec325a813ec5a7822aba39ca201d2d8e9
2023-04-19 17:35:33 +08:00
Milton Wu
15267aab1f [BiometricsV2] IconTouchDialog continue enroll
When user clicks "OK" in FingerprintEnrollEnrollingIconTouchDialog,
continue enrolling.

Bug: 276416053
Test: atest FingerprintEnrollEnrollingViewModelTest
      FingerprintEnrollmentActivityTest
Test: Manually check enrolling status as clicking "OK" button on
      FingerprintEnrollEnrollingIconTouchDialog after enabling
      biometrics v2 v2 through feature flag.
Change-Id: I028723acfe35e5119e43b6860022c7432fc2ae0e
2023-04-11 14:39:59 +08:00
Milton Wu
13d681f914 FingerprintEnrollmentActivity UI test
Add test cases in FingerprintEnrollmentActivity UI tests for
FindSensor fragments.

Bug: 260957816
Test: atest FingerprintEnrollmentActivityTest
Change-Id: I1a256f09a1a5ebe43d6d563e62397f0dd2a1e4cb
2023-01-17 00:07:31 +08:00
Milton Wu
3be7385d90 Refactor FingerprintEnrollFindSensor
Refactor FingerprintEnrollFindSensor to 3 pages for different sensor
types, and apply MVVM for them.

Bug: 259664912
Bug: 260957195
Bug: 260957816
Test: atest FingerprintRepositoryTest FingerprintEnrollmentActivityTest
      AutoCredentialViewModelTest FingerprintEnrollIntroViewModelTest

Change-Id: Iace790952567cac13e61e5175e90555d4da7dfe2
2023-01-10 07:52:37 +08:00
Vincent Wang
bdebd9f346 Add test for FingerprintEnrollment
Bug: 259504907
Test: atest SettingsUITests:FingerprintEnrollmentTest
Change-Id: If7a8a7124b685f4517880517afc7f17b07c0ad29
2022-11-25 15:01:48 +08:00
Cole Faust
43ff89802c Fix errorprone warnings that should be errors
This commit is part of a large scale change to fix errorprone
errors that have been downgraded to warnings in the android
source tree, so that they can be promoted to errors again.
The full list of changes include the following, but not all
will be present in any one individual commit:

BadAnnotationImplementation
BadShiftAmount
BanJNDI
BoxedPrimitiveEquality
ComparableType
ComplexBooleanConstant
CollectionToArraySafeParameter
ConditionalExpressionNumericPromotion
DangerousLiteralNull
DoubleBraceInitialization
DurationFrom
DurationTemporalUnit
EmptyTopLevelDeclaration
EqualsNull
EqualsReference
FormatString
FromTemporalAccessor
GetClassOnAnnotation
GetClassOnClass
HashtableContains
IdentityBinaryExpression
IdentityHashMapBoxing
InstantTemporalUnit
InvalidTimeZoneID
InvalidZoneId
IsInstanceIncompatibleType
JUnitParameterMethodNotFound
LockOnBoxedPrimitive
MathRoundIntLong
MislabeledAndroidString
MisusedDayOfYear
MissingSuperCall
MisusedWeekYear
ModifyingCollectionWithItself
NoCanIgnoreReturnValueOnClasses
NonRuntimeAnnotation
NullableOnContainingClass
NullTernary
OverridesJavaxInjectableMethod
ParcelableCreator
PeriodFrom
PreconditionsInvalidPlaceholder
ProtoBuilderReturnValueIgnored
ProtoFieldNullComparison
RandomModInteger
RectIntersectReturnValueIgnored
ReturnValueIgnored
SelfAssignment
SelfComparison
SelfEquals
SizeGreaterThanOrEqualsZero
StringBuilderInitWithChar
TreeToString
TryFailThrowable
UnnecessaryCheckNotNull
UnusedCollectionModifiedInPlace
XorPower

See https://errorprone.info/bugpatterns for more
information on the checks.

Bug: 253827323
Test: m RUN_ERROR_PRONE=true javac-check
Change-Id: I29f691a22617b1fc834680ff1cf4ab4244203f06
2022-10-23 12:41:39 -07:00
Lais Andrade
fe2ed12d26 Move vibrate for calls setting to "Vibration & haptics" screen
Move setting to configure "Vibrate for calls" into "Vibraiton & haptics"
screen. Also make this page accessible via both Accessibility and
"Sound & vibration" settings pages.

Bug: 185351540
Test: SoundSettingsTest
      manually using the settings app and checking updates
Change-Id: I7e40af3f332fdff8afd1a31d54a676f7e13a6678
2021-12-06 17:23:56 +00:00
Jeff Sharkey
9e07eab08f Request new Bluetooth runtime permissions.
An upcoming platform change is introducing a new "Nearby devices"
runtime permission which contains the new BLUETOOTH_CONNECT and
BLUETOOTH_SCAN permissions.

We have logic in place to use <split-permission> to translate the
older BLUETOOTH and BLUETOOTH_ADMIN permissions into these new
runtime permissions, but modern apps will need to pivot to
requesting them directly as part of targeting Android S.

This change requests both the old and new permissions to avoid
breakage while the new permission enforcement is being phased in.

Bug: 181813006
Test: atest CtsPermission2TestCases
Test: atest CtsPermission3TestCases
Test: atest CtsStatsdAtomHostTestCases
Change-Id: I0a6ff040520deaa7c7a6fecd83e8608a9bf28c4a
2021-03-23 12:35:36 +00:00
Bob Badour
a73a67240c [LSC] Add LOCAL_LICENSE_KINDS to packages/apps/Settings
Added SPDX-license-identifier-Apache-2.0 to:
  Android.bp
  protos/Android.bp
  tests/anomaly-tester/Android.bp
  tests/componenttests/Android.bp
  tests/legacy_unit/InstrumentedEntitlementApp/Android.bp
  tests/perftests/Android.bp
  tests/robotests/Android.bp
  tests/uitests/Android.bp
  tests/unit/Android.bp

Bug: 68860345
Bug: 151177513
Bug: 151953481

Test: m all

Exempt-From-Owner-Approval: janitorial work
Change-Id: I58a85aced69923fa9a8e5a2b89ecfdd33de5e05c
2021-02-25 15:05:14 -08:00
Bob Badour
18e9723489 Revert "[LSC] Add LOCAL_LICENSE_KINDS to packages/apps/Settings"
This reverts commit 0e73d05c74.

Change-Id: I627be6c5355eda9602b1cb201806fce4548fc951
2021-02-25 11:52:32 -08:00
Bob Badour
0e73d05c74 [LSC] Add LOCAL_LICENSE_KINDS to packages/apps/Settings
Added SPDX-license-identifier-Apache-2.0 to:
  Android.bp
  protos/Android.bp
  tests/anomaly-tester/Android.bp
  tests/perftests/Android.bp
  tests/robotests/Android.bp
  tests/uitests/Android.bp
  tests/unit/Android.bp

Bug: 68860345
Bug: 151177513
Bug: 151953481

Test: m all

Exempt-From-Owner-Approval: janitorial work

Change-Id: I81f11a66b5977cb5096e262819084706af5fa54c
Merged-in: I81f11a66b5977cb5096e262819084706af5fa54c
2021-02-21 08:50:16 -08:00
Stanley Wang
153c5d514e Remove search result regression test from Settings.
- Move the test to internal app.

Bug: 116673764
Test: atest SettingsSearchResultRegressionTest
Change-Id: I1d50b896c0f6d7de871f409249b55bc7bfa88f4a
2020-04-21 19:39:00 +08:00
Alex Kershaw
c364f5d95d Remove policy transparency for cross-profile calendar setting
We will likely deprecate this setting in the next release, to be
replaced by usage of 'connected work and personal apps'. However, we are
keeping it in this release as it's still possible that a lightweight
calendar access API could be useful, if the admin and user approvals are
combined.

For now, the error message that refers to cross-profile calendar when
the setting is disabled is confusing admins, since we're not
recommending usage of this API at this time.

Remove the setting when it is disabled, rather than showing policy
transparency.

Fixes: 143477431
Test: manual
Change-Id: I65573a5ba892e12a4dabcdf23541f33516db0a8a
2020-03-31 11:41:44 +01:00
Peiyong Lin
d03dd5ce2a Rename some resource values for graphics driver preferences dashboard.
Bug: b/148626177
Test: make RunSettingsRoboTests ROBOTEST_FILTER=GameDriver
Change-Id: I1f63bd40d5de0cd762bf34a75c7eebd9865a13dd
2020-02-05 18:01:59 -08:00
Tsung-Mao Fang
17de44e052 Update baseline for search index
Rerun SettingsSearchResultRegressionTest#generate_search_result_list,
and then got a new baseline.

This would be helpful to check duplicated/bad search index.

Test: atest SettingsSearchResultRegressionTest
Bug: 113907111
Change-Id: I9dc7edf33ed0e20b08c2af66124c390590ae3b85
2019-11-14 18:40:42 +08:00
Colin Cross
946a0fd964 Convert Settings to Android.bp
See build/soong/README.md for more information.

Test: m checkbuild
Test: m RunSettingsRoboTests-jacoco
Change-Id: I267534c095c30833f77273dbdb1893b7830ed45d
2019-05-13 13:42:01 -07:00
Fan Zhang
094c238ba1 Delete dead tests.
These tests are broken for a while and we don't have owners to maintain
these tests. New tests will be written in robolectric.

Fixes: 131857690
Test: rebuild
Change-Id: I6ad2d7f1aa6bc904df5746b82cd8d9db3e93bd8f
2019-05-02 16:25:37 -07:00
Fan Zhang
625ffbd0e9 Fix homepage display test.
We updated the IA but it's still checking old keywords.

Fixes: n/a
Test: atest
Change-Id: I495201d0a2580e7d600982139907d216aa1f558d
2019-02-27 22:37:07 +00:00
Soonil Nagarkar
139644bb0e Remove dead code from settings
Test: manually
Change-Id: I1ef0bb2a20c6c6f020dd051407dda2de87f174ea
2019-01-30 17:15:54 -08:00
pastychang
79614823cb Rename prefix from suw to sud
Bug: 120805516
Test: RunSettingsRoboTests
Change-Id: I44a399b586671c100cb9d85c97effbfb1a379413
2019-01-04 10:46:20 +08:00
Brett Chabot
031dcf5019 Migrate packages/apps/Settings to androidx.test
See go/jetpack-test-android-migration

Test: make checkbuild
Change-Id: If67b124188fd4e303154eb11263d03abfb3718c6
2018-12-17 09:20:05 -08:00
Andrii Kulian
367f122d28 Merge "Add dev option to force desktop mode" 2018-11-09 19:25:19 +00:00
Andrii Kulian
8e3859bc5a Add dev option to force desktop mode
Bug: 112451761
Test: DesktopModePreferenceControllerTest
Test: FreeformWindowsPreferenceControllerTest
Change-Id: I7df995d1bd8731b813cfa0c72c4dc6d35973e939
2018-11-07 13:57:03 -08:00
Amin Shaikh
57eb049bec Delete Directory access Settings.
Bug: 111892460
Test: m RunSettingsRoboTests
Change-Id: I6ffa5a4b69fa7b3ee9d9a058fa075b60fbd2b0a3
2018-11-02 13:55:15 -04:00
Fan Zhang
2a7c554f96 Format regression test files
Test: retest
Change-Id: I7c44bd39bc80768f455b95b5f314fbe65bf94b96
2018-09-20 14:56:55 -07:00
Matthew Fritze
11fa37ebb4 Add Settings Search Regression test
Take a snapshot of the currently available search results, and
verify that search results aren't accidentally removed.

We use 4 items to identify a search result:
- Title
- Data Key
- Slice Uri

We use Title & Key to identify the search result, since they should not change.
The Slice Uri is used to make sure we don't regress on Slice Availability.

Test: runtest --path packages/apps/Settings/tests/unit/src/com/android/settings/search/SettingsSearchResultRegressionTest.java
Change-Id: I22498229bbcd1e90c9e0a026af9df4367a98190a
2018-09-18 16:42:22 -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