Loading app/src/main/AndroidManifest.xml +0 −8 Original line number Diff line number Diff line Loading @@ -69,14 +69,6 @@ http://www.gnu.org/licenses/gpl.html android:enabled="true" /> <service android:name=".services.OperationManagerService" /> <receiver android:name=".receivers.BatteryStateReceiver" android:enabled="true"> <intent-filter> <action android:name="android.intent.action.BATTERY_LOW" /> <action android:name="android.intent.action.BATTERY_OKAY" /> </intent-filter> </receiver> <receiver android:name=".receivers.PackageEventReceiver" android:enabled="true"> Loading app/src/main/java/foundation/e/drive/receivers/BatteryStateReceiver.javadeleted 100644 → 0 +0 −39 Original line number Diff line number Diff line /* * Copyright © Vincent Bourgmayer (/e/ foundation). * All rights reserved. This program and the accompanying materials * are made available under the terms of the GNU Public License v3.0 * which accompanies this distribution, and is available at * http://www.gnu.org/licenses/gpl.html */ package foundation.e.drive.receivers; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.util.Log; /** * @author Vincent Bourgmayer */ public class BatteryStateReceiver extends BroadcastReceiver { private final static String TAG = BatteryStateReceiver.class.getSimpleName(); @Override public void onReceive(Context context, Intent intent) { Log.i(TAG, "onReceive"); String intentAction = intent.getAction(); if(intentAction == null) { Log.e(TAG, "intent Action is null"); } else if ( intentAction.equals(Intent.ACTION_BATTERY_OKAY) ) { Log.d(TAG, "BATTERY is Okay. Synchronization job isn't reschedule anymore. Expected behaviour"); }else if(intentAction.equals(Intent.ACTION_BATTERY_LOW)){ try { context.unregisterReceiver(ScreenOffReceiver.getInstance()); }catch(Exception e){ Log.e(TAG, e.toString() ); } } } } Loading
app/src/main/AndroidManifest.xml +0 −8 Original line number Diff line number Diff line Loading @@ -69,14 +69,6 @@ http://www.gnu.org/licenses/gpl.html android:enabled="true" /> <service android:name=".services.OperationManagerService" /> <receiver android:name=".receivers.BatteryStateReceiver" android:enabled="true"> <intent-filter> <action android:name="android.intent.action.BATTERY_LOW" /> <action android:name="android.intent.action.BATTERY_OKAY" /> </intent-filter> </receiver> <receiver android:name=".receivers.PackageEventReceiver" android:enabled="true"> Loading
app/src/main/java/foundation/e/drive/receivers/BatteryStateReceiver.javadeleted 100644 → 0 +0 −39 Original line number Diff line number Diff line /* * Copyright © Vincent Bourgmayer (/e/ foundation). * All rights reserved. This program and the accompanying materials * are made available under the terms of the GNU Public License v3.0 * which accompanies this distribution, and is available at * http://www.gnu.org/licenses/gpl.html */ package foundation.e.drive.receivers; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.util.Log; /** * @author Vincent Bourgmayer */ public class BatteryStateReceiver extends BroadcastReceiver { private final static String TAG = BatteryStateReceiver.class.getSimpleName(); @Override public void onReceive(Context context, Intent intent) { Log.i(TAG, "onReceive"); String intentAction = intent.getAction(); if(intentAction == null) { Log.e(TAG, "intent Action is null"); } else if ( intentAction.equals(Intent.ACTION_BATTERY_OKAY) ) { Log.d(TAG, "BATTERY is Okay. Synchronization job isn't reschedule anymore. Expected behaviour"); }else if(intentAction.equals(Intent.ACTION_BATTERY_LOW)){ try { context.unregisterReceiver(ScreenOffReceiver.getInstance()); }catch(Exception e){ Log.e(TAG, e.toString() ); } } } }