Commit Graph

1408 Commits

Author SHA1 Message Date
Eric Biggers
fd1e089b4c Merge "Unlock non-secure users automatically (2/2)" into main am: fcaf0aceeb am: 3eb12fab5e am: 81afb5c097
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2661955

Change-Id: I8ba1eac7a6194410bf574ee3a7a7157471939ae2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-19 01:22:26 +00:00
Eric Biggers
81afb5c097 Merge "Unlock non-secure users automatically (2/2)" into main am: fcaf0aceeb am: 3eb12fab5e
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2661955

Change-Id: I72d1606782200e7f1b16a0617439b38c4916523e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-19 00:33:18 +00:00
Arnab Sen
ae0261e220 Unlock non-secure users automatically (2/2)
...while moving apps or media content from internal storage to
adopted storage and vice-versa.
Currently, for FBE enabled devices, whenever move is triggered for
either app or media content, there is a prompt for user to enter their
lockscreen credentials in order to unlock storage if the user has one.
But if the user does not have a lockscreen credential set and is not
running,the wizard page is stuck. This leads to a bad user experience.

StorageWizardMigrateConfirm & StorageWizardMoveConfirm uses
ChooseLockSettingsHelper to launch the authentication method set by the
user in order to unlock the storage. But, it does not handle the
use-case where user has no authentication set and not running, causing
return to the wizard activities, thus blocking the flow. This CL solves
the issue by, checking if the user is not secure, attempt unlock the
storage otherwise prompt the user to unlock.

Bug: 305978187
Test: manual
Steps
 1. Create multiple users with atleast one user with an authentication
   method setup and one without authentication (apart from system user)
 2. Install same apps for all users and also add some content to the
    media storage.
 3. Format an SD Card as adopted.
 4. Attempt to move content.
 5. Check that the wizard is not stuck and it is prompting the locked
    users to authenticate.
 6. Reboot
 7. After reboot, Go to Settings > All Apps > app_name
    > Storage & Cache
 8. Tap on "Change" under Storage and Select Adopted storage.
 9. Check the same as Step#5

Change-Id: Ib72e9073386457711cc1d2ba745a24cbea91cd8a
2023-10-18 23:26:28 +05:30
Manish Singh
6efc455f2c Show a separate tab for the Private Space
This covers all the known Settings pages using the tabbed view model.

https://docs.google.com/document/d/1CdjUjAE84-5ZEPRIfw5KYFjLVHtEZxc_sF0w95su8DA/edit?resourcekey=0-dAACT9HRexY1IyoxMmkVlw#heading=h.58jd58rmznte

Screenshots:
all apps
https://screenshot.googleplex.com/3E5Jm7Pi2JfN64r
with work tab:
https://screenshot.googleplex.com/8egk4yHK5jSENjR

PS Apps Special media management apps
https://screenshot.googleplex.com/BHHafqW7bgUwSGg
with work tab:
https://screenshot.googleplex.com/3cocdhruEmCCh5k

PS Location Services tab view
https://screenshot.googleplex.com/3DqJcT2BFTEpvYT
with work tab:
https://screenshot.googleplex.com/6Avpx6hxSrdGJw5

PS on screen keyboard tab view
https://screenshot.googleplex.com/4FzVNnBWwbUeJNw
with work tab:
https://screenshot.googleplex.com/8E8UhpWq8PL5nxU

PS password account tab view
https://screenshot.googleplex.com/6bDR4AKtth2S3EW
with work tab:
https://screenshot.googleplex.com/9msXV2TdHdJapch

PS storage tab view
https://screenshot.googleplex.com/5Nk2FTxwdmpEv3B
with work tab:
https://screenshot.googleplex.com/79tw2EaWZKfMsnC

PS appl_languages_work
https://screenshot.googleplex.com/3qrREeg3RQdHhhH

Bug: 302278487
Test: manual
Change-Id: I8cd39170827fbe251bc4075ef306206020b3a022
2023-10-11 12:32:17 +01:00
Wesley Wang
bace563189 Config battery info page(1/2)
- Make battery information page configurable

Bug: 301817717
Test: make SettingsRoboTests
Change-Id: I51bf00fe3d9993ecd4e8481cd7c15d70b3c09ec4
2023-10-03 07:36:52 +00:00
Colin Cross
ee87a406cd Fix kotlin nullable errors in Settings
Fix kotlin nullable errors that were exposed by setting the retention
of android.annotation.NonNull and android.annotation.Nullable to
class retention.

Bug: 294110802
Test: builds
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:753c96133a1aa9e7b6dd63fa36816d171fec0f22)
Merged-In: I6aa0516fa4f6443b6d4dff873baf3b08ff9189f0
Change-Id: I6aa0516fa4f6443b6d4dff873baf3b08ff9189f0
2023-09-11 22:30:58 +00:00
Sunny Shao
b44fb93aa8 The new About > Account behavior
- Change the display content of the summary while multiple accounts.
- Goto the Passwords & accounts page when users click Account item.

Fixes: 290593956
Test: atest BrandedAccountPreferenceControllerTest
Change-Id: Iae32803076d86455f52f2ffd278e06995161adfe
2023-09-07 07:40:41 +08:00
Aleksandr Lukin
344a4da39f Merge "Update the API usage to get total size of devices" into udc-qpr-dev am: 1bc145ab6b am: 595db29382
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/24434307

Change-Id: I276e74bc1534ec9253b886ceaf29dc5710a011fb
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-23 14:46:55 +00:00
Aleksandr Lukin
595db29382 Merge "Update the API usage to get total size of devices" into udc-qpr-dev am: 1bc145ab6b
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/24434307

Change-Id: I221a7d43388bf3dea1dd91421a6c76c155b5f86f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-23 14:05:29 +00:00
Edgar Wang
2d57d002ae Update the API usage to get total size of devices
StorageStatsManager fixed in StorageStatsService#getTotalBytes
So that we should change back to call the API.

Bug: 295358118
Bug: 288103116
Test: verified manually
Change-Id: I3dcc9698403612f961cf0de41925dcbcb43e260b
2023-08-22 11:26:57 +00:00
Chaohui Wang
cc2133ba8e Clean up unused fields from EntityHeaderController
Bug: 295260929
Test: manual - on pages with header
Test: robo test
Change-Id: Icebd63dbb5d3d44b4b46d3bececb8b65b30b4883
2023-08-21 13:58:07 +08:00
Colin Cross
84f8961e67 Fix kotlin nullable errors in Settings
Fix kotlin nullable errors that were exposed by setting the retention
of android.annotation.NonNull and android.annotation.Nullable to
class retention.

Bug: 294110802
Test: builds
Change-Id: I6aa0516fa4f6443b6d4dff873baf3b08ff9189f0
Merged-In: I6aa0516fa4f6443b6d4dff873baf3b08ff9189f0
2023-08-14 12:30:16 -07:00
Colin Cross
87b870a090 Fix kotlin nullable errors in Settings
Fix kotlin nullable errors that were exposed by setting the retention
of android.annotation.NonNull and android.annotation.Nullable to
class retention.

Bug: 294110802
Test: builds
Change-Id: I6aa0516fa4f6443b6d4dff873baf3b08ff9189f0
2023-08-14 12:29:02 -07:00
Chaohui Wang
8e2ae547d6 Clean up FeatureFactory.getFeature()
Bug: 286764889
Test: m Settings
Change-Id: I7e472e6b0ca6b7a735c1b92742ddf06c545176fc
2023-08-08 08:41:48 +00:00
Chaohui Wang
2541381259 Fix references to resources for Settings
Bug: 293810334
Test: m Settings
Change-Id: Ie140278f492ef7e1c062ec1ecae2866c521a86aa
2023-08-08 01:56:05 +00:00
Chaohui Wang
b515ed5fee Merge "[Regulatory Labels] Load labels from overlays" into udc-d1-dev am: fe38ff963a am: 47803f6b10 am: fc275fef2e
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23939155

Change-Id: I2d9d02579aec65fdc5916522563fad4daada58c0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-11 09:54:45 +00:00
Chaohui Wang
fc275fef2e Merge "[Regulatory Labels] Load labels from overlays" into udc-d1-dev am: fe38ff963a am: 47803f6b10
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23939155

Change-Id: I624e8cf060dae2dfb7a1b0b06c4610adeeddde79
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-11 09:12:13 +00:00
Chaohui Wang
1806b3032f Merge "[Regulatory Labels] Load labels from overlays" into udc-d1-dev am: fe38ff963a
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23939155

Change-Id: I46c9e35554f3a7021bb52c79cc73e09971ca4232
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-11 08:34:42 +00:00
Chaohui Wang
47803f6b10 Merge "[Regulatory Labels] Load labels from overlays" into udc-d1-dev am: fe38ff963a
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23939155

Change-Id: I159db196a31270e20a213796e8236eb9808d418a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-11 08:30:00 +00:00
Chaohui Wang
590b4e7af8 [Regulatory Labels] Load labels from overlays
When config_regulatory_info_overlay_package_name is configured, load
regulatory labels directly from overlay package.

Also fix RegulatoryInfoDisplayActivity missing dialog theme.

Bug: 283170651
Test: unit test
Test: manual - check regulatory labels
Change-Id: Ia1f6848abe0da9facf34f47abab09e88d57e74d6
2023-07-07 14:52:26 +00:00
Chaohui Wang
8f0b2d15c6 Clean up Kotlin FeatureFactory.getFactory(context)
Replace with featureFactory.

Bug: 286764889
Test: m Settings
Change-Id: I30bd2e9b25e1681d7694939dd8ec84fcd6fd7c08
2023-06-29 23:10:37 +08:00
Edgar Wang
88659e80d9 Correct used size of Storage Settings. am: e52320e755
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23483884

Change-Id: I4816569a8c5bee277121f15397adf7167ec944e0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-27 08:35:31 +00:00
Edgar Wang
e52320e755 Correct used size of Storage Settings.
Since StorageManager rounded the totalBytes of device storage but
they don't do that rounding for freeBytes.
So in some cases the freeBytes can be greater than totalBytes.

We propose to get totalBytes of device storage directly to calculate
correct privateUsedBytes.

Test: robotest
Bug: 281955532
Change-Id: I4f137c20e7c2f54f4e037d50e81b3176edc1a83a
2023-06-27 06:29:00 +00:00
TreeHugger Robot
3924138fb7 Merge "Update BatterySettingsFeatureProvider interface" into udc-qpr-dev am: fcd80ade3b
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23729063

Change-Id: Ic6a9df6ddf6ca3c0cd5f8501f95cf4684a9d43a8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-20 02:59:40 +00:00
Yi-Ling Chuang
2a9b9cfd4c Update BatterySettingsFeatureProvider interface
Added context to each method for more flexibility.

Bug: 276399056
Test: robotests
Change-Id: I0bbf8841775bc2f584d66c59c2c78ed4e5c951c2
2023-06-17 12:49:46 +08:00
SongFerng Wang
143d1f50ee Merge "Remove the owner" am: 286344d539 am: 448c8b61a8 am: 61ef9024c8 am: 7f29649aa9 am: 2a6553b122
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23688861

Change-Id: Ib77854f005228a2193682cc3e55406e0ef60e651
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-14 19:10:07 +00:00
SongFerng Wang
7f29649aa9 Merge "Remove the owner" am: 286344d539 am: 448c8b61a8 am: 61ef9024c8
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2623772

Change-Id: I278260f1a36ed24fd1ca2d53ffc7ff2431fd1005
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-14 07:54:48 +00:00
SongFerngWang
f405dadcf2 Remove the owner
Bug: 286964921
Test: build pass
Change-Id: I4daf629e8cb994753dca36a811f0d25685df6928
2023-06-13 15:10:46 +08:00
Han Xu
fc05f6766e Add manufactured year into hardware info page am: b452bc9f9d am: 15da26329f am: 24fc0d6744
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23629342

Change-Id: Idb39c3d58e9e90f03ec329ab72b772ab705ef7de
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-12 18:53:23 +00:00
Han Xu
e319c686e7 Add manufactured year into hardware info page am: b452bc9f9d am: 15da26329f
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23629342

Change-Id: I29b80b692bc97132b5cc7eac3d3a153d0f93d238
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-12 18:08:24 +00:00
Han Xu
b452bc9f9d Add manufactured year into hardware info page
Bug: 285471557
Test: manual visually
Change-Id: Iaab254ac6ee77217e29d89524d782577f44119cb
2023-06-12 17:43:55 +08:00
Yi-Ling Chuang
f148baa372 Remove redundant methods and refactor
Remove the summary method and write the code in AOSP directly instead to
force string consistency. Also refactor a bit after the modification.

Fixes: 276399056
Test: robotests
Change-Id: I76ad740b694363a3cdfb3748e41c840fb678b93d
2023-06-12 16:11:49 +08:00
Yi-Ling Chuang
ee97eaf2d9 Refactor battery related feature provider
Merge BatteryInfoFeatureProvider to BatterySettingsFeatureProvider. Also
add a new string to indicate the unavailability when there's error
fetching the cycle count value.

Bug: 276399056
Test: robotests
Change-Id: Ic6a641d72d5bb295f2a0766dcebdcbe855d91125
2023-05-24 11:26:07 +08:00
Yi-Ling Chuang
da0702a136 Add Battery Information page
Add this page to show battery hardware information, including
manufacture date, first use date and cycle counts.

Bug: 276399056
Test: robotests
Change-Id: Iabad3625c88b703abdab4b30998f385de9749478
2023-05-19 21:45:44 +08:00
Yi-Ling Chuang
7a32e871dc Add a new feature provider for Battery info page
This feature provider contains the APIs to query certain battery info.

Bug: 276399056
Test: robotests
Change-Id: I8f8503f42a6ad1460b4601e44e8b720b91dd13d1
2023-05-19 21:21:46 +08:00
David Liu
6ff8643e82 Add Tapjacking Protection for all screens extends StorageWizardBase in Settings.
Add/remove the SYSTEM_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS flag into/from all screens extends StorageWizardBase with lifecycle.

Bug: 255305175

Test: manual test with make RunSettingsRoboTests
Change-Id: I7ed9e2bf9bbebf6cd6b7e76ad47a6d4155eb2eb2
2023-05-03 21:11:35 +00:00
Chaohui Wang
8470122ad1 Fix ImeiInfoPreferenceControllerTest
For test case updatePreference_simSlotWithoutSim_notSetEnabled,
mSecondSimPreference is a mock, instead of check the default value of
isEnabled(), verify it's setEnabled() not called.

Fix: 279880808
Test: RobolectricTest
Change-Id: I72064820754e053def46bdbf10317189c7ac608f
2023-04-28 15:53:44 +08:00
Chaohui Wang
3cdad40840 Fix EID dialog related issues
Fix the following issues,
- After eid dialog dismissed, enter other page and back will trigger
  eid dialog again
- After screen rotation, dialog content disappeared

Fix: 277871671
Test: Manual
Change-Id: Ibd0ffb182cf69ea40e4b3fe0e8e840931d705df6
2023-04-23 15:49:52 +08:00
Zoey Chen
76bb350c73 [Settings] Do not set text if the fragment is not attached
Bug: 273415166
Test: loacl test
Change-Id: I5298727359191d8ce9c4526279faa4e8a3c1df43
2023-03-17 18:14:49 +00:00
Bonian Chen
ad209be4af [Settings] EID should be read out as phone number
EID need to support TTS.

Bug: 270517566
Test: local

Change-Id: I630e94cca8d240595546897ac17ae6c59366c84a
2023-02-23 08:45:25 +00:00
Bonian Chen
535b518ac9 [Settings] IMEI should be enabled regardless existance of SIM
Force IMEI fields always enabled.

Bug: 266877869
Test: auto

Change-Id: Ic164b3c171fd673cfb02d9973d4c210585198707
2023-02-15 10:16:36 +00:00
Bonian Chen
6d225b22f1 Merge "[Settings] Unified the source of phone number" 2023-02-13 12:38:14 +00:00
Bonian Chen
c9ace54b03 [Settings] Unified the source of phone number
Route UI access to phone number into a unified util class within
Settings app.

Bug: 265940535
Test: local

Change-Id: Ic747b0044217101d9a6a1e2cd6e59bbdbcd88021
2023-02-13 04:57:18 +00:00
Bonian Chen
eeee2d0d78 [Settings] Device without EID crash settings UI
Device without EID should hide the UI, and avoid from null pointer
exception.

Bug: 268104585
Test: local

Change-Id: I3e0016dbbae11d089de534b3fc383611719d7cbe
2023-02-08 06:21:57 +00:00
Bonian Chen
211920bc7c [Settings] Fix about phone crash no leave
Avoid from crash when LifecycleOwnerLiveData reports null during
destroy.

Bug: 267513122
Test: local

Change-Id: Ie541b0e5b81aa14bd064087c5343716b6bc066a3
2023-02-02 06:10:55 +00:00
Bonian Chen
5f9b1084c3 [Settings] Avoid from accessing LifecycleOwner when not available
Only access LifecycleOwner when available.

Bug: 266872811
Test: local

Change-Id: Id575a71e20e79f8efadb49af128c1a43c058acdd
2023-01-31 08:41:52 +00:00
Bonian Chen
7a714456fd [Settings] Support of Primary IMEI feature
Present primary IMEI information when there're multiple.

Bug: 260188417
Test: local

Change-Id: I7817fed506f8fc4fabd94f004c9a74b2fab25e10
2023-01-06 13:22:18 +00:00
Bonian Chen
25b403500f [Settings] Remove EID from SimStatusDialog
Remove EID field.

Bug: 260540995
Test: local
Change-Id: I0da91b6e0f21d11aa9ba1660e759b532eb7b7c35
2022-12-28 04:58:55 +00:00
XingHai Lu
7f919a3c1b Merge "Cleanup some plurals in Settings Change <one> to <1> in string res file, and update related java files. Test: Update, existing test still pass. bug: 199230342" 2022-12-23 02:34:31 +00:00
xinghailu
897fd74731 Cleanup some plurals in Settings
Change <one> to <1> in string res file, and update related java files.
Test: Update, existing test still pass.
bug: 199230342

Change-Id: Idd0ba3c6adc060da21574d98f8ed765fae00cef8
2022-12-22 16:05:13 +08:00