mirror of
https://github.com/M66B/FairEmail.git
synced 2024-12-29 19:25:34 +00:00
Debug: file selectors
This commit is contained in:
parent
7ccf489f22
commit
cebf58962d
1 changed files with 22 additions and 0 deletions
|
@ -1619,6 +1619,28 @@ public class DebugHelper {
|
||||||
}
|
}
|
||||||
size += write(os, "\r\n");
|
size += write(os, "\r\n");
|
||||||
|
|
||||||
|
try {
|
||||||
|
Intent open = new Intent(Intent.ACTION_GET_CONTENT);
|
||||||
|
open.addCategory(Intent.CATEGORY_OPENABLE);
|
||||||
|
open.setType("*/*");
|
||||||
|
|
||||||
|
ResolveInfo main = pm.resolveActivity(open, 0);
|
||||||
|
|
||||||
|
List<ResolveInfo> ris = pm.queryIntentActivities(open, flags);
|
||||||
|
size += write(os, "File selectors=" + (ris == null ? null : ris.size()) + "\r\n");
|
||||||
|
if (ris != null)
|
||||||
|
for (ResolveInfo ri : ris) {
|
||||||
|
boolean p = Objects.equals(main == null ? null : main.activityInfo.packageName, ri.activityInfo.packageName);
|
||||||
|
CharSequence label = pm.getApplicationLabel(ri.activityInfo.applicationInfo);
|
||||||
|
size += write(os, String.format("File selector %s%s (%s)\r\n",
|
||||||
|
ri.activityInfo.packageName, p ? "*" : "", label == null ? null : label.toString()));
|
||||||
|
}
|
||||||
|
|
||||||
|
} catch (Throwable ex) {
|
||||||
|
size += write(os, "\r\n");
|
||||||
|
}
|
||||||
|
size += write(os, "\r\n");
|
||||||
|
|
||||||
try {
|
try {
|
||||||
Intent intent = new Intent(Intent.ACTION_VIEW)
|
Intent intent = new Intent(Intent.ACTION_VIEW)
|
||||||
//.addCategory(Intent.CATEGORY_BROWSABLE)
|
//.addCategory(Intent.CATEGORY_BROWSABLE)
|
||||||
|
|
Loading…
Reference in a new issue