Commit Graph

52 Commits

Author SHA1 Message Date
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
Quang Luong
91dcd42319 Add WifiTrackerLib as separate dependency from SettingsLib
WifiTrackerLib should be removed from SettingsLib to avoid tying it to
SettingsLib's min_sdk_version. Modules that need WifiTrackerLib should
now explicitly add it as a static_lib.

Bug: 187099809
Test: build, make RunSettingsRoboTests
ROBOTEST_FILTER=WifiEntryPreferenceTest

Change-Id: I09b7cad0b3b17ba1a24c1200b7ea3255ca4e227f
2021-06-10 14:33:05 -07:00
Curtis Belmonte
a543067ed9 Use Lottie animation for traffic light face education
Test: Manual

Bug: 182716681
Change-Id: Ia4c9dea5c900c71ec7eca7946cf090fd02b436e2
2021-05-24 14:47:19 -07: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
Colin Cross
ce44abb97d Merge changes from topic "SettingsGoogle-bp-rvc-qpr-dev-plus-aosp" into sc-dev
* changes:
  [automerge] Export proguard.flags, manifest and sources for use by SettingsGoogle 2p: 38d3b0fa18
  Export proguard.flags, manifest and sources for use by SettingsGoogle
2021-02-23 04:12:51 +00: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
Presubmit Automerger Backend
f68eb56cf5 [automerge] Export proguard.flags, manifest and sources for use by SettingsGoogle 2p: 38d3b0fa18
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/13630934

Change-Id: Ib371c7b6779f7e7ecde0e1eec489cc3a0672ed42
2021-02-19 19:08:46 +00:00
Colin Cross
38d3b0fa18 Export proguard.flags, manifest and sources for use by SettingsGoogle
This relands I3d2f042a9ebf4a6f551449904eb77a34f637f28f.

Bug: 175124789
Change-Id: I1cc3796f31e7db3d8f062436ebc618d93db19822
Test: m SettingsGoogle
Test: m RunSettingsGoogleRoboTests
2021-02-19 19:08:36 +00:00
Colin Cross
3e2426ca79 Revert "Export proguard.flags, manifest and sources for use by S..."
Revert submission 13183140-SettingsGoogle-bp

Reason for revert: b/177766209
Reverted Changes:
I73bef76ec:Add ArcSettings and SettingsGoogle to the legacy a...
I385629c5c:Build Settings-robo-testutils for use by SettingsG...
I863e1d658:Convert ArcSettings to Android.bp
If095bc39d:Convert SettingsGoogleRoboTests to Android.bp
I8d3f32cd4:Convert SettingsGoogle tests to Android.bp
I7ddeb985c:Convert SettingsGoogle to Android.bp
I3b8223e64:Export elmyra and columbus aidl files for Settings...
I3d2f042a9:Export proguard.flags, manifest and sources for us...

Change-Id: I9da85caeb3a53cf7ac3216c4b34985423b997fd2
2021-01-19 05:23:08 +00:00
Colin Cross
d7ff631bc1 Merge "Export proguard.flags, manifest and sources for use by SettingsGoogle" 2021-01-16 01:45:52 +00:00
Bonian Chen
e69d1a650f Revert "Remove org.apache.http.legacy from Settings"
This reverts commit 02013aeeb6.

Reason for revert: DroidMonitor-triggered revert due to breakage https://android-build.googleplex.com/builds/quarterdeck?branch=git_master-without-vendor&target=aosp_arm64-eng&lkgb=7064184&lkbb=7064600&fkbb=7064600, bug 176865269

Change-Id: I49701fb6055b636598998463936b4251e118834a
BUG: 176865269
2021-01-06 05:42:19 +00:00
Edgar Wang
02013aeeb6 Remove org.apache.http.legacy from Settings
It appears that all usages of org.apache.http were removed after aosp/118987.
Keeping this library in the phone settings manifest and build files adds an
unnecessary dependency for both phone settings

Bug: 176242377
Test: rebuild
Change-Id: I58eb077c2518c58b82e931596dfaefb151213c25
2020-12-29 14:45:14 +08:00
Diego Vela
afdf5ed0d4 Merge "Revert^2 "Add <uses-library> information."" am: a2e406ed85 am: 8403231bbb am: 25ee8c7cf0
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/1526684

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I6db438a43e58f0ee0df43c12cb1db69ed1ae218d
2020-12-14 22:56:14 +00:00
Diego Vela
ed5986c335 Merge "Revert "Add <uses-library> information."" am: 54b741096b am: 9d61c8a23d am: acba236677
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/1527773

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ief413bfbeadd5c47529d7dade9dad7e365d8b3bb
2020-12-14 22:55:50 +00:00
Diego Vela
1ef19adf52 Revert^2 "Add <uses-library> information."
7f1950928f

Change-Id: I8d3d6fee8e5a2b6eb337abb53f21b9b909b007c9
2020-12-14 22:05:04 +00:00
Diego Vela
7f1950928f Revert "Add <uses-library> information."
Revert submission 1427961-uses-libs-23

Reason for revert: Broken build
Bug: 175607244
Reverted Changes:
I6ab699005:Add <uses-library> information.
Id5d5fe1df:Add <uses-library> information.
Id12741c9b:Add <uses-library> information.
I2fe6e09c2:Add <uses-library> information.

Change-Id: If1ca723c357ba3e8d9343fbb0f5d980d1e7ca1fb
2020-12-14 21:14:24 +00:00
Ulyana Trafimovich
88074044c4 Merge "Add <uses-library> information." am: 4bb99a788a am: b10b31bcad am: 9ba309779b
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/1427665

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I303a909ece0b32b7c3aadb7edd6b43cba2a2aa21
2020-12-10 11:53:43 +00:00
Colin Cross
6145b3dd16 Export proguard.flags, manifest and sources for use by SettingsGoogle
Bug: 175124789
Test: m SettingsGoogle
Test: m RunSettingsGoogleRoboTests
Change-Id: I3d2f042a9ebf4a6f551449904eb77a34f637f28f
2020-12-10 08:03:21 +00:00
Ulya Trafimovich
202ca49dfe Add <uses-library> information.
The required <uses-library> "org.apache.http.legacy" is in the manifest
for Settings. It is necessary to explicitly add it to `uses_libs`
because it is not among the app dependencies (so Soong does not add it
automatically to the manifest_fixer). It also doesn't add it as a
compatibility library because the target API level for the app is not
below 28.

Bug: 132357300
Test: lunch cf_x86_phone-userdebug && m
Test: m out/soong/.intermediates/packages/apps/Settings/Settings/android_common/manifest_check/AndroidManifest.xml
Test: m out/soong/.intermediates/packages/apps/Settings/tests/robotests/SettingsRoboTestStub/android_common/manifest_check/AndroidManifest.xm
Change-Id: Id5d5fe1dff68cf6fce667a00e35710cf0e667d02
2020-12-08 12:09:53 +00:00
Jeff Sharkey
a375faa4a1 Enable Error Prone to detect obscure bugs.
We've been writing many new framework-specific Error Prone checkers
to help detect obscure platform bugs, and this change starts enabling
those checkers for more packages across the platform.

Bug: 155703208
Test: manual
Exempt-From-Owner-Approval: trivial blueprint changes
Change-Id: I9090b677a90d475b77b3d1127bb4e6c4e1201764
2020-10-23 14:38:58 -06:00
Artur Satayev
772243ca06 Do not exlicitly declare dependency on changeid processor.
Annotation processor is exported via app-compat-annotations library.

Bug: 152220864
Test: m && diff merged_compat_config.xml
Change-Id: Icab88938f1a49a892e0d62b2a833b659d6725267
Merged-In: Icab88938f1a49a892e0d62b2a833b659d6725267
Exempt-From-Owner-Approval: clean up
(cherry picked from commit b4924c2828)
2020-03-28 16:30:47 +00:00
Artur Satayev
b4924c2828 Do not exlicitly declare dependency on changeid processor.
Annotation processor is exported via app-compat-annotations library.

Bug: 152220864
Test: m && diff merged_compat_config.xml
Change-Id: Icab88938f1a49a892e0d62b2a833b659d6725267
Exempt-From-Owner-Approval: clean up
2020-03-26 15:59:13 +00:00
Steven Liu
cc6eb5c0f7 Remove the unnecessary dependent on WifiTrackerLib.
Bug: 150467119
Test: build
Change-Id: I947d4ee2f88aadc2d8b2002a2c5b04f60c4d853b
2020-03-04 14:51:27 -08:00
Rambo Wang
9b7acf7210 Add Developer option to enable vendor logging in Settings app
Bug: 148822215
Test: make && make RunSettingsRoboTests
Change-Id: Ia8d9002c7f85b607a8d87a69d04d3be1e59abcab
2020-02-18 15:43:09 -08:00
Muhammad Qureshi
0454b2798b Migrate to SettingsStatsLog from StatsLog
As part of statsd becoming a Mainline module in R, autogenerated
StatsLog.write() calls are going away and replaced by *StatsLog.java
that is autogenerated for each module.
This CL adds autogenerated SettingsStatsLog and replaces usages
of StatsLog with SettingsStatsLog.

Bug: 145952197
Test: m
Change-Id: I3ffdb51394017e3e48b65734d67595abd69dd70d
2020-01-26 18:51:52 -08:00
Mathew Inwood
de401bc144 Include settings app compat config in the build.
This ensures that any compact changes defined in settings work correctly
at runtime.

Include the config in the system_ext partition rather than system to
avoid breaking rules about where we're allowed to put things.

Test: m
Test: Check compat changes appear in dev settings UI.
Change-Id: I4a6dc6bfcc5de1f68e97faf905ee94b35bde5d11
2020-01-13 11:37:00 +00:00
Bernardo Rufino
9e32620854 Report if app-specific SAW intent
Log using PlatformCompat framework if the app tried to deep-link into
the app-specific screen for managing SAW permission.

Bug: 146327570
Bug: 135920175
Test: 1. adb shell am start -a
android.settings.action.MANAGE_OVERLAY_PERMISSION -d package:com.foo.bar
      2. adb logcat -s -v color CompatibilityChangeReporter:*
      3. Verify compat change id reported 135920175 and state LOGGED

Change-Id: I1d6c571d524d70c11156aeea27a8800d2a0ba42b
2019-12-17 14:49:00 +00:00
Jeongik Cha
68da89b6d8 Move the app to /system_ext
As mentioned in go/partitions-in-r, we plan to forbid hidden API in
product partition.
So this app should be moved to /system_ext because it uses hidden API.
It is not permanent, so they can be moved back to /product due to
needs if there isn't hidden usage anymore.

Bug: 137908189
Test: m
Test: check whether device boots successfully
Change-Id: Icd2f7fc7021e84fad9980d58688dc640ca4245f8
2019-11-25 20:28:35 +09:00