Commit Graph

16 Commits

Author SHA1 Message Date
Ken Lin
c655c82ada Settings crashed when changing the Screen Resolution
Check if index is out of bound

Bug: 288256336
Test: Change to Full resolution, set Smallest width to 426 dp, then
switch to High resolution
Test: atest ScreenResolutionFragmentTest

Change-Id: Ida4128e76e097050b01deae91c9d669e58ab9e8f
2023-07-18 02:30:09 +00:00
Ken Lin
d8c6dd4fe8 Correct the resolution illustration at the setting page
Replace xml with wrong description with correct one

Bug: 272650243
Test: check Setting -> Display -> Screen resolution
Change-Id: I878356800e965b19bb9064615d220212b35cca08
2023-03-27 02:49:25 +00:00
Amy Hsu
be19785b51 [RRS] show resolution option on Settings page.
Due to the special width/ height of the device, we have to modify the
available condition otherwise the resolution option cannot be shown on Settings.

Bug: 258346214
Test: Lunch Settings and check the Display page
      atest SettingsUnitTests:ScreenResolutionControllerTest
      atest SettingsUnitTests:ScreenResolutionFragmentTest
Change-Id: Ie22df7dff6e31a7697c128eabe69dfe4bba29746
2023-02-04 06:48:03 +00:00
Paul Hobbs
bc2ab6f662 Merge "Revert "[RRS] show resolution option on Settings page."" 2023-01-19 18:53:37 +00:00
Paul Hobbs
73187f3599 Revert "[RRS] show resolution option on Settings page."
This reverts commit 0d9e5d600c.

Reason for revert: bad CL causing breakage in com.android.settings.display.ScreenResolutionFragmentTest https://screenshot.googleplex.com/AG6d44f3LTksHGx

Change-Id: I522c6b5220c138b56af777627619ca986e2cd43c
2023-01-18 20:05:37 +00:00
Piotr Wilczyński
93ac8a9ccd Set display size to all displays
Bug: 197730930

Test: Open Settings, go to Display -> Display size and text -> Display size, change the value, fold/unfold the device, see that the value persists.
Test: DisplaySizeDataTest
Test: atest ScreenResolutionFragmentTest
Test: ScreenZoomSettingsTest
Change-Id: I3d6858a9b20798c2ad3b12a66db3484491682691
2023-01-13 15:11:35 +00:00
Amy Hsu
0d9e5d600c [RRS] show resolution option on Settings page.
Due to the special width/ height of the device, we have to modify the
available condition otherwise the resolution option cannot be shown on Settings.

Bug: 258346214
Test: Lunch Settings and check the Display page
Change-Id: I577e0e1227727aab75787c1f6115091e0c6158e1
2023-01-10 07:41:43 +00:00
Jeremy Nei
c98bff6d74 Report user selected resolution events to StatsLog
Report user selected resolution event.

Bug: 259797244
Test: Tested by tool statsd_testdrive
Change-Id: Ifb67de46562031b51d8d0695c789e1e15eea30bf
2022-12-19 08:40:42 +00:00
Amy Hsu
ab9a73ff07 Merge "[RRS] Send event to AccessibilityManager when an unselect radio button is selected." into tm-d1-dev am: c799cb11f5 am: d434100421 am: 4da27ff2bd
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/19893206

Change-Id: Id9493be0c48bcc3e31272fc0dd0f155a18161fa2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-20 09:57:20 +00:00
Amy Hsu
fc3f25c8b5 [RRS] Send event to AccessibilityManager when an unselect radio button is selected.
Change the screen resolution will cause re-layout the screen, so the focus will back to the first view. Before we actually set the screen
resolution, send an event to the AccessibilityManager and set what it
should say when the user selects the unselect option. Therefore TB will
say "selected" before the screen refreshes.

bug: 229352892
Test: Enable/disable Talkback and check RRS app behaivor. It should read
"selected" after user choose one un-selected option.

Change-Id: If14ed3685f85962d4e4b1d4961216c6ca5d5f0f8
2022-09-16 07:09:47 +00:00
Amy Hsu
99f86db37f [RRS] Activate investigation of screen_resolution in settingsstats
Define a setting string for putting data for suez/settingstats.

Bug: 234035619
Test: Manually check ScreenResolution ap in Settings can work normally.
      atest SettingsUnitTests:ScreenResolutionFragmentTest
Change-Id: Ib4622490b0f63139b47f242ebcae916edf291cea
2022-07-09 01:10:49 +00:00
Amy Hsu
7087e5c457 [RRS] Activate investigation of screen_resolution in settingsstats
Define a setting string for putting data for suez/settingstats.

Bug: 234035619
Test: Manually check ScreenResolution ap in Settings can work normally.
Merged-In: Ib4622490b0f63139b47f242ebcae916edf291cea
Change-Id: Ib4622490b0f63139b47f242ebcae916edf291cea
2022-07-07 08:15:47 +00:00
Amy Hsu
088a212a35 [RRS] Avoid the resolution switch too rapidly.
Make sure previous setting has been completed before we set current
resolution. Register a display listner to listen onDisplayChanged
callback. So that we can know when display resolution change completed.

Bug: 232440665
Test: Switch resolution quickly and check display situation.
Change-Id: I1460c1db191250d8e51dd639cd969e4323f71abd
2022-06-28 01:41:24 +08:00
Yichi Chen
e190a8a5bb Restore the density when it has been overridden
When the density is overridden, the new density remains the same during
the resolution changes, which causes improper DPI on the screen. The
patch recalculates the suitable overridden density when the resolution
is changed and applies the new settings when the new resolution takes
place.

Bug: 233698163
Test: Switch resolution with customized density
Change-Id: I0914de61da0ab3b78380b355f47dbd3052079492
2022-06-13 12:31:31 +08:00
Amy Hsu
372bbdcf9c Add summary and footer message for the ScreenResolutionFragment.
Bug: b/199559703
Test: Check resolution switch UI in Settings app
      atest SettingsUnitTests:ScreenResolutionControllerTest
      atest SettingsUnitTests:ScreenResolutionFragmentTest
Change-Id: Iee1e74d3d4de81500b2abe62bc7e9bd69f55452c
(cherry picked from commit d633cd6b32)
Merged-In: Iee1e74d3d4de81500b2abe62bc7e9bd69f55452c
2022-03-04 02:45:15 +00:00
Amy Hsu
0dea418d57 Add ScreenResolutionController to Settings app
Settings for resolution switch

Bug: b/199559703
Test: Check resolution switch UI in Settings app
      atest SettingsUnitTests:ScreenResolutionControllerTest
      atest SettingsUnitTests:ScreenResolutionFragmentTest

Change-Id: I46d3be3b82ca512b8672efaa489df2cdaab26d6d
Merged-In: I46d3be3b82ca512b8672efaa489df2cdaab26d6d
2022-03-03 07:23:10 +00:00