Skip to content
Commit 1a342743 authored by Makoto Onuki's avatar Makoto Onuki
Browse files

Propagate calling UID to AM from LauncherApps

- So that AM can perform all the necessary caller checks, except for the cross-profile/user check.

- Note PixelLauncher is the recent app which gets extra privileges. So I used ShortcutLauncherDemo
and a 3p launcher for manual tests.

Fixes: 78635323
Test: manual test, with a 3p launcher. (nova)
- Launch primary profile app -> launches fine
- Launch work profile app-> launches fine
- Launch suspended work profile app -> "can't open this app" dialog is shown.
- Launch the primary counterpart of the suspended work profile app -> launches fine.
- Launch work profile app in quiet mode, with separate work challenge
  -> "turn on work profile"? dialog is shown
    -> then "cancel" -> nothing happens.
    -> then "turn on" -> "re-enter your pin" is shown -> type pin -> work profile app starts fine.
- Launch work profile app without separate work challenge
  -> "turn on work profile"? dialog is shown
    -> then "cancel" -> nothing happens.
    -> then "turn on" -> work profile starts and the app starts fine.
- "App info" on work profile app -> Setting page opens fine.
- "App info" on primary profile app -> Setting page opens fine.

Test: atest frameworks/base/services/tests/servicestests/src/com/android/server/pm/ShortcutManagerTest*.java
Test: atest cts/hostsidetests/devicepolicy/src/com/android/cts/devicepolicy/LauncherApps*.java

Change-Id: Ie665a8890407d05c1d877f04d9c5c3a1caad18e1
parent 5d8dfe17
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment