Fix battery optimizations check
This commit is contained in:
parent
711741418b
commit
f2f1db576e
1 changed files with 4 additions and 1 deletions
|
|
@ -51,7 +51,11 @@ public class SplashActivity extends AbsBaseActivity {
|
||||||
|
|
||||||
credentialProvider = new AndroidCredentialProvider(jsonSerializer, this, logger);
|
credentialProvider = new AndroidCredentialProvider(jsonSerializer, this, logger);
|
||||||
connectionManager = App.getConnectionManager(this, jsonSerializer, logger, httpClient);
|
connectionManager = App.getConnectionManager(this, jsonSerializer, logger, httpClient);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onResume() {
|
||||||
|
super.onResume();
|
||||||
if (detectBatteryOptimization()) {
|
if (detectBatteryOptimization()) {
|
||||||
showBatteryOptimizationDialog();
|
showBatteryOptimizationDialog();
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -79,7 +83,6 @@ public class SplashActivity extends AbsBaseActivity {
|
||||||
})
|
})
|
||||||
.setPositiveButton(R.string.action_go_to_optimization_settings, new DialogInterface.OnClickListener() {
|
.setPositiveButton(R.string.action_go_to_optimization_settings, new DialogInterface.OnClickListener() {
|
||||||
public void onClick(DialogInterface dialog, int id) {
|
public void onClick(DialogInterface dialog, int id) {
|
||||||
login();
|
|
||||||
openPowerSettings(SplashActivity.this);
|
openPowerSettings(SplashActivity.this);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue