api-impl: misc APIs for WhatsApp media chooser Activities

This commit is contained in:
Julian Winkler
2025-04-23 18:21:19 +02:00
parent 69b742263a
commit e011092025
19 changed files with 123 additions and 26 deletions

View File

@@ -395,7 +395,15 @@ public class Intent implements Parcelable {
public void setSourceBounds(Rect sourceBounds) {}
public Rect getSourceBounds() {
return null;
}
public void setSelector(Intent selector) {}
public void setClipData(ClipData clip) {}
public String resolveType(Context context) {
return type;
}
}

View File

@@ -1,6 +1,7 @@
package android.content.pm;
import android.content.IntentFilter;
import android.graphics.drawable.Drawable;
public class ResolveInfo {
public ActivityInfo activityInfo = new ActivityInfo();
@@ -8,6 +9,22 @@ public class ResolveInfo {
public IntentFilter filter = new IntentFilter();
public int priority = -500;
public Drawable loadIcon(PackageManager pm) {
Drawable icon = activityInfo.loadIcon(pm);
if (icon == null) {
icon = new Drawable();
}
return icon;
}
public CharSequence loadLabel(PackageManager pm) {
CharSequence label = activityInfo.loadLabel(pm);
if (label == null) {
label = "fixme ResolveInfo.loadLabel";
}
return label;
}
public static class DisplayNameComparator {
public DisplayNameComparator(PackageManager pm) {}