api-impl: misc stubs and fixes for several apps including F-Droid and AuroraStore

This commit is contained in:
Julian Winkler
2025-03-25 19:24:06 +01:00
parent 7b0341123b
commit 4a4b4a4722
36 changed files with 296 additions and 27 deletions

View File

@@ -234,9 +234,8 @@ public class PopupMenu {
}
@Override
public MenuItem getItem(int id) {
// TODO Auto-generated method stub
throw new UnsupportedOperationException("Unimplemented method 'getItem'");
public MenuItem getItem(int index) {
return items.get(index);
}
@Override
@@ -297,8 +296,7 @@ public class PopupMenu {
@Override
public int size() {
// TODO Auto-generated method stub
throw new UnsupportedOperationException("Unimplemented method 'size'");
return items.size();
}
@Override

View File

@@ -1,6 +1,7 @@
package android.widget;
import android.content.Context;
import android.graphics.Rect;
import android.graphics.drawable.Drawable;
import android.util.AttributeSet;
import android.util.Log;
@@ -118,4 +119,8 @@ public class PopupWindow {
}
public void setWindowLayoutType(int type) {}
public void setIsClippedToScreen(boolean isClippedToScreen) {}
public void setEpicenterBounds(Rect bounds) {}
}

View File

@@ -13,6 +13,7 @@ public class ProgressBar extends View {
protected int progress = 0;
private boolean indeterminate = false;
private Drawable indeterminateDrawable;
private Drawable progressDrawable = new Drawable();
public ProgressBar(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
@@ -58,13 +59,7 @@ public class ProgressBar extends View {
public Drawable getProgressDrawable() {
return new Drawable() {
@Override
public void draw(Canvas canvas) {
// TODO Auto-generated method stub
throw new UnsupportedOperationException("Unimplemented method 'draw'");
}
};
return progressDrawable;
}
public Drawable getIndeterminateDrawable() {
@@ -103,7 +98,8 @@ public class ProgressBar extends View {
this.indeterminateDrawable = indeterminateDrawable;
}
public void setProgressDrawable(Drawable indeterminateDrawable) {
public void setProgressDrawable(Drawable progressDrawable) {
this.progressDrawable = progressDrawable;
}
public native void native_setIndeterminate(boolean indeterminate);

View File

@@ -0,0 +1,16 @@
package android.widget;
import android.content.Context;
import android.util.AttributeSet;
public class RatingBar extends AbsSeekBar {
public RatingBar(Context context) {
this(context, null);
}
public RatingBar(Context context, AttributeSet attributeSet) {
super(context, attributeSet);
}
}

View File

@@ -397,4 +397,6 @@ public class TextView extends View {
public int getImeOptions() {return 0;}
public void setShadowLayer(float radius, float dx, float dy, int color) {}
public void setBreakStrategy(int strategy) {}
}

View File

@@ -0,0 +1,16 @@
package android.widget;
import android.content.Context;
import android.util.AttributeSet;
public class ViewFlipper extends ViewAnimator {
public ViewFlipper(Context context) {
this(context, null);
}
public ViewFlipper(Context context, AttributeSet attrs) {
super(context, attrs);
}
}