Commit Graph

1963 Commits

Author SHA1 Message Date
Eghosa Ewansiha-Vlachavas
136bd906da Fix testGetUserMinAspectRatioEntry for both tablets and foldables
Tabelts and foldables now have different aspect ratio values in their
config, so we need to test the devices separately as we shouldnt test for
values that are not in the config of the device the test is run on.

Fixes: 302155585
Test: atest SettingsUnitTests:UserAspectRatioManagerTest
Change-Id: I78fa3020501a4be992bb90fea16a6fec4f37594b
2023-09-28 13:23:11 +00:00
Eghosa Ewansiha-Vlachavas
a3108d5b14 Merge "[1/n] Aspect ratio settings app list refinement" into udc-qpr-dev 2023-09-28 10:39:35 +00:00
Eghosa Ewansiha-Vlachavas
6bd9bff2e2 [1/n] Aspect ratio settings app list refinement
All apps list for work profile currently only shows work apps that are
also installed on the normal user. Update filter for list to show all
launcher apps for both users in their respective lists.

Fixes: 301373413
Test: atest SettingsUnitTests:UserAspectRatioManagerTest
Test: atest SettingsSpaUnitTests:UserAspectRatioAppPreferenceTest
Change-Id: Ia0bf15340d1b37dcd926d81598d3e94f448a46fc
2023-09-27 17:30:23 +00:00
Peiyong Lin
774378530f Add debug property to safe guard ANGLE developer option UI.
Add a debug property to guard ANGLE developer option UI, only when the
debug property is enabled will ANGLE developer option UI be enabled.

Add further clarification in the text to indicate that this is an
experimental feature.

Bug: b/287909344
Test: atest -c GraphicsDriverEnableAngleAsSystemDriverControllerJUnitTest
Test: atest -c GraphicsDriverEnableAngleAsSystemDriverControllerTest
Change-Id: Ife31f4b0426f3ce107f86cfbaf3f1aeca567e250
2023-09-25 18:33:00 +00:00
SongFerngWang
d21f14a002 Remove the cached display name
If the display name is changed, then the Settings should remove the
cached display name.

Bug: 296157273
Test: [pass] atest SubscriptionUtilTest  [pass]Build and manual test
Change-Id: I3b1297ddddf9f9051dd16523b97fc27255cf3923
2023-09-19 06:25:33 +00:00
Weng Su
36ae9189b2 Show Hotspot informations in Network details settings
- Show Hotspot device type in hearder icon

- Show Hotspot device details informations.
  - Internet source (network type)
  - Battery

Bug: 297346368
Test: manual test
atest -c WifiNetworkDetailsFragmentTest \
         WifiDetailPreferenceController2Test
atest -c SharedConnectivityRepositoryTest \
         WifiNetworkDetailsViewModelTest

Merged-In: I4bd090e00681911c8fac469289fd818237b8c518
Change-Id: I4bd090e00681911c8fac469289fd818237b8c518
2023-08-29 03:56:11 +00:00
SongFerng Wang
32c75f49a7 Merge "Fix ClassCastException at NetworkSelectSettings" into udc-qpr-dev 2023-08-29 03:53:48 +00:00
SongFerngWang
7f62ae77dc Fix ClassCastException at NetworkSelectSettings
Bug: 296172317
Test: atest NetworkSelectSettingsTest
Change-Id: I811ef95f679bb1b0235a335320654c2acd68110c
2023-08-28 19:17:10 +08:00
Zoey Chen
40d482ed87 [Regional Preference] Need to remove the metrics by the metrics concil
team's comment.

Bug: 297194348
Bug: 284094665
Test: manual
Change-Id: I8eecba55288bfad6f81b5c8c1a8290afccdd5ef8
Merged-In: I8eecba55288bfad6f81b5c8c1a8290afccdd5ef8
2023-08-24 00:57:56 +00:00
Weng Su
27b3821313 Add Instant hotspot preference
- Add Instant hotspot preference to Wi-Fi hotspot settings

- Wait onServiceConnected callback and then getSettingsState

- Use the PendingIntent provided by SharedConnectivitySettingsState to launch Instant hotspot settings

Bug: 268550769
Test: manual test
atest -c WifiTetherSettingsTest
atest -c WifiTetherViewModelTest \
         SharedConnectivityRepositoryTest

Merged-In: I343599e6127d9b1cb4af661dcc80a8683589c7b8
Change-Id: I343599e6127d9b1cb4af661dcc80a8683589c7b8
2023-08-21 12:21:25 +00:00
Graciela Wissen Putri
08983e8e63 Add opt-out properties for aspect ratio settings
Don't display aspect ratio options if app has opted out. If app has
opted out only for fullscreen, other aspect ratio options should still
be shown.

Bug: 292583399
Test: UserAspectRatioManagerTest
Change-Id: Ia0b223536407f703826d775468c8f8a0b4822e23
2023-08-15 09:14:21 +00:00
Etan Cohen
0fb1a3b3a7 Fix WiFi (ZX or DPP) QR code parsing to ignore leading spaces
Increase robustness of QR code parsing: while leading spaces aren't
expected (or allowed) they are observed in the wild and can be safely
ignored.

Bug: 292331368
Test: validated that QR code with scan is now parsed correctly
Test: atest WifiQrCodeTest
Change-Id: Ifff79870bea2ec9924f7b2e8100c2c01fd350846
2023-08-03 14:25:38 +00:00
Graciela Wissen Putri
fa945cc808 [4/n] Add fullscreen option in user aspect ratio settings
Apps > App Info > Advanced > Aspect ratio

Adds fullscreen option to aspect ratio settings gated by fullscreen
build time and runtime flags. If fullscreen option is disabled, return
app default option.

To enable feature:
adb shell device_config put window_manager
enable_app_compat_user_aspect_ratio_settings true
adb shell am force-stop com.android.settings

Bug: 291900454
Test: All Settings CUJs passed
      atest SettingsUnitTests:UserAspectRatioManagerTest
Change-Id: I8f8d0c08ac81f088d6c25e8dfb3550f807f336b6
2023-07-28 10:09:56 +00:00
Graciela Putri
4e86d0d6b3 Merge "[2/n] Add aspect ratio app list page under apps" into udc-qpr-dev 2023-07-21 21:28:44 +00:00
Graciela Wissen Putri
b4c4f6cbe6 [2/n] Add aspect ratio app list page under apps
Apps > General > Screen Size

To enable feature:
adb shell device_config put window_manager enable_app_compat_user_aspect_ratio_settings true
adb shell am force-stop com.android.settings

Fix: 287448088
Test: Manual
      atest AspectRatioAppsPageProviderTest
      atest AspectRatioUtilsTest
      All CUJs passed in go/settings-cujs
Change-Id: I4de6c3cbdbdfbc79ed839ec149fb633344dcd3a7
2023-07-21 08:02:09 +00:00
Vania Januar
bbf2dc4991 Merge "USB firmware update for stylus in Stylus USI Device Details" into udc-qpr-dev 2023-07-20 13:42:55 +00:00
Joshua Mccloskey
1412f391d5 Merge "Implement basic Fingerprint functionality." into udc-qpr-dev 2023-07-18 16:16:52 +00:00
Vania Januar
986fe4ebc1 USB firmware update for stylus in Stylus USI Device Details
Bug: 288850921
Test: StylusUsbFirmwareControllerTest, UsbStylusBroadcastReceiverTest
Change-Id: Ic7cb35799ff00f9998ca569eb4ae091f8010780a
Merged-In: Ic7cb35799ff00f9998ca569eb4ae091f8010780a
2023-07-18 14:09:05 +00:00
Chun-Wei Wang
e414d40e60 Merge changes from topic "simplify_pw" into udc-qpr-dev
* changes:
  Handle EXTRA_KEY_REQUEST_WRITE_REPAIR_MODE_PW
  Extract common code to SaveChosenLockWorkerBase
2023-07-18 01:17:13 +00:00
Chun-Wei Wang
c726bd48b4 Handle EXTRA_KEY_REQUEST_WRITE_REPAIR_MODE_PW
So the new password can be saved per caller's request.

This will remove the additional step to ask the user
to enter the new credential again and thus simplifying
the UI flow.

Bug: 271968977
Bug: 277561275
Test: atest SettingsUnitTests:SaveAndFinishWorkerTest
Test: atest ChooseLockPasswordTest
Change-Id: I20232619225b17edda0a72dad43b120d5a249203
2023-07-17 23:04:45 +00:00
Joshua McCloskey
5a4211ec82 Implement basic Fingerprint functionality.
Test: Verified enroll/deletion/renaming/authentication flows.
Test: atest FingerprintSettingsViewModelTest
Test: atest FingerprintManagerInteractorTest
Bug: 280862076
Change-Id: Ic34fd89f01f24468d0f769ef0492e742d9330112
2023-07-11 20:46:43 +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
SongFerng Wang
d3f8caa506 Merge "To fix waiting too long issue when psim -> esim" into udc-d1-dev am: 717ce2b91f
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23913080

Change-Id: Ifd57844fa7d17836a8c681b16b8b7e1830aabfec
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-11 05:26:45 +00:00
SongFerngWang
d94ac12190 To fix waiting too long issue when psim -> esim
if the user swithes slot from psim to esim, then the settings
need to wait the simSlotMapping completed and it has a timer to avoid
UI stay here too long.

Since the framework did not sned the carrier config changed with vaild
subId in MEP + psim->esim case, it cause the settings does not know the
simSlotMapping completed and it stay here until timeout.

For MEP case, changing this condition as SimSlotStatusChanged

Bug: 273813956
Test: atest UiccSlotUtilTest
Change-Id: Ic09dbcb3629fe13770f3ad301c0a396d6745969f
2023-07-07 10:22:49 +00:00
tom hsu
0b3da89a91 [Settings] Fix inactive SIM show display name with subectiption id.
- Cached active SIM' display name with last 4 digits phone number to
   avoid that this active SIM change to inactive SIM then show the
   display name with subscription id.

Bug: 271567615
Test: Manual test passed
Test: atest passed
Change-Id: I119d60ab4e92b1f04fb42f96df10bc81aa378a7c
2023-06-30 05:51:40 +00:00
Matías Hernández
e20f52a05a Merge "Settings: don't try to allow NLSes with too-long component names" into udc-dev am: 4d34eb2c7a am: aaddfd88e9
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23726247

Change-Id: I8fc3a7b239ce0545b34eafc860df72a42cfd2e05
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-28 18:39:16 +00:00
Matías Hernández
aaddfd88e9 Merge "Settings: don't try to allow NLSes with too-long component names" into udc-dev am: 4d34eb2c7a
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23726247

Change-Id: If35fbb5c16a642b56de29012ce43ecd7f068d5b8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-28 17:14:55 +00:00
Hao Dong
be823bc598 Wait for systemui udfps overlay ready to show settings udfps enroll view.
Previously, we show settings's udfps enroll animation view (the fingerprint icon and progress view) once the FingerprintEnrollEnrolling is shown.
However, touch events have to wait for systemui's udfps overlay to be valid. This CL lets settings's udfps enroll view wait for systemui's overlay.
1. Sets udfps enroll animation view's default visibility Gone.
2. Propagates FingerprintManager#onUdfpsOverlayShown to
   FingerprintEnrollEnrolling and when it's called, set the enroll view
   visible.

Besides, this CL renames onPointerDown() and onPointerUp() with Udfps.

Bug: 280718879
Test: atest FingerprintEnrollEnrollingTest
Change-Id: Ieed3e74c182828918785edcacb021f19a3665f2a
2023-06-26 20:21:05 +00:00
Matías Hernández
027f0a46ae Settings: don't try to allow NLSes with too-long component names
* NotificationAccessConfirmationActivity (triggered through CompanionDeviceManager) -> Don't show the dialog, bail out early similarly to other invalid inputs.
* NotificationAccessSettings (from Special App Access) -> No changes, but use the canonical constant now.
* ApprovalPreferenceController (used in NotificationAccessDetails) -> Disable the toggle, unless the NLS was previously approved (in which case it can still be removed).

Fixes: 260570119
Fixes: 286043036
Test: atest + manually
Change-Id: Ifc048311746c027e3683cdcf65f1079d04cf7c56
2023-06-21 17:02:32 +02:00
Treehugger Robot
d9c0cf79e8 Merge "[Settings] Imporve MMS message UI state update" into udc-d1-dev am: 8182348d5c
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23669450

Change-Id: Ic3a17c6731869827bfff43d8a5de227ea0f9a657
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-17 07:05:29 +00:00
Hao Dong
61659799de Merge "Wait for systemui udfps overlay ready to show settings udfps enroll view." into udc-qpr-dev 2023-06-15 01:22:22 +00:00
tom hsu
0a4458a9d1 [Settings] Imporve MMS message UI state update
- When activity entered from outside, the MMS message is not udpated.
   Therefore, add a update behavior to onStart()

Bug: 281566495#5
Test: Manual test passed
Test: atest passed.
Change-Id: I3e5994ad0dbcdd1b78ae3e10e3cb564ce210e93e
2023-06-14 12:28:59 +08: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
15da26329f Add manufactured year into hardware info page am: b452bc9f9d
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23629342

Change-Id: I53f6c06271bb862cd16e2f3cb48886f764686d40
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-12 17:43:44 +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
Treehugger Robot
55774422b1 Merge "Remove redundant methods and refactor" into udc-qpr-dev 2023-06-12 09:05:05 +00: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
Treehugger Robot
4b44c6632e Merge "Show "Not available" summary when hotspot speed is unavailable" into udc-d1-dev am: a99c52e160
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23601566

Change-Id: I5b91a44f9c947d6686a28cb2acb2c41f58e8fe01
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-09 05:02:25 +00:00
Weng Su
7171e0a29b Show "Not available" summary when hotspot speed is unavailable
- Show "Not available" summary when hotspot bands (5 GHz and 6 GHz) are unavailable

- Update debug logs to track down issues

Bug: 285769583
Test: manual test
atest -c WifiHotspotSpeedSettingsTest
atest -c WifiHotspotSpeedViewModelTest

Change-Id: If1050c120b4b612d3a9adbe886c2f12db82b793e
2023-06-08 21:38:01 +08:00
Hao Dong
c24e305fbf Wait for systemui udfps overlay ready to show settings udfps enroll view.
Previously, we show settings's udfps enroll animation view (the fingerprint icon and progress view) once the FingerprintEnrollEnrolling is shown.
However, touch events have to wait for systemui's udfps overlay to be valid. This CL lets settings's udfps enroll view wait for systemui's overlay.
1. Sets udfps enroll animation view's default visibility Gone.
2. Propagates FingerprintManager#onUdfpsOverlayShown to
   FingerprintEnrollEnrolling and when it's called, set the enroll view
   visible.

Besides, this CL renames onPointerDown() and onPointerUp() with Udfps.

Bug: 280718879
Test: atest FingerprintEnrollEnrollingTest
Change-Id: Ieed3e74c182828918785edcacb021f19a3665f2a
2023-06-07 17:59:11 +00:00
Treehugger Robot
dbec7ba7fb Merge "Use custom action key icon" into udc-qpr-dev 2023-06-05 16:56:35 +00:00
TreeHugger Robot
4834abe241 Merge "Restrict SimDialogActivity" into udc-dev am: 25d24e0cf0 am: f0503e2a51
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23466978

Change-Id: I763e30e24d32f456b30bf174eeacc899149b0ffb
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-02 22:23:17 +00:00
danielwbhuang
19a5e212de Use custom action key icon
1. get icon from getKeyboardSettingsFeatureProvider
2. set color for it

Bug: 269214138
Test: manual, atest KeyboardSettingsFeatureProviderImplTest
Change-Id: I3a2d47e8230aec1404300b000e8b1fcf221e2a65
2023-05-29 15:38:55 +08:00
Weng Su
25d259e3e2 Restrict SimDialogActivity
- Restrict UI if user is a guest

- Restrict UI if user has DISALLOW_CONFIG_MOBILE_NETWORKS

Bug: 262242946
Bug: 271849181
Test: manual test
atest -c SimDialogActivityTest

Change-Id: I227400aa71880895d8356f3d2961cb610ad2a357
2023-05-29 07:03:19 +00:00
Treehugger Robot
67b9234806 Merge "Restrict Printing Settings" into tm-qpr-dev am: 5fa6d3b7dc am: 24db1f3393 am: 424440670d
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23296956

Change-Id: Ib5975d1e338250b7468f3e37650094eeb5244bad
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-26 20:20:34 +00:00
Treehugger Robot
24db1f3393 Merge "Restrict Printing Settings" into tm-qpr-dev am: 5fa6d3b7dc
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23296956

Change-Id: Ifa1155d2a3ae19ff743b29b47e088d5d42724f70
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-26 17:44:20 +00:00
Yuxin Hu
d8fbd089d8 Merge "Fix "Enable ANGLE" switch behavior when Developer Option Switch is off" into udc-dev am: 67c72c01cb am: f783947615
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23360519

Change-Id: I7d2cfa1bb297eab9ff0b06ed10d628153ae1c40c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-25 19:48:28 +00:00
Yuxin Hu
67c72c01cb Merge "Fix "Enable ANGLE" switch behavior when Developer Option Switch is off" into udc-dev 2023-05-25 18:08:10 +00:00
Treehugger Robot
506b8af1b1 Merge "[Settings] Use background thread to get VoNr state." into udc-dev am: 1fd77775cb am: 0d065f7913
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23405373

Change-Id: I0ba5cc6eb2112440a4b2063f1347fed9406f5ad5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-25 07:33:25 +00:00
Treehugger Robot
1fd77775cb Merge "[Settings] Use background thread to get VoNr state." into udc-dev 2023-05-25 06:25:55 +00:00