Skip to content

Commit 0709c7f

Browse files
committed
Fix app not restarting after package update
Fixes #421
1 parent 028a206 commit 0709c7f

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

app/src/main/AndroidManifest.xml

+1
Original file line numberDiff line numberDiff line change
@@ -1235,6 +1235,7 @@
12351235
<receiver android:name=".service.BootReceiver" android:exported="false">
12361236
<intent-filter>
12371237
<action android:name="android.intent.action.BOOT_COMPLETED"/>
1238+
<action android:name="android.intent.action.MY_PACKAGE_REPLACED" />
12381239
</intent-filter>
12391240
</receiver>
12401241

app/src/main/java/org/thoughtcrime/securesms/service/BootReceiver.java

+4
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,17 @@
33
import android.content.Context;
44
import android.content.Intent;
55

6+
import org.signal.core.util.logging.Log;
67
import org.thoughtcrime.securesms.dependencies.AppDependencies;
78
import org.thoughtcrime.securesms.jobs.MessageFetchJob;
89

910
public class BootReceiver extends ExportedBroadcastReceiver {
1011

12+
private static final String TAG = Log.tag(BootReceiver.class);
13+
1114
@Override
1215
public void onReceiveUnlock(Context context, Intent intent) {
16+
Log.i(TAG, "Restarting after: " + intent.getAction());
1317
AppDependencies.getJobManager().add(new MessageFetchJob());
1418
}
1519
}

0 commit comments

Comments
 (0)