mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-29 04:55:15 +00:00
1893047a78
// FREEBIE
19 lines
505 B
Java
19 lines
505 B
Java
package org.thoughtcrime.securesms.util;
|
|
|
|
|
|
import android.content.Context;
|
|
import android.content.Intent;
|
|
import android.content.pm.ResolveInfo;
|
|
import android.support.annotation.NonNull;
|
|
|
|
import java.util.List;
|
|
|
|
public class IntentUtils {
|
|
|
|
public static boolean isResolvable(@NonNull Context context, @NonNull Intent intent) {
|
|
List<ResolveInfo> resolveInfoList = context.getPackageManager().queryIntentActivities(intent, 0);
|
|
return resolveInfoList != null && resolveInfoList.size() > 1;
|
|
}
|
|
|
|
}
|