Android: Finsky force-stops my application

1

I have an Android application which has a foreground service.

The service also posts an Ongoing notification to the drawer, because

Foreground services must display a Notification.

And it starts sticky:

public int onStartCommand(Intent intent, int flags, int startId) {
    ...
    return START_STICKY;
}

So Android shall keep this up, as

if this service's process is killed while it is started, then leave it in the started state (...). Later the system will try to re-create the service.

However for some unknown reason, Finsky sometimes prevents this:

12-02 20:06:27.276 D/CCodecBuffers(23988): [c2.android.aac.decoder#777:1D-Input.Impl[N]] codec released a buffer owned by client (index 0)
12-02 20:06:27.393 I/Finsky  ( 4126): [2664] aliq.b(1): Attempting to stop application: net.MYAPP.android
12-02 20:06:27.396 I/ActivityManager( 1245): Force stopping net.MYAPP.android appid=10222 user=0: from pid 4126
12-02 20:06:27.397 I/ActivityManager( 1245): Killing 30598:net.MYAPP.android/u0a222 (adj 200): stop net.MYAPP.android
12-02 20:06:27.400 W/ActivityManager( 1245): Scheduling restart of crashed service net.MYAPP.android/.MYAPPService in 1000ms
12-02 20:06:27.403 I/ActivityManager( 1245):   Force stopping service ServiceRecord{ace11d1 u0 net.MYAPP.android/.MYAPPService}
12-02 20:06:27.406 I/EdgeLightingManager( 1245): isCallingUserSupported : callingUserId=0, mUserId=0, isDualAppId=false
12-02 20:06:27.406 I/EdgeLightingManager( 1245): hideForNotification : packageName = net.MYAPP.android
12-02 20:06:27.406 I/EdgeLightingPolicyManager:NotificationGroup( 1245): remove : sbn : StatusBarNotification(pkg=net.MYAPP.android user=UserHandle{0} id=1337 tag=null key=0|net.MYAPP.android|1337|null|10222: Notification(channel=MYAPP_SYSTEM_NOTIFICATION pri=0 contentView=null vibrate=null sound=null tick defaults=0x0 flags=0x272 color=0x00000000 groupKey=MYAPP_SYSTEM_NOTIFICATION vis=PRIVATE semFlags=0x8 semPriority=0 semMissedCount=0))
12-02 20:06:27.406 I/EdgeLightingPolicyManager.NotificationGroup( 1245): group notification count : 1
12-02 20:06:27.406 I/EdgeLightingManager( 1245): hideForNotification : isInteractive is true
12-02 20:06:27.406 W/Finsky  ( 4126): [2664] alqs.a(41): Unwanted app (MUwS) without is_muws flag was returned with verdict POTENTIALLY_UNWANTED on autoscan: net.MYAPP.android
12-02 20:06:27.410 D/SamsungAlarmManager( 1245): Remove alarm for next reason : android.intent.action.PACKAGE_RESTARTED : package: net.MYAPP.android

My application is not uploaded into the store, it's in devel-phase yet.

What kind of application is Finsky actually?

It seems Finsky just thinks it is unwanted because ActivityManager is scheduling a restart of my crashed service. And my service is crashed because Finksy is attempting to stop application, and ActivityManager forces stopping due to this.

I believe the root cause shall be identified, ie: Why is Finsky attempting to stop my application in the first place?

android
asked on Stack Overflow Dec 2, 2020 by Daniel

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0