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

Skip to content
Commit 12378c52 authored by Hui Yu's avatar Hui Yu
Browse files

Show a notification when a BG-launch FGS is restricted.

Previously each BG-launch FGS that is restricted has a logcat message, now we
also display a notification that has:
Title: "Foreground Service BG-Launch Restricted"
Content: "App restricted:" + app package name
Detail: intent of the FGS.

Use following command to turn on the FGS BG-launch restriction feature:
 adb shell device_config put activity_manager default_fgs_starts_restriction_enabled true
 adb shell device_config get activity_manager default_fgs_starts_restriction_enabled

Bug: 157473819
Test: Observe the notification when FGS BG-launch is restricted.
atest cts/tests/app/src/android/app/cts/ActivityManagerFgsBgStartTest.java#testFgsStartFromBG

Change-Id: Ia1ce1c7e103fbfa0a8487b0a3009b2d2ca61ba74
parent 282c68d3
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