Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 5bd11e30 authored by Michael W's avatar Michael W
Browse files

sdk: Kill app: Actually kill app

* Calling forceStopPackage with USER_CURRENT won't kill the app when
  started e.g. via "Shelter" work profile
* Find the uid of the current foreground app and pass that one
  instead of UserHandle.USER_CURRENT
* Note: UserHandle.USER_ALL would also kill the app, but all instances
  of it - which we don't want

Test:
- Go to Settings->System->Buttons and enable "Kill foreground app"
  as action for "Long edge swipe" - test it for PlayStore
- Install Shelter and setup your profile
- Open PlayStore from work profile
- Long swipe the edge:
  - Before: Toast appears, app stays open
  - After: Toast appears, app is actually closed

- Additionally: Open PlayStore from Work and Non-Work profile
- Long swipe edge for just work profile one and switch to own profile
  instance: App is not killed (expected, we just killed work instance)

Change-Id: I82154a6c021527013269f7ee2d1c46fedc14bf7c
parent 1c6d5b12
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment