1
0
mirror of https://github.com/etesync/android synced 2025-01-11 08:10:58 +00:00

Avoid some crashes

* check whether ACTION_REQUEST_IGNORE_BATTERY_OPTIMIZATION can be resolved before launching it
* cert4android: don't crash when service can't be bound
This commit is contained in:
Ricki Hirner 2016-11-14 18:38:15 +01:00
parent fb7f974987
commit 4f796669f6
2 changed files with 3 additions and 2 deletions

View File

@ -112,6 +112,7 @@ public class StartupDialogFragment extends DialogFragment {
public void onClick(DialogInterface dialog, int which) {
Intent intent = new Intent(android.provider.Settings.ACTION_REQUEST_IGNORE_BATTERY_OPTIMIZATIONS,
Uri.parse("package:" + BuildConfig.APPLICATION_ID));
if (intent.resolveActivity(getContext().getPackageManager()) != null)
getContext().startActivity(intent);
}
})

@ -1 +1 @@
Subproject commit 30b8bc58ce3dccc8c41af0b4d224a3b5aafd5979
Subproject commit 3c55eb1f6e066cd0e7b854388e46a7bb93374781