Fix crashes below R

This commit is contained in:
Suphon Thanakornpakapong
2021-10-13 09:27:49 +07:00
parent b42696eb21
commit cddb7fe98a
5 changed files with 32 additions and 7 deletions

View File

@@ -194,7 +194,7 @@ public class QuickstepModelDelegate extends ModelDelegate implements OnIDPChange
@WorkerThread
private void recreatePredictors() {
destroyPredictors();
if (!mActive) {
if (!Utilities.ATLEAST_Q || !mActive) {
return;
}
Context context = mApp.getContext();
@@ -203,7 +203,6 @@ public class QuickstepModelDelegate extends ModelDelegate implements OnIDPChange
return;
}
if (!Utilities.ATLEAST_Q) return;
int usagePerm = mApp.getContext().checkCallingOrSelfPermission(Manifest.permission.PACKAGE_USAGE_STATS);
if (usagePerm != PackageManager.PERMISSION_GRANTED) return;