Commit Graph

2652 Commits

Author SHA1 Message Date
Massimo Carli
f2735decd6 Merge "Remove version text in user aspect ratio settings page" into udc-qpr-dev 2023-09-08 21:52:03 +00:00
Massimo Carli
70ca63e4a2 Enable User Aspect Ratio Settings by default
Fix: 298203770
Test: Manual

Change-Id: I55daa03ab4369fef62ba439f4cf8af211f136021
2023-08-31 16:46:39 +00:00
Massimo Carli
21f0f870f5 Remove version text in user aspect ratio settings page
Fix: 297153670
Test: Manual following instructions in the bug description

Change-Id: Iaf757715e60ab4ff2356ee0c89bc2129948a6c08
Merged-In: Iaf757715e60ab4ff2356ee0c89bc2129948a6c08
2023-08-31 09:28:22 +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
Graciela Wissen Putri
5b97e3ecda [5/n] Add graphics to app aspect ratio options
Static assets in Apps > App Info > Advanced > Aspect ratio
Animation in Apps > Aspect ratio

Bug: 293138315
Test: Manual
Change-Id: Ia0d5e9ab3435b395284701a2d915c9cb454593c0
2023-08-09 13:33:06 +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 Wissen Putri
57984f02d5 [3/n] Add aspect ratio app info page
Apps > App Info > Advanced > Aspect ratio

Adds link from aspect ratio app list page to app info. Stops activity if
user chooses a different aspect ratio override.

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: 287448187
Test: Manual
      All Settings CUJs passed
      atest SettingsRoboTests:UserAspectRatioDetailsTest
      atest SettingsSpaUnitTests:UserAspectRatioAppPreferenceTest
Change-Id: Id47f291459e62267bf15d629c163dde73d96928a
2023-07-28 09:53:11 +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
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
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
Chaohui Wang
eb4fea1a36 Call onViewCreated in DashboardFragment
To let fragment's view lifecycle owner passed in to controllers.

For UI usage, view lifecycle owner is the best choice, controller could
use this lifecycle owner to observe events and do UI related works.

Usage DataSaverController as first example.

Bug: 287005021
Test: Manually for DataSaverController
Change-Id: Id965ea3a24d61f4d0ec6735632944f41f72ba06a
2023-06-14 12:22:12 +08:00
Taran Singh
7e1d083e05 DO NOT MERGE: Prevent non-system IME from becoming device admin am: 9260c67352 am: 4a5e1a4d3f
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23545057

Change-Id: I6c689260a1ce82baee992262c0ea32512d758c37
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-12 21:14:57 +00:00
Taran Singh
9260c67352 DO NOT MERGE: Prevent non-system IME from becoming device admin
Currently selected IME can inject KeyEvent on DeviceAdminAdd screen to
activate itself as device admin and cause various DoS attacks.

This CL ensures KeyEvent on "Activate" button can only come from system
apps.

Bug: 280793427
Test: atest DeviceAdminActivationTest
Change-Id: I6470d1684d707f4b1e86f8b456be0b4e0af5f188
(cherry picked from commit 70a501d02e)
2023-06-02 22:20:30 +00:00
Chaohui Wang
3e35cff7ba Move unrestricted data summary to DataSaverController
DataSaverController currently used in 2 pages,
- Network & internet > Data Saver
- Apps > Special app access

This helps unify the logic, and instead of showing on "Special app
access", this summary shows on "Unrestricted data" is make more sense.

Bug: 280280596
Test: Manually on above pages
Test: Unit test
Change-Id: Ia151ed8179a250f8f20cc5041f9383fffebdab10
2023-05-26 13:05:48 +08:00
Himanshu Gupta
40dd0958d6 Merge "Clearing obsolete cloneUserId from CloneBackend." into udc-dev am: 4740720948 am: af793d86f2
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23262239

Change-Id: I6a6b1f0824fefb1ec12cc61dda3c2b550d8fb072
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-19 21:56:28 +00:00
Himanshu Gupta
4740720948 Merge "Clearing obsolete cloneUserId from CloneBackend." into udc-dev 2023-05-19 20:28:36 +00:00
Nicolas Sleiman
122806ad50 Merge "Remove GET_ACTIVITIES in InteractAcrossProfiles in Settings" into udc-dev am: 03e8dbca58 am: 123fa6ae78
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23347979

Change-Id: I617fc20bb9ba0c1f2476e3d81acaf8797fb3a15c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-19 16:17:45 +00:00
Ankita Vyas
01fca127fb Merge "Remove GET_ACTIVITIES flag while fetching installed apps from package manager." into udc-dev am: 96cff64862 am: 8053e9da26
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23343098

Change-Id: I8843d39553a68330c6fa69900892ff5fff539e16
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-19 16:17:39 +00:00
Nicolas Sleiman
03e8dbca58 Merge "Remove GET_ACTIVITIES in InteractAcrossProfiles in Settings" into udc-dev 2023-05-19 15:08:35 +00:00
Ankita Vyas
96cff64862 Merge "Remove GET_ACTIVITIES flag while fetching installed apps from package manager." into udc-dev 2023-05-19 15:06:39 +00:00
nsl
f3241ee339 Remove GET_ACTIVITIES in InteractAcrossProfiles in Settings
Remove the GET_ACTIVITIES flag in InteractAcrossProfiles in Settings to
follow ag/23343098

Bug: 283407612
Test: InteractAcrossProfilesSettingsTest
Change-Id: I299a4a40af3e59f729027b964e938d7783eb7d92
2023-05-19 12:31:27 +00:00
Ankita Vyas
46b106c487 Remove GET_ACTIVITIES flag while fetching installed apps from package
manager.

This flag adds more info in return data(not required for this usecase) which increases parcel size.

Bug: 278294334
Test: manual
Change-Id: Ifba7a184aa8c3f5a70d85ddd3910f17bf91f9444
2023-05-19 05:50:39 +00:00
Himanshu Gupta
d9f60d9a1a Clearing obsolete cloneUserId from CloneBackend.
When cloned user is removed from device, the previous clonedUserId
present with the CloneBackend instance becomes obsolete, and does
not update to reflect the new clonedUserId, when the cloned user is
re-created.
To fix this we set cloneUserId to -1 when cloned user is removed,
causing CloneBackend#installCloneApp to update clonedUserId when
the cloned profile is re-created.

Bug: 280431074, 275062025
Test: Manual by flashing the local build.
Change-Id: If0d7960998865b4081502e84d0d4125b3b05c69c
2023-05-17 12:22:01 +00:00
Treehugger Robot
50260c19d2 Merge "Hide "Long Background Tasks" page from Settings." into udc-dev am: b272dbc613 am: dbf7472854
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23252718

Change-Id: I623996d146f0ebab242e34ec82318e8df91b453e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-16 18:42:45 +00:00
Treehugger Robot
b272dbc613 Merge "Hide "Long Background Tasks" page from Settings." into udc-dev 2023-05-16 17:31:12 +00:00
Varun Shah
82dc52376a Hide "Long Background Tasks" page from Settings.
Since the RUN_USER_INITIATED_JOBS permission is no longer a special
permission, the related page in Settings should be hidden.

Bug: 282824927
Test: page hidden from Special App Access screen.
Change-Id: I51d681f97247be45654dd2eb12df08f429a43938
2023-05-16 01:53:33 +00:00
Ankita Vyas
84f8456a80 Merge "Fetch summary only if feature is available" into udc-dev am: 44a613438b am: 837adaafd8
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23240819

Change-Id: I65734ccca5650342a9eb9b5a33f8980a9c79676b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-15 23:10:34 +00:00
Ankita Vyas
98e4d7bf16 Fetch summary only if feature is available
onResume(loads summary) of controller seems to be invoked even when availabilty status
is unspported.

Bug: 278294334
Test: manual
Change-Id: I2486a7d61bea1b981ae56f0ff32b9d411be2ad14
2023-05-15 13:31:38 +00:00
Becca Hughes
a7dbd023ae Merge "Add extra null checks" into udc-dev am: 598ff21b78 am: 93c340780f
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23214089

Change-Id: Icf6feffecedf230863f4762957888000859acf3f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-12 21:54:31 +00:00
Becca Hughes
598ff21b78 Merge "Add extra null checks" into udc-dev 2023-05-12 20:40:56 +00:00
Chris Antol
8c4f831cda Merge "Remove SPA gating from App Cloning click ingress" into udc-dev am: 9567bd4a50 am: 701babd574
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23197464

Change-Id: I51f78328b5c0527018c07588f90641d4556493c6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-12 19:25:44 +00:00
Becca Hughes
400e5491a3 Add extra null checks
Test: ondevice
Bug: 281047738
Change-Id: I07ced78af5da086433aa4288949673161bfe4f20
2023-05-12 16:46:30 +00:00
Chris Antol
8e93ac6670 Remove SPA gating from App Cloning click ingress
Bug: 277002988
Test: existing tests. flag on by default, no-op unless disabled, which now has access to this otherwise accessible feature
Change-Id: Ic37e4c76d379133f1dbda3c65930ae44afc24f70
2023-05-12 03:03:12 +00:00
TreeHugger Robot
134b71f95f Merge "Show disable dialog box when none is selected" into udc-dev am: 1742524dd3 am: 728b1b8337
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23139605

Change-Id: I6ed8ede29cd4bc43039081864a020b36b1e9117c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-11 05:35:31 +00:00
Becca Hughes
8e9119f5ab Show disable dialog box when none is selected
Also remove from CMPP since that will be
hidden.

Test: ondevice
Bug: 281147573
Merged-In: Ic2b59c42ed4ddbc83a770b8bb99c641d2f1a383d
Change-Id: Ic2b59c42ed4ddbc83a770b8bb99c641d2f1a383d
2023-05-11 02:28:54 +00:00
Treehugger Robot
636204bacd Merge changes I4c4d257e,I4cc4cc22 into udc-dev am: f6eab0c9de am: 14ffc962b8
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23121657

Change-Id: I0b3c0cce50152004dcb452bdef680a74b2c8c2dc
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-10 21:28:20 +00:00
Treehugger Robot
4dac429af9 Merge "Fix change not picking up work profile" into udc-dev am: 3061bcf10a am: 4c6f37b1d6
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23138330

Change-Id: I256ccfd42a0e2cb6520d94bc9c0505bc57f808d2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-10 21:26:48 +00:00
Becca Hughes
68470a4f27 Warn earlier about 5 provider limit
Test: ondevice
Bug: 281616441
Change-Id: I4c4d257e1a0a6396b3948a2b50462bbef1987729
2023-05-10 17:42:21 +00:00
Becca Hughes
7a5ec88784 Fix credman provider not showing
Test: ondevice
Bug: 281787107
Change-Id: I4cc4cc2216a7c452ee63cb742a292dadbd46714f
2023-05-10 17:24:22 +00:00
Becca Hughes
347c165521 Fix change not picking up work profile
Test: ondevice
Bug: 281787107
Change-Id: I676384877ce21ae1f1e6972646fc465828013c74
2023-05-10 17:02:02 +00:00
Guangjie (Jerry) Shi
d8bfff3134 Merge "Add null check for settings default preference controller" into udc-dev am: ba44f13498 am: 8e70a25893
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23127101

Change-Id: I312a5f5d30b89205938d43567a1a6946a46bc6d4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-10 07:15:30 +00:00
Jerry Shi
21df117d52 Add null check for settings default preference controller
Test: local built and tested
Bug: 281771729
Change-Id: Ib3467c22262125ac7dac00eb9ea68516ddf53b5a
2023-05-09 21:00:32 -07:00
Becca Hughes
fffa183326 Merge "If you tap outside dialog then re-enable" into udc-dev am: 90b344e760 am: cb0643a885
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23121656

Change-Id: I596356a0051c76953f5ba59918be35b1e9009488
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-10 01:13:59 +00:00
Becca Hughes
90b344e760 Merge "If you tap outside dialog then re-enable" into udc-dev 2023-05-10 00:33:11 +00:00
Becca Hughes
48d406cecc If you tap outside dialog then re-enable
Test: ondevice
Bug: 281696686
Change-Id: I7aee51952b8a905010710a574e0dd39616b2e5d9
2023-05-09 22:48:53 +00:00
Himanshu Gupta
0b19e92158 Merge "Enabling App Cloning Device Config flags by default. The features will be guarded *only* by config overlays, which are off by default." into udc-dev am: 53bf6b1dc8 am: 81180f985e
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/22381242

Change-Id: If6633fb997d54a37ad07b26c097d98ce19de3602
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-09 22:43:28 +00:00
Becca Hughes
ce1c823116 Merge "Fix provider update bug" into udc-dev am: 5031d67f21 am: 01b75c9719
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23112934

Change-Id: I3edb704fe21ee0391b23cd3ac17244e737651c18
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-09 22:43:15 +00:00
Becca Hughes
8df9b69c10 Hide enable dialog and prefix pref wrongly enabled am: e513c71189 am: 847e29faf7
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23114516

Change-Id: I4bca53d2ab71d1d88242483a5a2f9c3344098c1d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-09 22:42:50 +00:00
Himanshu Gupta
53bf6b1dc8 Merge "Enabling App Cloning Device Config flags by default. The features will be guarded *only* by config overlays, which are off by default." into udc-dev 2023-05-09 22:00:36 +00:00
Becca Hughes
5031d67f21 Merge "Fix provider update bug" into udc-dev 2023-05-09 21:48:13 +00:00