GmsCore icon indicating copy to clipboard operation
GmsCore copied to clipboard

Cloud/Push Messaging "ghost entry" when same app still installed on work profile

Open mxvin opened this issue 2 years ago • 0 comments

Describe the bug I expect when you uninstall an app, the related app is unregistered and removed completely from Gms. But it doesn't happen when you try to uninstall app that the same app also still installed on 'work profile'

To Reproduce Steps to reproduce the behavior:

  1. have same app both on main and work profile
  2. main profile cloud msg registered
  3. uninstall app from main app
  4. the app in questions is still on "cloud messaging" app list, with showing App ID and green android icon, so call "ghost entry"

possibly related context : #743 #744

Expected behavior I expect when you uninstall an app, the related app is unregistered and removed completely from Gms.

System Android Version: Android 10 Custom ROM: Lineage 17.1 GmsCore installed as system-priv, self-check all OK, permissions using nanodroid permissions xmls

Additional context Android seems not broadcasting android.intent.action.PACKAGE_REMOVED act intent to GmsGcmUnregisterRcvr when same app still installed on the system. I think maybe this is intentional.

If that app on work profile is removed, and then uninstall the app from main profile, GmsGcmUnregisterRcvr received PACKAGE_FULLY_REMOVED action intent and the ghost list is removed. D GmsGcmUnregisterRcvr: Package changed: Intent { act=android.intent.action.PACKAGE_FULLY_REMOVED dat=package:com.debug.fcm flg=0x5000010 cmp=com.google.android.gms/org.microg.gms.gcm.UnregisterReceiver (has extras) }

I think something need to be done to check whether particular app still exist to receive messages. As my experiment on latest release, gms still happily accepts the messages (msg count increasing). The nature of gms that "set and forget" so this removal must be done on background.

mxvin avatar Apr 30 '22 10:04 mxvin