api-impl: add misc stubs/impls

This commit is contained in:
Mis012
2024-06-13 21:00:06 +02:00
parent 725df91af9
commit 81797c2667
13 changed files with 92 additions and 8 deletions

View File

@@ -1804,7 +1804,8 @@ public final class MotionEvent extends InputEvent {
* a stream of position events.
*/
public final long getDownTime() {
return nativeGetDownTimeNanos(mNativePtr) / NS_PER_MS;
return getEventTime(); // FIXME?
// return nativeGetDownTimeNanos(mNativePtr) / NS_PER_MS;
}
/**

View File

@@ -1489,11 +1489,6 @@ public class View implements Drawable.Callback {
public void clearFocus() {}
public void setRotation(float rotation) {}
public void setScaleX(float scaleX) {}
public void setScaleY(float scaleY) {}
public static View inflate(Context context, int resource, ViewGroup root) {
LayoutInflater factory = LayoutInflater.from(context);
return factory.inflate(resource, root);
@@ -1734,20 +1729,32 @@ public class View implements Drawable.Callback {
public void getWindowVisibleDisplayFrame(Rect rect) {}
public void setRotation(float rotation) {}
public void setRotationX(float deg) {}
public void setRotationY(float deg) {}
public float getRotationX() {return 0.f;}
public float getRotationY() {return 0.f;}
public void setScaleX(float scaleX) {}
public void setScaleY(float scaleY) {}
public float getScaleX() {return 1.f;}
public float getScaleY() {return 1.f;}
public void setPivotX(float pivot_x) {}
public void setPivotY(float pivot_y) {}
public float getPivotX() {return 0.f;}
public float getPivotY() {return 0.f;}
public float getTranslationZ() {return 0.f;}
public void setTranslationZ(float translationZ) {}
public int getWindowSystemUiVisibility() {
return 0;
}
public void setScrollIndicators(int indicators, int mask) {}
}

View File

@@ -0,0 +1,5 @@
package android.view;
public class ViewAnimationUtils {
}

View File

@@ -106,4 +106,5 @@ public class Window {
return new WindowManagerImpl();
}
public void setSoftInputMode(int dummy) {}
}

View File

@@ -15,4 +15,48 @@ public class WindowInsets {
public WindowInsets consumeSystemWindowInsets() {
return this;
}
public WindowInsets replaceSystemWindowInsets(int left, int top, int right, int bottom) {
return this;
}
public int getSystemWindowInsetLeft() {
return 0;
}
public int getSystemWindowInsetTop() {
return 0;
}
public int getSystemWindowInsetRight() {
return 0;
}
public int getSystemWindowInsetBottom() {
return 0;
}
public int getStableInsetLeft() {
return 0;
}
public int getStableInsetTop() {
return 0;
}
public int getStableInsetRight() {
return 0;
}
public int getStableInsetBottom() {
return 0;
}
public boolean isRound() {
return false;
}
public boolean isConsumed() {
return false;
}
}