Commit Graph

2609 Commits

Author SHA1 Message Date
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
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
Himanshu Gupta
4740720948 Merge "Clearing obsolete cloneUserId from CloneBackend." into udc-dev 2023-05-19 20:28:36 +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
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
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
598ff21b78 Merge "Add extra null checks" into udc-dev 2023-05-12 20:40:56 +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
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
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
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
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
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
Becca Hughes
e513c71189 Hide enable dialog and prefix pref wrongly enabled
Test: ondevice
Bug: 281329396
Bug: 280905737
Change-Id: I82652a2520a2f9ca9bc7f8f78cf020bef7af0b15
2023-05-09 21:16:01 +00:00
Becca Hughes
49d11e4995 Fix provider update bug
Test: make
Bug: 280905737
Change-Id: Ia7f33f4c5e1168cadd66119c42bd52e0a80eda10
2023-05-09 20:41:51 +00:00
Guangjie (Jerry) Shi
ece191b09f Merge "Fix work profile issue" into udc-dev 2023-05-09 03:47:05 +00:00
Treehugger Robot
ee54d713d5 Merge "Disable provider if removed from primary" into udc-dev 2023-05-09 02:01:46 +00:00
Becca Hughes
9e5b34ceb0 Disable provider if removed from primary
Test: make
Bug: 281109887
Change-Id: Ie301cfc57176c6563b4be5cc661514a4324477c9
2023-05-08 23:42:47 +00:00
Becca Hughes
ad13689915 Fix work profile issue
Test: manual
Bug: 281332256
Change-Id: I5f47aacc84e5abe739ecc3bbad474957334e7c91
2023-05-08 23:27:59 +00:00
Becca Hughes
5262570691 Disable all providers if none selected
Bug: 280905737
Test: manual
Change-Id: I53214c29cd7f03c8034284e5067f03305566397a
2023-05-08 17:19:52 +00:00
Guangjie (Jerry) Shi
cf440dcae5 Merge "Use correct filter" into udc-dev 2023-05-06 02:38:26 +00:00
Becca Hughes
ed295c248e Use correct filter
Test: TH
Bug: 280908763
Change-Id: I8a80e8533578b5e0b7a9b516c488b3602d18feef
2023-05-05 23:42:29 +00:00
Treehugger Robot
1dc52d159d Merge "Set primary services as enabled" into udc-dev 2023-05-05 23:40:43 +00:00
Becca Hughes
4fe1f506dd Set primary services as enabled
Test: make
Bug: 281121157
Change-Id: Ide7902d0561fa6e513e90f8245da6a754c856ae7
2023-05-05 21:47:58 +00:00
Becca Hughes
481be6dde4 Fix settings live update
We were using a setting observer to watch
for changes but it was being cleaned up
because we did not hold a reference to
it.

Test: make
Bug: 280905737
Change-Id: I154951f47af20998e25d62a82a8e79f9c00fa027
2023-05-05 20:32:44 +00:00
Becca Hughes
17a0266b16 Fix newly installed providers bug
Package monitor was not registered
properly.

Change-Id: Ifde2e6027b2aee2355114c8ff9b0d1f542fa2f8d
Test: treehugger
Bug: 280867431
2023-05-05 18:27:26 +00:00
Jerry Shi
8d167d55f3 Do null check to account for the case where provider is only autofill
provider.

Test: local build
Bug: 281047738

Change-Id: I9f3dca118a0d4182e2d727fa011dcb48db2a553f
2023-05-05 14:59:27 +00:00
Becca Hughes
3096997718 Use isPrimary bit to determine top provider
If the cred man provider has the isPrimary
bit set then we should use it as top
provider.

Test: ondevice
Bug: 280454916
Change-Id: I8c5651909d3926f09549c64af68185f1ef633198
2023-05-04 21:19:54 +00:00
Jerry Shi
645ba04085 Modify the usage of setEnabledProvider to temporarily passed in empty
list.

Test: local test
Bug: 280492574

Change-Id: Id13aea203636527bcda745727aae417b2a8e289c
2023-05-04 08:57:43 -07:00
Becca Hughes
b21df6c5fc Align settings with new mocks
Test: ondevice
Bug: 278919696
Change-Id: I274126bce3616596c4a81dd3385f0844d8bdbf71
2023-05-02 23:50:22 +00:00
Becca Hughes
ddf359d0f8 Fork autofill default app selection
We are merging the default app selection for autofill
with credman so this forks the existing UI (so we can
flag it off).

Test: ondevice
Bug: 278919696
Change-Id: I96bcf1ff86b169a182b9974f7384c45b474c3d5d
2023-05-02 20:31:14 +00:00
Becca Hughes
ea03b3e2a0 Add combined provider class that manages new settings UI
Example of how to use: https://paste.googleplex.com/6523798525313024

Test: make
Bug: 278919696
Change-Id: I934a5f6d02b50f8c97bda6d997902a42ff88e26f
2023-05-02 17:37:44 +00:00
himanshuz
dd26189e2c Enabling App Cloning Device Config flags by default. The features will be guarded *only* by config overlays, which are off by default.
Bug: 253449368
Test: Manual by building and flashing
Change-Id: I9099019f2bd982588f12ac1741fce27d24e5849e
2023-04-28 11:10:14 +00:00
Becca Hughes
c74ccee659 Merge "DO NOT MERGE Hide provider from this list if autofill provider" into udc-dev 2023-04-27 16:35:18 +00:00
Becca Hughes
4fc5b0e7b3 Merge "DO NOT MERGE Listen for updates to autofill/credman provider" into udc-dev 2023-04-27 16:35:07 +00:00
Zoey Chen
fa5ea719de Fix AppEntry.extraInfo ClassCastException
AppEntry's extraInfo is an Object class, force cast it to Boolean may
cause ClassCastException.

Bug: 279639370
Bug: 279333773
Test: local test
Change-Id: Ie135d9a49fdac6623f6b29a13ddf83896a911712
Merged-In: Iccbe9b669011c5061f1c8b3998632f05fbd8a02f
2023-04-27 03:48:38 +00:00
Becca Hughes
688b023d09 DO NOT MERGE Listen for updates to autofill/credman provider
The provider for both of these are in Settings
and this will refresh the CredMan section of
the page if either of these change.

Test: make
Bug: 278919696
Change-Id: Ia82c3533540e52aaa26a68e0a27f0e496728b87f
2023-04-26 22:34:07 +00:00
Becca Hughes
99f1d5448d DO NOT MERGE Hide provider from this list if autofill provider
Since we are merging the two lists we should
hide the provider from this list to avoid
duplicates.

Test: local & unit
Bug: 279205251
Change-Id: I70ec4a4bda13bdcd5fd8f82f6ba6045e94d5daa9
2023-04-26 21:23:30 +00:00
Philip Junker
134bea1957 Merge "List apps which requested the TURN_SCREEN_ON appOp permission" into udc-dev 2023-04-21 10:07:47 +00:00
TreeHugger Robot
fb52240afe Merge "Fix RTL display problem in Open by default" into udc-dev 2023-04-20 01:59:00 +00:00