Commit Graph

138 Commits

Author SHA1 Message Date
Treehugger Robot
418f3ef6b9 Merge "settings(payments): Use newly exposed formal API for CardEmulation.getServices()" into main 2023-10-31 18:17:00 +00:00
Chaohui Wang
268c036711 Remove android.content.pm.flags-aconfig-java
Bug: 307923417
Test: presubmit
Change-Id: I586518964d7b424594ff823044dd1d08524ff0d4
2023-10-31 19:04:57 +08:00
Roshan Pius
a5d82be483 settings(payments): Use newly exposed formal API for CardEmulation.getServices()
Bug: 307352220
Test: Compiles
(cherry picked from https://android-review.googlesource.com/q/commit:1b6f9160c6954619bc86a3f7c7c39241b2427d91)
Change-Id: Iaaa37a8e55d755f8abcbaa26c31bf7962e166e96
2023-10-31 01:14:44 +00:00
Jean Chen
48d73aa3f3 feat(MultiFingerMultiTap): Add two-finger triple-tap shortcut on magnification dialog
The shortcut is separate from single-finger triple-tap. It’s under hardware shortcut and above/outside of Advanced section.

Bug: 297805269
Test: manual
Test: atest ToggleScreenMagnificationPreferenceFragmentTest
Change-Id: Id74cf3e457c04e167f3100d977b6c70c5d601026
2023-10-25 13:30:27 +00:00
Chaohui Wang
fcc636d571 Rearrange Settings dependencies
Bug: 285231003
Test: m Settings
Change-Id: Id5adab7d9a24265b98db9959c30904e82ad60dd4
2023-10-24 15:44:38 +08:00
Jihoon Kang
f528f7eaf3 Temporarily disable nullaway plugin
The nullaway plugin fails in errorprone build with stubs generated from
the API signature files, although the nullability information between
the from-text and from-source stubs are identical. Below is the failing
error message:
```
packages/apps/Settings/src/com/android/settings/accessibility/AccessibilitySettingsContentObserver.java:54: error: An unhandled exception was thrown by the Error Prone static analysis plugin.
            contentResolver.registerContentObserver(uri, false, this);
                           ^
     Please report this at https://github.com/google/error-prone/issues/new and include the following:

     error-prone version: 2.15.0
     BugPattern: NullAway
     Stack Trace:
     com.google.common.util.concurrent.UncheckedExecutionException: java.lang.RuntimeException: expected call to iterator(), instead saw null
```
The error message indicates that the nullaway plugin is throwing an
uncaught exception. Given that the plugin has been recently introduced
to the tree and is currently being only used by Settings, this change
proposes to temporarily disable the plugin to unblock the from-text stub
generation feature and re-enable the plugin once the issue is fixed.

Test: m Settings
Bug: 306242755
Bug: 304077181
Change-Id: I617d8f20ceeefb339b3c1f8cd03af94a8c37fd39
2023-10-23 18:20:59 +00:00
Iavor-Valentin Iftime
54bec848cc Merge "Settings for Polite Notifications" into main 2023-10-11 12:04:37 +00:00
Jacky Wang
d84c11f22c Add nullaway errorprone plugin for nullness check
Bug: 304077181
Test: manual - make Settings RUN_ERROR_PRONE=true
Change-Id: Ic523b966271d8f16bf8b3df5b961c5ffbc17d76c
2023-10-09 12:20:32 +08:00
Chaohui Wang
c2691b247c Merge "Not repeat zxing-core dependency" into main 2023-10-07 10:39:21 +00:00
Omer Ozer
8d4d286d8f Add feature flags for Factory Reset Wizard.
Bug: 301283840
Test: Manual
Change-Id: I1e0d71003fe8a5fe93de6ee5a8c725b5abafb048
2023-09-29 18:17:18 +00:00
Valentin Iftime
9f82e7381a Settings for Polite Notifications
Adds settings page for polite notifications.

Test: atest PoliteNotificationsPreferenceControllerTest
Test: atest PoliteNotificationFilterControllerTest
Test: atest PoliteNotifVibrateUnlockedToggleControllerTest
Test: atest PoliteNotifWorkProfileToggleControllerTest

Bug: 270456865

Change-Id: I3ec497b068c15205df97bb26ee007beed8da9ee1
2023-09-28 09:42:50 +00:00
Chaohui Wang
76802413bd Not repeat zxing-core dependency
zxing-core dependency is transitive added by SettingsLib.

Bug: 302420261
Test: manual - try scan QR code in Settings
Change-Id: I06ac9b1852bde22403feee6e1272e73afab353bf
2023-09-28 11:33:15 +08:00
Joshua McCloskey
1ec202576d Moved FakeFingerprintManagerInteractor
Test: atest
Bug: 295206367
Change-Id: If9f3b9dc88260c0725f70d3444c4f9a4b6ee5c2f
2023-09-22 16:55:25 +00:00
Sudheer Shanka
abbb5c4dc3 Add controls in dev options to quarantine apps.
Bug: 297934650
Test: m -j RunSettingsRoboTests
Test: atest SettingsUnitTests
Change-Id: Ic0f35b370c04dd4ed3baaf3610b46ff1b37a0463
2023-09-18 07:27:37 +00:00
Hao Dong
6b58dad5b5 Add dependency on BiometricsSharedLib.
Test: N/A

Change-Id: Icbd4df8e5bca638f385fa040496902797f38fdec
2023-09-11 19:00:14 +00:00
Justin McClain
7e837fae82 Remote authenticator enrollment navigation.
This change adds an entry point for Remote Auth enrollment and
navigation through the flow.

Bug: b/293906345
Test: make RunSettingsRoboTests -j40
Change-Id: I9bc803e24c4181ed73a0ef90b171897c677e71d1
2023-08-31 21:24:09 +00:00
Treehugger Robot
7bdddc9c34 Merge "Fix theme differences between left/right pane problem" into main 2023-08-29 02:10:50 +00:00
Sunny Shao
9669cf5db9 Fix theme differences between left/right pane problem
- Add a callback class to monitor the split behavior of the activity
  embedding and update UI if necessary.

Fixes: 279516059
Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=com.android.settings.homepage.SettingsHomepageActivity
Change-Id: I32e86265638684ddde067539a0f493be4c04afae
2023-08-28 20:43:46 +08:00
Yiyi Shen
a7aeb86ec8 Merge "Add flag for Subsequent pair Settings integration" into main 2023-08-28 08:03:52 +00:00
Yiyi Shen
14c611a37c Add flag for Subsequent pair Settings integration
Bug: 296507968
Test: Manual
Change-Id: I87002c4e8143df1e67e3c32eff6d654575b81051
2023-08-28 14:06:30 +08:00
Allen Su
f22d5e98c0 Migrate LocaleNotification to main trunk
Bug: 248514263
Test: make RunSettingsRoboTests -j128 ROBOTEST_FILTER=AppLocalePickerActivityTest LocaleListEditorTest LocaleNotificationDataManagerTest NotificationCancelReceiverTest NotificationControllerTest
Change-Id: Iac7ffd493485be8ebb10ae63e5ca4ea7a57c8c78
2023-08-25 05:14:56 +00:00
Zaiyue Xue
aa37dd953e Merge "Battery usage page latency improvement (1-8)" into udc-qpr-dev am: 1dad0bf856 am: d1a0370ddb
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/24211971

Change-Id: I2e0c1388e423cc18db20bbbb1f14b73d9667199f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-18 02:47:49 +00:00
Joshua Mccloskey
9163a5db6d Merge "Basic structure for fingerprint enrollment." into main 2023-08-16 15:10:55 +00:00
Zaiyue Xue
50da7feeb9 Battery usage page latency improvement (1-8)
Save battery slot diff data into database in hourly job. Then read the
saved diff data and only calculate the remaining data. This could speed
up the battery usage loading.

Bug: 261163071
Fix: 261163071
Test: manual
Change-Id: Icd4868ca9326b64b17ddbccdb0311e755dc68026
2023-08-16 15:12:04 +08:00
Joshua McCloskey
2407b4033a Basic structure for fingerprint enrollment.
Bug: N/A
Test: Enroll introduction screen works as expected
Test: User is prompted with pin/pattern/pass if the token is not
present.

Change-Id: I32a182b09c3bcd9be43428c500bfae7b39a74e63
2023-08-14 21:09:16 +00:00
Chaohui Wang
2cab62254c Use resource processor for Settings
Bug: 293810334
Test: m Settings
Test: robotests
Change-Id: Ie515e137648eddfdfcab5e8095f5be99721d9e1b
2023-08-11 22:39:08 +08:00
Treehugger Robot
a3d930a7c0 Merge "Define the anomaly proto for anomaly detection project" into udc-qpr-dev am: a9a8c4ed19 am: 4b038ad59b
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/24239143

Change-Id: I0a1edc9535e3dff85f00daa6df7dfda73746a42c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-28 19:30:09 +00:00
Zaiyue Xue
77bb2e1ce0 Define the anomaly proto for anomaly detection project
Bug: 284893240
Test: presubmit
Change-Id: Ifecc0c952392c58f5c10147d37d3de21a05157b5
2023-07-28 08:35:33 +00:00
Joshua McCloskey
b7f0d7a8ff Moving FingerprintSettings to Kotlin
This change is the first of many, it will

1. Change java -> kotlin
2. Use the MVVM architecture
3. Be feature flagged

This change in particular is focused on transitions to and from various activities.

Enable feature via
adb shell setprop sys.fflag.override.settings_biometrics2_fingerprint true

Bug: 280862076
Test: atest FingerprintSettingsViewModelTest
Change-Id: I8eb5c30e6f2e92c256ae7c257a9d560439ba418f
Merged-In: I8eb5c30e6f2e92c256ae7c257a9d560439ba418f
2023-07-11 17:43:07 +00: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
Joshua Mccloskey
cde233abf0 Merge "Moving FingerprintSettings to Kotlin" 2023-06-29 12:31:22 +00:00
Joshua McCloskey
9642d1e8cb Moving FingerprintSettings to Kotlin
This change is the first of many, it will

1. Change java -> kotlin
2. Use the MVVM architecture
3. Be feature flagged

This change in particular is focused on transitions to and from various activities.

Enable feature via
adb shell setprop sys.fflag.override.settings_biometrics2_fingerprint true

Bug: 280862076
Test: atest FingerprintSettingsViewModelTest
Change-Id: I8eb5c30e6f2e92c256ae7c257a9d560439ba418f
2023-06-28 18:09:35 +00:00
Chaohui Wang
63eddc12dd Refactor FeatureFactory
Not use reflection, sets the FeatureFactoryImpl in SettingsApplication
instead.

Bug: 286764889
Test: m Settings
Test: m SettingsSpaUnitTests
Test: m RunSettingsRoboTests
Change-Id: I881bf1009a94222fc89578d14a6792a6e1507be2
2023-06-28 09:09:39 +00:00
Chaohui Wang
966f72c4c3 Clean up Settings_srcs & Settings_manifest
Bug: 286764889
Test: m Settings
Change-Id: I13510f58554cd2a53f4f1e0d63cc63623c576bf2
2023-06-13 02:16:23 +00:00
Jared Duke
2278b3f952 Add @UsesReflection to FeatureFactory reflection usage
Ensure FeatureFactory implementations are kept using a @UsesReflection
annotation at the callsite where they are instantiated via reflection.

Bug: 272041779
Test: m + validate FeatureFactoryImpl is kept
Change-Id: Ia9b8c4fd2c438805f33561dcacd5c10ed49dee19
2023-06-02 20:30:39 +00:00
Chaohui Wang
4a4e89da97 Update comment for Settings_srcs build target
Otherwise no op.

Bug: 284799832
Test: m Settings
Change-Id: Ie2f72cf5d13c8f58d89e24fcf2acabd4844fe11d
2023-05-31 14:02:01 +08:00
Zaiyue Xue
ff11b8e307 Exclude screen on time in battery usage page when the device is in charging.
Bug: 265751163
Fix: 265751163
Test: manual
Change-Id: I4ed71e1d6fad56a7cbfc9cd47ed4d791f45261ce
2023-03-30 20:23:33 +08:00
Brian Lee
d4f8e5802e Support remote device credentials validation in UI.
Test: m RunSettingsRoboTests -j ROBOTEST_FILTER=com.android.settings.password
Test: Manual
Bug: 258505917

Change-Id: Ifb9f15728eb8396b34c844d28f71a8e6e1aad837
2023-02-15 23:23:17 -08:00
Kuan Wang
6c4f83f33d Load app usage events data in the hourly job.
Test: make RunSettingsRoboTests + manual
Bug: 260964679
Change-Id: Iaccaa77bd52fb7356cdcb786c64523f21040b128
2022-12-15 06:32:54 +00:00
Chaohui Wang
4c091fffcc Add back resources exported for external usage
These resources are not used by Settings, but is exported for external
usage by other apps.

Put them into res-export folder and add a README to prevent from
accidentally clean ups.

Bug: 234570979
Test: make Settings
Change-Id: Ia46e94f4ece6a40edf95b47188f45659650d443c
2022-12-06 20:57:01 +08:00
Chaohui Wang
125baab6ec Merge "Remove lifecycle-extensions from Settings" 2022-11-17 07:15:00 +00:00
Kuan Wang
1493fa2fea Database restructure: use protobuf to save battery information fields.
This patch only updates the existing fields.
There will be 2 following patches to:
1. Expose the new fields (foreground / foreground service / background x
   usage time / power consumption) to UI.
2. Get the full charge cycle start time from Database and remove the
   SharedPreference.

Test: make RunSettingsRoboTests + manual
Bug: 253553141
Change-Id: Iee02dc7e671f97899cb1495323acfa0173e31df2
2022-11-17 06:06:54 +00:00
Chaohui Wang
f55f9932d9 Remove lifecycle-extensions from Settings
Bug: 259352947
Test: Make Settings
Change-Id: Ide9749494ae89ca401120eb5ffee9c0d87043c48
2022-11-16 18:56:05 +08:00
Chaohui Wang
f35ad839b2 Moving product specific strings to res-product
In the future, product specific strings need to be put in res-product.

Bug: 253772249
Test: Make Settings
Change-Id: Ie777975ec8e379dee8fdbb5444c09a40f5f9f1d4
2022-11-13 01:03:27 +08:00
Wesley Wang
5664ebc351 Merge "Add BatteryHistoricalLogUtil class" 2022-11-07 03:08:17 +00:00
Wesley Wang
d90026d184 Add BatteryHistoricalLogUtil class
- Impl optimize mode log mechanism to record optimize setup flow
 - Log optimize action with MANUAL, APPLY, RESET and RESTORE
 - Use proto file to serialize logs
 sample result: https://screenshot.googleplex.com/5KPrHVGb4pMvS7V.png

Bug: 241735485
Test: make SettingsRoboTests
Change-Id: I879663de4cf45d0cfb9cd7eee957eeb65addfbe1
2022-11-04 18:09:11 +08:00
Joshua McCloskey
9127c1192a Added intro lottie for foldable.
Test: Verified lotties during fingerprint enrollment.
Fixes: 246684274
Change-Id: Ic9e95dd650dd5018d13751d251fdac53e1fb13d0
2022-11-03 21:21:42 +00:00
Kuan Wang
f41ae57f17 Copy Battery Usage Database from SettingsIntelligence to Settings.
Bug: 253395332
Test: make RunSettingsRoboTests + manually
Change-Id: Ibdd2ace10d9e0893b3d96b345d563307b1890df6
2022-10-18 02:26:18 +00:00
Rambo Wang
17a9fb6bec Support AIDL IDumpstateDevice service in verbose vendor logging
IDumpstateDevice HAL switched to AIDL service in P22 devices.
This change will firstly apply to AIDL service if available and
fall back to HIDL service if not, making the feature work for
both HIDL an AIDL based devices.

Bug: 242634531
Test: make && make RunSettingsRoboTests
Change-Id: I4a2ec44092804574a60113e5be3df19b586bfa64
2022-09-08 02:21:43 +00:00
Chaohui Wang
805f903ae4 Add SpaLib for Settings
SPA main activity can be launched by:
adb shell am start com.android.settings/.spa.SpaActivity

Bug: 235727273
Test: Manual launch SPA main activity
Change-Id: I7b196b0169f91732a6b37ff53a3f79b54267d93f
2022-08-30 16:39:03 +08:00