opt: independent runtime

This commit is contained in:
hyb1996
2017-12-08 22:45:31 +08:00
parent e8179cae94
commit b6f251da0b
30 changed files with 481 additions and 230 deletions

View File

@@ -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

View 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;
}
}