src/api-impl: add misc stubs, fix indentation

This commit is contained in:
Mis012
2022-11-04 19:21:45 +01:00
parent debe8c9843
commit 2865d34a32
2 changed files with 66 additions and 44 deletions

View File

@@ -3,6 +3,7 @@ package android.app;
import android.content.Context;
import android.content.ComponentName;
import android.content.Intent;
import android.content.res.Configuration;
import android.os.Bundle;
import android.widget.TextView;
@@ -116,6 +117,15 @@ public class Activity extends Context {
return;
}
protected void onSaveInstanceState(Bundle outState) {
}
void onConfigurationChanged(Configuration newConfig) {
}
public void onLowMemory() {
}
/* --- */
public void setContentView(int layoutResID) throws Exception {

View File

@@ -47,6 +47,7 @@ public class Context extends Object {
File data_dir = null;
File prefs_dir = null;
File files_dir = null;
File obb_dir = null;
File cache_dir = null;
static {
@@ -162,6 +163,17 @@ public class Context extends Object {
return files_dir;
}
public File getExternalFilesDir(String type) {
return getFilesDir();
}
public File getObbDir() {
if (obb_dir == null) {
obb_dir = new File(getDataDirFile(), "obb");
}
return obb_dir;
}
// FIXME: should be something like /tmp/cache, but may need to create that directory
public File getCacheDir() {
if (cache_dir == null) {