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: add misc stubs/impls
This commit is contained in:
@@ -41,6 +41,7 @@ public class Activity extends ContextWrapper implements Window.Callback {
|
||||
private boolean paused = false;
|
||||
private CharSequence title = null;
|
||||
List<Fragment> fragments = new ArrayList<>();
|
||||
boolean destroyed = false;
|
||||
|
||||
/**
|
||||
* Helper function to be called from native code to construct main activity
|
||||
@@ -204,6 +205,7 @@ public class Activity extends ContextWrapper implements Window.Callback {
|
||||
fragment.onDestroy();
|
||||
}
|
||||
|
||||
destroyed = true;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -482,6 +484,10 @@ public class Activity extends ContextWrapper implements Window.Callback {
|
||||
return true; // FIXME?
|
||||
}
|
||||
|
||||
public boolean isDestroyed() {
|
||||
return destroyed;
|
||||
}
|
||||
|
||||
private native void nativeFinish(long native_window);
|
||||
public static native void nativeRecreateActivity(Activity activity);
|
||||
public static native void nativeStartActivity(Activity activity);
|
||||
|
||||
@@ -9,9 +9,10 @@ import android.media.AudioAttributes;
|
||||
import android.media.session.MediaSession;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.os.Parcelable;
|
||||
import android.widget.RemoteViews;
|
||||
|
||||
public class Notification {
|
||||
public class Notification implements Parcelable {
|
||||
|
||||
public static final AudioAttributes AUDIO_ATTRIBUTES_DEFAULT = new AudioAttributes();
|
||||
|
||||
|
||||
@@ -22,4 +22,7 @@ public abstract class Service extends Context {
|
||||
System.out.println("stopForeground(" + remove + ") called");
|
||||
}
|
||||
|
||||
public Application getApplication() {
|
||||
return this_application;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user