Skip to content

Commit 573dbab

Browse files
author
isayan
committed
Fixed crash after repeated rotation.
1 parent b5ff833 commit 573dbab

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

android_app/app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ android {
1313
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
1414
externalNativeBuild {
1515
cmake {
16-
cppFlags "-std=c++11 -fvisibility=hidden "
16+
cppFlags "-std=c++17 -fvisibility=hidden "
1717
abiFilters 'armeabi-v7a','arm64-v8a', 'x86'
1818
arguments "-DCMAKE_VERBOSE_MAKEFILE=1 -DANDROID_FUNCTION_LEVEL_LINKING=ON"
1919
}

android_app/app/src/main/java/tun/proxy/SettingsActivity.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,9 @@ protected void filter(String filter, final MyApplication.AppSortBy sortBy, final
270270

271271
this.removeAllPreferenceScreen();
272272
//final AsyncTaskProgress task = new AsyncTaskProgress(this);
273-
task.execute();
273+
if (task.getStatus() == AsyncTask.Status.PENDING) {
274+
task.execute();
275+
}
274276
// this.filterPackagesPreferences(filter, sortBy, orderBy);
275277
}
276278

@@ -574,6 +576,8 @@ protected void onPostExecute(List<PackageInfo> installedPackages) {
574576
@Override
575577
protected void onCancelled() {
576578
super.onCancelled();
579+
packageFragment.mAllPackageInfoMap.clear();
580+
packageFragment.mFilterPreferenceScreen.removeAll();
577581
return;
578582
}
579583

android_app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ buildscript {
88

99
}
1010
dependencies {
11-
classpath 'com.android.tools.build:gradle:3.6.1'
11+
classpath 'com.android.tools.build:gradle:3.6.2'
1212

1313
// NOTE: Do not place your application dependencies here; they belong
1414
// in the individual module build.gradle files

0 commit comments

Comments
 (0)