Use ActivityCompat.recreate().
This commit is contained in:
parent
a8efa1ac07
commit
19ffd2b491
@ -21,7 +21,7 @@ def basicApplicationId = "org.fdroid.basic"
|
|||||||
def privilegedExtensionApplicationId = '"org.fdroid.fdroid.privileged"'
|
def privilegedExtensionApplicationId = '"org.fdroid.fdroid.privileged"'
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 29
|
compileSdkVersion 30
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
versionCode 1013001
|
versionCode 1013001
|
||||||
@ -142,10 +142,9 @@ android {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation 'androidx.appcompat:appcompat:1.2.0'
|
implementation 'androidx.appcompat:appcompat:1.3.0'
|
||||||
implementation 'androidx.preference:preference:1.1.1'
|
implementation 'androidx.preference:preference:1.1.1'
|
||||||
implementation 'androidx.gridlayout:gridlayout:1.0.0'
|
implementation 'androidx.gridlayout:gridlayout:1.0.0'
|
||||||
implementation 'androidx.annotation:annotation:1.1.0'
|
|
||||||
implementation 'androidx.recyclerview:recyclerview:1.1.0'
|
implementation 'androidx.recyclerview:recyclerview:1.1.0'
|
||||||
implementation 'androidx.cardview:cardview:1.0.0'
|
implementation 'androidx.cardview:cardview:1.0.0'
|
||||||
implementation 'androidx.vectordrawable:vectordrawable:1.1.0'
|
implementation 'androidx.vectordrawable:vectordrawable:1.1.0'
|
||||||
|
@ -128,6 +128,7 @@ public class FileInstallerActivity extends FragmentActivity {
|
|||||||
@Override
|
@Override
|
||||||
public void onRequestPermissionsResult(int requestCode,
|
public void onRequestPermissionsResult(int requestCode,
|
||||||
@NonNull String[] permissions, @NonNull int[] grantResults) {
|
@NonNull String[] permissions, @NonNull int[] grantResults) {
|
||||||
|
super.onRequestPermissionsResult(requestCode, permissions, grantResults);
|
||||||
switch (requestCode) {
|
switch (requestCode) {
|
||||||
case MY_PERMISSIONS_REQUEST_STORAGE:
|
case MY_PERMISSIONS_REQUEST_STORAGE:
|
||||||
// If request is cancelled, the result arrays are empty.
|
// If request is cancelled, the result arrays are empty.
|
||||||
|
@ -53,6 +53,7 @@ import org.fdroid.fdroid.work.CleanCacheWorker;
|
|||||||
import org.fdroid.fdroid.work.FDroidMetricsWorker;
|
import org.fdroid.fdroid.work.FDroidMetricsWorker;
|
||||||
|
|
||||||
import androidx.appcompat.app.AppCompatActivity;
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
|
import androidx.core.app.ActivityCompat;
|
||||||
import androidx.preference.CheckBoxPreference;
|
import androidx.preference.CheckBoxPreference;
|
||||||
import androidx.preference.EditTextPreference;
|
import androidx.preference.EditTextPreference;
|
||||||
import androidx.preference.ListPreference;
|
import androidx.preference.ListPreference;
|
||||||
@ -291,7 +292,7 @@ public class PreferencesFragment extends PreferenceFragmentCompat
|
|||||||
AppCompatActivity activity = (AppCompatActivity) getActivity();
|
AppCompatActivity activity = (AppCompatActivity) getActivity();
|
||||||
// Theme will be applied upon activity creation
|
// Theme will be applied upon activity creation
|
||||||
if (activity != null) {
|
if (activity != null) {
|
||||||
activity.recreate();
|
ActivityCompat.recreate(activity);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user