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

Skip to content
Commit 9d29bba3 authored by Ricky Wai's avatar Ricky Wai
Browse files

Introduce Background Activity Launch home mode

Background activity launch home mode will replace existing app
switch protection logic.

After user processing home button, all normal apps, including
ui visible apps, will no longer able to start background
activity even its within grace period, except the apps that
have permission to start background activity. This will stop
apps try to start itself during onPause() after pressing home button.

It removes the pending activity queue in the origianl
apps switching protection due to confusing UX. Also, it removes
the logic that stop app switching protection after 5 second timeout.

This CL also fix gesture mode doesn't resume app switching bug. In
the original logic, ActivityStarter will wait for 2nd activity to be
started to resume app switching, which it won't be happened in gesture
mode as it doesn't start launcher app in 1st activity.

This feature is currently disabled by defaut and gated by device config.

Bug: 159433730
Test: Create an app that startActivity in onPause(), then click home
button or swipe to home screen. Activity can be started in its
background task but not a new foreground task (Both gesture mode
and 3 buttons navigation mode). Disable this feature and test again,
app can start new foreground task this time.

Test: Click home button / swipe to home screen and open bbc app
from launcher, click on the videos in bbc app and able to start
new activity (Both in gesture mode and 3 buttons launcher button).
It should behave the same when this feature is enabled / disabled.

Test: Create an app and enter pip mode in background and start new
activity task. After pressing home button / wipe to home, apps
can enter pip mode but cannot create a new task. Test again with
this feature is being disabled, pip app should be still able
to start foreground activity.

Change-Id: Id514f5ee34ebc65001783174ae70e05a40757d11
parent cbec226d
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