add bunch of new java APIs: mostly stubs or copied from AOSP

Many of these classes are only needed to be subclassed by androidx
support library, which is used in many android apps
This commit is contained in:
Julian Winkler
2023-08-17 10:46:24 +02:00
parent a8e39cd613
commit 82744e9e5e
87 changed files with 2746 additions and 46 deletions

View File

@@ -1,5 +1,6 @@
package android.app;
import android.R;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
@@ -102,6 +103,7 @@ public class Activity extends Context {
protected void onCreate(Bundle savedInstanceState) {
System.out.println("- onCreate - yay!");
new ViewGroup(this).setId(R.id.content);
return;
}
@@ -263,6 +265,22 @@ public class Activity extends Context {
nativeFinish(getWindow().native_window);
}
public Object getLastNonConfigurationInstance() {
return null;
}
public FragmentManager getFragmentManager() {
return new FragmentManager();
}
public LayoutInflater getLayoutInflater() {
return layout_inflater;
}
public CharSequence getTitle() {
return "Title";
}
private native void nativeFinish(long native_window);
private static native void nativeStartActivity(Activity activity);
}