@qusaieilouti99/call-manager 0.1.59 → 0.1.60

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -171,11 +171,23 @@ class CallForegroundService : Service() {
171
171
  }
172
172
 
173
173
  override fun onTaskRemoved(rootIntent: Intent?) {
174
- Log.d(TAG, "onTaskRemoved: User swiped app from recents. Ending all calls.")
174
+ // Figure out which Activity’s task was just removed:
175
+ val removed = rootIntent?.component?.className
176
+ Log.d(TAG, "onTaskRemoved: removedActivity=$removed")
177
+
178
+ // If it was our lock-screen CallActivity, ignore —
179
+ // we only want to clean up when the MAIN app task is swiped away.
180
+ if (removed == CallActivity::class.java.name) {
181
+ Log.d(TAG, "CallActivity was removed; keeping call alive.")
182
+ return
183
+ }
184
+
185
+ // Otherwise (e.g. MainActivity removed), tear everything down:
186
+ Log.d(TAG, "Main task removed; ending all calls.")
175
187
  CallEngine.onApplicationTerminate()
176
- super.onTaskRemoved(rootIntent)
177
188
  stopSelf()
178
- }
189
+ super.onTaskRemoved(rootIntent)
190
+ }
179
191
 
180
192
  override fun onDestroy() {
181
193
  super.onDestroy()
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qusaieilouti99/call-manager",
3
- "version": "0.1.59",
3
+ "version": "0.1.60",
4
4
  "description": "Call manager",
5
5
  "main": "./lib/module/index.js",
6
6
  "types": "./lib/typescript/src/index.d.ts",