mirror of
https://github.com/etesync/android
synced 2025-01-11 00:01:12 +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,7 +112,8 @@ 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));
|
||||
getContext().startActivity(intent);
|
||||
if (intent.resolveActivity(getContext().getPackageManager()) != null)
|
||||
getContext().startActivity(intent);
|
||||
}
|
||||
})
|
||||
.setNegativeButton(R.string.startup_dont_show_again, new DialogInterface.OnClickListener() {
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 30b8bc58ce3dccc8c41af0b4d224a3b5aafd5979
|
||||
Subproject commit 3c55eb1f6e066cd0e7b854388e46a7bb93374781
|
Loading…
Reference in New Issue
Block a user