Force preference screen to use our preference stored in DE
This commit is contained in:
parent
81a0cddb9e
commit
9ab3143bf0
@ -3,8 +3,10 @@ package com.topjohnwu.magisk.components;
|
|||||||
import android.Manifest;
|
import android.Manifest;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
|
import android.content.SharedPreferences;
|
||||||
import android.content.pm.PackageManager;
|
import android.content.pm.PackageManager;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
import android.text.TextUtils;
|
||||||
import android.view.WindowManager;
|
import android.view.WindowManager;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
@ -145,4 +147,11 @@ public abstract class BaseActivity extends AppCompatActivity implements Topic.Au
|
|||||||
public interface ActivityResultListener {
|
public interface ActivityResultListener {
|
||||||
void onActivityResult(int requestCode, int resultCode, Intent data);
|
void onActivityResult(int requestCode, int resultCode, Intent data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SharedPreferences getSharedPreferences(String name, int mode) {
|
||||||
|
if (TextUtils.equals(name, getPackageName() + "_preferences"))
|
||||||
|
return app.prefs;
|
||||||
|
return super.getSharedPreferences(name, mode);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user