You've already forked android_translation_layer
mirror of
https://gitlab.com/android_translation_layer/android_translation_layer.git
synced 2025-10-27 11:48:10 -07:00
api-impl: misc stubs for stupid ad stuff in SubwaySurfers
This commit is contained in:
@@ -67,13 +67,14 @@ public class Context extends Object {
|
||||
public static final String MEDIA_ROUTER_SERVICE = "media_router";
|
||||
public static final String WINDOW_SERVICE = "window";
|
||||
public static final String INPUT_METHOD_SERVICE = "input";
|
||||
public static final String POWER_SERVICE = "power";
|
||||
public static AndroidManifestBlock manifest = null;
|
||||
|
||||
public static Vibrator vibrator;
|
||||
|
||||
static AssetManager assets;
|
||||
static DisplayMetrics dm;
|
||||
protected static Resources r;
|
||||
public static Resources r;
|
||||
static ApplicationInfo application_info;
|
||||
static Resources.Theme theme;
|
||||
private static Map<Class<? extends Service>,Service> runningServices = new HashMap<>();
|
||||
@@ -355,6 +356,21 @@ public class Context extends Object {
|
||||
return prefs_dir;
|
||||
}
|
||||
|
||||
public File getDir(String name, int mode) {
|
||||
File dir = new File(getFilesDir(), name);
|
||||
if (!dir.exists()) {
|
||||
if (!dir.mkdirs()) {
|
||||
if (dir.exists()) {
|
||||
// spurious failure; probably racing with another process for this app
|
||||
return dir;
|
||||
}
|
||||
Slog.w(TAG, "Unable to create directory >" + dir.getPath() + "<");
|
||||
return null;
|
||||
}
|
||||
}
|
||||
return dir;
|
||||
}
|
||||
|
||||
public File getFileStreamPath(String name) {
|
||||
return makeFilename(getFilesDir(), name);
|
||||
}
|
||||
|
||||
@@ -22,8 +22,7 @@ import android.icu.text.PluralRules;
|
||||
import android.graphics.drawable.ColorDrawable;
|
||||
// import android.graphics.Movie;
|
||||
import android.graphics.drawable.Drawable;
|
||||
// import android.graphics.drawable.ColorDrawable;
|
||||
// import android.graphics.drawable.Drawable.ConstantState;
|
||||
import android.graphics.drawable.Drawable.ConstantState;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
// import android.os.IBinder;
|
||||
@@ -51,8 +50,6 @@ import org.xmlpull.v1.XmlPullParserException;
|
||||
|
||||
class Movie {}
|
||||
|
||||
class ConstantState {}
|
||||
|
||||
class IBinder {}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user