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: stubs and fixes for Shosetsu
This commit is contained in:
@@ -568,9 +568,7 @@ public class Activity extends ContextThemeWrapper implements Window.Callback, La
|
||||
|
||||
public void overridePendingTransition(int enterAnim, int exitAnim) {}
|
||||
|
||||
public boolean isTaskRoot() {
|
||||
return false;
|
||||
}
|
||||
public native boolean isTaskRoot();
|
||||
|
||||
public void postponeEnterTransition() {}
|
||||
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
package android.content;
|
||||
|
||||
public class AbstractThreadedSyncAdapter {
|
||||
}
|
||||
@@ -12,6 +12,7 @@ import org.xmlpull.v1.XmlPullParser;
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.Objects;
|
||||
import java.util.Set;
|
||||
|
||||
public class Intent implements Parcelable {
|
||||
@@ -416,4 +417,11 @@ public class Intent implements Parcelable {
|
||||
public Intent getSelector() {
|
||||
return selector;
|
||||
}
|
||||
|
||||
public boolean filterEquals(Intent other) {
|
||||
return Objects.equals(this.action, other.action)
|
||||
&& Objects.equals(this.component, other.component)
|
||||
&& Objects.equals(this.data, other.data)
|
||||
&& Objects.equals(this.type, other.type);
|
||||
}
|
||||
}
|
||||
|
||||
4
src/api-impl/android/content/Loader.java
Normal file
4
src/api-impl/android/content/Loader.java
Normal file
@@ -0,0 +1,4 @@
|
||||
package android.content;
|
||||
|
||||
public class Loader {
|
||||
}
|
||||
@@ -521,17 +521,17 @@ public class Canvas {
|
||||
}
|
||||
|
||||
public boolean clipRect(RectF rect) {
|
||||
Log.w("Canvas", "STUB: clipRect");
|
||||
Log.v("Canvas", "STUB: clipRect");
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean clipRect(float left, float top, float right, float bottom, Region.Op op) {
|
||||
Log.w("Canvas", "STUB: clipRect");
|
||||
Log.v("Canvas", "STUB: clipRect");
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean clipRect(RectF rect, Region.Op op) {
|
||||
Log.w("Canvas", "STUB: clipRect");
|
||||
Log.v("Canvas", "STUB: clipRect");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -550,4 +550,8 @@ public class Canvas {
|
||||
public void drawPicture(Picture picture) {
|
||||
Log.w("Canvas", "STUB: drawPicture");
|
||||
}
|
||||
|
||||
public void drawPoint(float x, float y, Paint paint) {
|
||||
Log.w("Canvas", "STUB: drawPoint");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -86,7 +86,8 @@ public class Region {
|
||||
* Set the region to the specified rectangle
|
||||
*/
|
||||
public boolean set(Rect r) {
|
||||
return nativeSetRect(mNativeRegion, r.left, r.top, r.right, r.bottom);
|
||||
// return nativeSetRect(mNativeRegion, r.left, r.top, r.right, r.bottom);
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -107,7 +108,9 @@ public class Region {
|
||||
/**
|
||||
* Return true if this region is empty
|
||||
*/
|
||||
public native boolean isEmpty();
|
||||
public /*native*/ boolean isEmpty() {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return true if the region contains a single rectangle
|
||||
@@ -124,7 +127,7 @@ public class Region {
|
||||
*/
|
||||
public Rect getBounds() {
|
||||
Rect r = new Rect();
|
||||
nativeGetBounds(mNativeRegion, r);
|
||||
// nativeGetBounds(mNativeRegion, r);
|
||||
return r;
|
||||
}
|
||||
|
||||
@@ -264,8 +267,9 @@ public class Region {
|
||||
* regions. Return true if the result is not empty.
|
||||
*/
|
||||
public boolean op(Region region1, Region region2, Op op) {
|
||||
return nativeOp(mNativeRegion, region1.mNativeRegion,
|
||||
region2.mNativeRegion, op.nativeInt);
|
||||
// return nativeOp(mNativeRegion, region1.mNativeRegion,
|
||||
// region2.mNativeRegion, op.nativeInt);
|
||||
return false;
|
||||
}
|
||||
public String toString() {
|
||||
return nativeToString(mNativeRegion);
|
||||
|
||||
@@ -23,7 +23,7 @@ public class NetworkInfo {
|
||||
}
|
||||
|
||||
public int getType() {
|
||||
return 0x8; // TYPE_DUMMY
|
||||
return state == State.CONNECTED ? /*TYPE_WIFI*/0x1 : 0x0;
|
||||
}
|
||||
|
||||
public boolean isConnected() {
|
||||
|
||||
@@ -20,9 +20,17 @@ public class TextToSpeech {
|
||||
return ERROR;
|
||||
}
|
||||
|
||||
public int setOnUtteranceProgressListener(UtteranceProgressListener listener) {
|
||||
return ERROR;
|
||||
}
|
||||
|
||||
public void shutdown() {
|
||||
}
|
||||
|
||||
public int stop() {
|
||||
return ERROR;
|
||||
}
|
||||
|
||||
public static interface OnInitListener {
|
||||
abstract void onInit(int status);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
package android.speech.tts;
|
||||
|
||||
public class UtteranceProgressListener {
|
||||
}
|
||||
@@ -23,4 +23,10 @@ public class CookieManager {
|
||||
public void removeSessionCookies(ValueCallback callback) {}
|
||||
|
||||
public void flush() {}
|
||||
|
||||
public String getCookie(String url) {
|
||||
return "";
|
||||
}
|
||||
|
||||
public void setCookie(String url, String value) {}
|
||||
}
|
||||
|
||||
@@ -54,4 +54,6 @@ public class WebSettings {
|
||||
public void setBlockNetworkLoads(boolean block) {}
|
||||
|
||||
public void setMixedContentMode(int mode) {}
|
||||
|
||||
public void setBlockNetworkImage(boolean block) {}
|
||||
}
|
||||
|
||||
@@ -96,6 +96,8 @@ public class WebView extends ViewGroup {
|
||||
loadDataWithBaseURL("about:blank", data, mimeType, encoding, "about:blank");
|
||||
}
|
||||
|
||||
public void evaluateJavascript(String script, ValueCallback resultCallback) {}
|
||||
|
||||
@Override
|
||||
protected native long native_constructor(Context context, AttributeSet attrs);
|
||||
private native void native_loadDataWithBaseURL(long widget, String baseUrl, String data, String mimeType, String encoding);
|
||||
|
||||
Reference in New Issue
Block a user