Commit Graph

130 Commits

Author SHA1 Message Date
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
Chaohui Wang
9ec6f0e41a Enable Kotlin for Settings App
Currently Kotlin files cannot build with library app-compat-annotations.

Only one @ChangeId need this library, create separate build target
library Settings-change-ids to solve this issue.

After this cl, Kotlin could be used for Settings App.

Fix: 229037247
Test: make Settings
Change-Id: I4a0d99425c9e6cc2cbc015d2561daa68609ca0fd
2022-05-30 01:58:25 +08:00
Diego Vela
668aea9b55 Use androidx.window from prebuilt.
Use androidx.window prebuilt for consistency.

Bug: 223114509
Test: m -j

Change-Id: Ifeba7d0073ba7aeb6308c186738161c4857a97a3
2022-04-14 09:55:36 +00:00
Bonian Chen
d5460431e4 [Settings] Code refactor - NetworkModePreference
Code refactor for improving readibility.

Bug: 223461708
Test: unit test EnabledNetworkModePreferenceControllerTest
Change-Id: I3b3157cbc76f104d63062fda495a7391ecc18ada
2022-03-21 00:18:55 +00:00
Tsung-Mao Fang
2df79641cb Show/hide back button for 2nd page
By design, we want to show/hide back button for 2nd
layer page when it's in two pane mode.

Test: Manual test
Bug: 219000314
Change-Id: I14d8d7ee08280d5ce80c0b59e1e91d077f0b6d09
2022-02-16 18:01:42 +08:00
Junyu Lai
3a15d6cab1 [MS48.2] Remove NetworkStatsHistory from CycleAdaptor
While the ChartData changes the types of stored data.
Modify CycleAdaptor accordlingly for the compatibility.

Test: atest clockwork-settings-robotests
      make RunSettingsRoboTests -j40
      make RunSettingsLibRoboTests
           ROBOTEST_FILTER=DataUsageControllerTest
      make RunSettingsLibRoboTests
           ROBOTEST_FILTER=NetworkCycleChartDataLoaderTest
      make RunSettingsLibRoboTests
           ROBOTEST_FILTER=NetworkCycleDataForUidLoaderTest
      make RunSettingsLibRoboTests
           ROBOTEST_FILTER=NetworkCycleDataLoaderTest
      make RunSettingsLibRoboTests
           ROBOTEST_FILTER=DataUsageUtilsTest
Bug: 204830222
Ignore-AOSP-First: Related API conflict, need master first.
Change-Id: Ia778d680d5354fb67476db0763dfab017284dc4a
2022-01-24 01:07:53 +08:00
Andrew Zeng
c71fe8cab1 Remove unncessary constraintlayout-solver deps
This will be cp'ed to master later

Bug: 192617148
Test: compiles
Change-Id: Id7a9cf6c26ff9dd464d8f0b0f012b8480ca70b92
2021-11-29 23:32:10 +00:00
Bonian Chen
67bffece6d [Settings] Enable kotlin language support
Enable the support of *.kt files.

Bug: 200896893
Test: build pass
Change-Id: I467e4ae3ecd94a74379daa41a8ee8ef4a038d75e
2021-09-23 12:51:26 +08:00
Tsung-Mao Fang
18ad0c49a8 Import the window extension libary in the Settings app
Test: Rebuilt apk and run apk successfully.
Bug: 196939216
Change-Id: If9040ae9a1c72097e4964c8d40ea9785cf2f01dc
2021-08-19 17:23:11 +08:00