mirror of
https://github.com/etesync/android
synced 2025-05-21 08:18:49 +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:
parent
fb7f974987
commit
4f796669f6
@ -112,6 +112,7 @@ public class StartupDialogFragment extends DialogFragment {
|
|||||||
public void onClick(DialogInterface dialog, int which) {
|
public void onClick(DialogInterface dialog, int which) {
|
||||||
Intent intent = new Intent(android.provider.Settings.ACTION_REQUEST_IGNORE_BATTERY_OPTIMIZATIONS,
|
Intent intent = new Intent(android.provider.Settings.ACTION_REQUEST_IGNORE_BATTERY_OPTIMIZATIONS,
|
||||||
Uri.parse("package:" + BuildConfig.APPLICATION_ID));
|
Uri.parse("package:" + BuildConfig.APPLICATION_ID));
|
||||||
|
if (intent.resolveActivity(getContext().getPackageManager()) != null)
|
||||||
getContext().startActivity(intent);
|
getContext().startActivity(intent);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit 30b8bc58ce3dccc8c41af0b4d224a3b5aafd5979
|
Subproject commit 3c55eb1f6e066cd0e7b854388e46a7bb93374781
|
Loading…
Reference in New Issue
Block a user