mirror of
https://github.com/TeamVanced/VancedMicroG
synced 2024-11-18 18:19:26 +01:00
Do a check-in if we are not actually checked in, but should be, e.g. cleared app data
Change-Id: If800339fa35644d8783203fbd511128457d6d101
This commit is contained in:
parent
f806e1bcdb
commit
14d666a163
@ -25,6 +25,7 @@ import android.util.Log;
|
||||
|
||||
import androidx.legacy.content.WakefulBroadcastReceiver;
|
||||
|
||||
import org.microg.gms.checkin.CheckinPrefs;
|
||||
import org.microg.gms.checkin.LastCheckinInfo;
|
||||
import org.microg.gms.common.ForegroundServiceContext;
|
||||
|
||||
@ -67,6 +68,14 @@ public class TriggerReceiver extends WakefulBroadcastReceiver {
|
||||
|
||||
if (LastCheckinInfo.read(context).getAndroidId() == 0) {
|
||||
Log.d(TAG, "Ignoring " + intent + ": need to checkin first.");
|
||||
if (CheckinPrefs.isEnabled(context)) {
|
||||
// Do a check-in if we are not actually checked in,
|
||||
// but should be, e.g. cleared app data
|
||||
Log.d(TAG, "Requesting check-in...");
|
||||
String action = "android.server.checkin.CHECKIN";
|
||||
Class<?> clazz = org.microg.gms.checkin.TriggerReceiver.class;
|
||||
context.sendBroadcast(new Intent(action, null, context, clazz));
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user