Disabled suspend state monitoring

pull/214/head
M66B 2 years ago
parent 7b8699db34
commit 3be4ff3de8

@ -234,15 +234,15 @@ public class ServiceSynchronize extends ServiceBase implements SharedPreferences
new IntentFilter(ConnectivityManager.ACTION_RESTRICT_BACKGROUND_CHANGED), new IntentFilter(ConnectivityManager.ACTION_RESTRICT_BACKGROUND_CHANGED),
ContextCompat.RECEIVER_NOT_EXPORTED); ContextCompat.RECEIVER_NOT_EXPORTED);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) { //if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
IntentFilter suspend = new IntentFilter(); // IntentFilter suspend = new IntentFilter();
suspend.addAction(Intent.ACTION_MY_PACKAGE_SUSPENDED); // suspend.addAction(Intent.ACTION_MY_PACKAGE_SUSPENDED);
suspend.addAction(Intent.ACTION_MY_PACKAGE_UNSUSPENDED); // suspend.addAction(Intent.ACTION_MY_PACKAGE_UNSUSPENDED);
ContextCompat.registerReceiver(this, // ContextCompat.registerReceiver(this,
suspendChanged, // suspendChanged,
suspend, // suspend,
ContextCompat.RECEIVER_NOT_EXPORTED); // ContextCompat.RECEIVER_NOT_EXPORTED);
} //}
ContextCompat.registerReceiver(this, ContextCompat.registerReceiver(this,
batteryChanged, batteryChanged,
@ -1036,8 +1036,8 @@ public class ServiceSynchronize extends ServiceBase implements SharedPreferences
unregisterReceiver(batteryChanged); unregisterReceiver(batteryChanged);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) //if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P)
unregisterReceiver(suspendChanged); // unregisterReceiver(suspendChanged);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N)
unregisterReceiver(dataSaverChanged); unregisterReceiver(dataSaverChanged);

Loading…
Cancel
Save