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: misc APIs for WhatsApp media chooser Activities
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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) {}
|
||||
|
||||
Reference in New Issue
Block a user