opt: independent runtime
This commit is contained in:
@@ -55,7 +55,8 @@ dependencies {
|
||||
compile 'com.squareup.okhttp3:okhttp:3.9.0'
|
||||
//JDeferred
|
||||
compile 'org.jdeferred:jdeferred-android-aar:1.2.6'
|
||||
|
||||
//RootShell
|
||||
compile 'com.github.Stericson:RootShell:1.6'
|
||||
// Gson
|
||||
compile 'com.google.code.gson:gson:2.8.0'
|
||||
// Terminal emulator
|
||||
|
||||
32
autojs/src/main/java/com/stardust/autojs/Pref.java
Normal file
32
autojs/src/main/java/com/stardust/autojs/Pref.java
Normal file
@@ -0,0 +1,32 @@
|
||||
package com.stardust.autojs;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.SharedPreferences;
|
||||
import android.preference.PreferenceManager;
|
||||
|
||||
/**
|
||||
* Created by Stardust on 2017/12/8.
|
||||
*/
|
||||
|
||||
public class Pref {
|
||||
|
||||
|
||||
private static Pref sInstance;
|
||||
private SharedPreferences mSharedPreferences;
|
||||
|
||||
public Pref(Context context) {
|
||||
mSharedPreferences = PreferenceManager.getDefaultSharedPreferences(context);
|
||||
}
|
||||
|
||||
public static void setInstance(Pref instance) {
|
||||
if (sInstance != null)
|
||||
throw new IllegalStateException();
|
||||
sInstance = instance;
|
||||
}
|
||||
|
||||
public static Pref getInstance() {
|
||||
return sInstance;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user