Commit d816dd5c authored by Thiago Mendes's avatar Thiago Mendes

Ask for Battery opt only on the first run

parent 10f3418d
Pipeline #149038078 passed with stage
in 22 seconds
......@@ -116,7 +116,6 @@ public class MainActivity extends AppCompatActivity
permissionHelper = new PermissionHelper(this);
showBreakingChangeDialogAndMigradeIfNeeded();
checkIsEnableBatteryOptimizations();
requestForPermissions();
// Birthdays
......@@ -176,6 +175,7 @@ public class MainActivity extends AppCompatActivity
private void executeFirstRunInitializationIfNeeded(SharedPreferences prefs, Context ctx) {
if (prefs.getBoolean("run_first_time", true)) {
checkIsEnableBatteryOptimizations();
new AlarmHelper().setAlarm(ctx, 0);
SharedPreferences.Editor edit = prefs.edit();
edit.putBoolean("run_first_time", false);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment