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
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:
@@ -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);
|
||||
}
|
||||
|
||||
5
src/api-impl/android/app/DownloadManager.java
Normal file
5
src/api-impl/android/app/DownloadManager.java
Normal file
@@ -0,0 +1,5 @@
|
||||
package android.app;
|
||||
|
||||
public class DownloadManager {
|
||||
|
||||
}
|
||||
5
src/api-impl/android/app/Fragment.java
Normal file
5
src/api-impl/android/app/Fragment.java
Normal file
@@ -0,0 +1,5 @@
|
||||
package android.app;
|
||||
|
||||
public class Fragment {
|
||||
|
||||
}
|
||||
16
src/api-impl/android/app/FragmentManager.java
Normal file
16
src/api-impl/android/app/FragmentManager.java
Normal file
@@ -0,0 +1,16 @@
|
||||
package android.app;
|
||||
|
||||
public class FragmentManager {
|
||||
|
||||
public Fragment findFragmentByTag(String tag) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public FragmentTransaction beginTransaction() {
|
||||
return new FragmentTransaction();
|
||||
}
|
||||
|
||||
public boolean executePendingTransactions() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
12
src/api-impl/android/app/FragmentTransaction.java
Normal file
12
src/api-impl/android/app/FragmentTransaction.java
Normal file
@@ -0,0 +1,12 @@
|
||||
package android.app;
|
||||
|
||||
public class FragmentTransaction {
|
||||
|
||||
public FragmentTransaction add(Fragment fragment, String string) {
|
||||
return this;
|
||||
}
|
||||
|
||||
public int commit() {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
5
src/api-impl/android/app/SearchManager.java
Normal file
5
src/api-impl/android/app/SearchManager.java
Normal file
@@ -0,0 +1,5 @@
|
||||
package android.app;
|
||||
|
||||
public class SearchManager {
|
||||
|
||||
}
|
||||
10
src/api-impl/android/app/UiModeManager.java
Normal file
10
src/api-impl/android/app/UiModeManager.java
Normal file
@@ -0,0 +1,10 @@
|
||||
package android.app;
|
||||
|
||||
import android.content.res.Configuration;
|
||||
|
||||
public class UiModeManager {
|
||||
|
||||
public int getCurrentModeType() {
|
||||
return Configuration.UI_MODE_TYPE_NORMAL;
|
||||
}
|
||||
}
|
||||
5
src/api-impl/android/app/WallpaperManager.java
Normal file
5
src/api-impl/android/app/WallpaperManager.java
Normal file
@@ -0,0 +1,5 @@
|
||||
package android.app;
|
||||
|
||||
public class WallpaperManager {
|
||||
|
||||
}
|
||||
5
src/api-impl/android/app/admin/DevicePolicyManager.java
Normal file
5
src/api-impl/android/app/admin/DevicePolicyManager.java
Normal file
@@ -0,0 +1,5 @@
|
||||
package android.app.admin;
|
||||
|
||||
public class DevicePolicyManager {
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user