Skip to content

Commit

Permalink
Removed android:stopWithTask to fix lock up with QT framework
Browse files Browse the repository at this point in the history
* android:stopWithTask is affecting the QT framework in an unexpected way which locks the process when closing it.
   - See QTBUG-55846 and OneSignal issue #102 for more details on the specific issue.
* Tested the flag removal on Android 4.4.2 and 6.0.1 and it had no side affects on onTaskRemoved.
  • Loading branch information
jkasten2 committed Sep 25, 2016
1 parent e76b8ca commit 07ba32f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion OneSignalSDK/onesignal/src/main/AndroidManifest.xml
Expand Up @@ -45,7 +45,7 @@
<receiver android:name="com.onesignal.NotificationOpenedReceiver" />
<service android:name="com.onesignal.GcmIntentService" />

<service android:name="com.onesignal.SyncService" android:stopWithTask="false" />
<service android:name="com.onesignal.SyncService" />
<activity android:name="com.onesignal.PermissionsActivity" android:theme="@android:style/Theme.Translucent.NoTitleBar" />

<service android:name="com.onesignal.NotificationRestoreService" />
Expand Down
Expand Up @@ -98,6 +98,8 @@ public void onTaskRemoved(Intent rootIntent) {
// This is important as while this method is running the app will not be response if
// the user reopens or focuses another tasks part of the same process.
// Also the process will be killed forcefully if this does not finish in 20 seconds.
// Method behavior seems unaffected by the android:stopWithTask manifest entry.
// false is not required, tested on Android 4.4.2 and 6.0.1
static void onTaskRemoved() {
OneSignal.Log(OneSignal.LOG_LEVEL.VERBOSE, "Starting SyncService:onTaskRemoved.");
ActivityLifecycleHandler.focusHandlerThread.stopScheduledRunnable();
Expand Down

0 comments on commit 07ba32f

Please sign in to comment.