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
implement/stub some stuff to make SmashHit launch
This commit is contained in:
@@ -16,6 +16,7 @@ import android.util.DisplayMetrics;
|
||||
import android.content.SharedPreferences;
|
||||
import android.app.SharedPreferencesImpl;
|
||||
import android.os.Looper;
|
||||
import android.os.PowerManager;
|
||||
import android.app.Application;
|
||||
|
||||
import android.view.WindowManager;
|
||||
@@ -42,6 +43,8 @@ public class Context extends Object {
|
||||
static Configuration config;
|
||||
static Resources r;
|
||||
|
||||
static String apk_path = "/tmp/APK_PATH_SHOULD_HAVE_BEEN_FILLED_IN_BY_CODE_IN_main.c/";
|
||||
|
||||
public /*← FIXME?*/ static Application this_application;
|
||||
|
||||
File data_dir = null;
|
||||
@@ -96,6 +99,8 @@ public class Context extends Object {
|
||||
return new UsbManager();
|
||||
case "vibrator":
|
||||
return new Vibrator();
|
||||
case "power":
|
||||
return new PowerManager();
|
||||
default:
|
||||
System.out.println("!!!!!!! getSystemService: case >"+name+"< is not implemented yet");
|
||||
return null;
|
||||
@@ -115,6 +120,10 @@ public class Context extends Object {
|
||||
return "com.example.demo_app";
|
||||
}
|
||||
|
||||
public String getPackageCodePath() {
|
||||
return apk_path;
|
||||
}
|
||||
|
||||
public final String getString(int resId) {
|
||||
return r.getString(resId);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user