Skip to content

Commit 18682c9

Browse files
committed
first commit
1 parent cb759a7 commit 18682c9

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

app/build.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,6 @@ dependencies {
2828
compile 'com.android.support:appcompat-v7:24.2.1'
2929
compile 'com.android.support:design:24.2.1'
3030
testCompile 'junit:junit:4.12'
31-
compile 'com.github.KingsMentor:intentmanip:v1.0'
31+
// compile 'com.github.KingsMentor:intentmanip:v1.0'
32+
compile project(':intentmanip')
3233
}

intentmanip/src/main/java/xyz/belvi/intentmanip/IntentUtils/TargetIntent.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
import android.content.Context;
44
import android.content.Intent;
55

6+
import java.util.ArrayList;
7+
import java.util.Arrays;
68
import java.util.List;
79

810
import xyz.belvi.intentmanip.IntentUtils.Models.ResolveIntent;
@@ -23,15 +25,15 @@ public static List<ResolveIntent> getAllApps(Context context) {
2325
}
2426

2527
public static ResolveIntent targetByAppName(Context context, List<ResolveIntent> resolveIntents, String appName) {
26-
lookUpAppsByAppName(context, resolveIntents, appName);
28+
lookUpAppsByAppName(context, resolveIntents, new ArrayList<String>(Arrays.asList(appName)));
2729
if (resolveIntents.size() > 0) {
2830
return resolveIntents.get(0);
2931
}
3032
return null;
3133
}
3234

3335
public static ResolveIntent targetByPackageName(Context context, List<ResolveIntent> resolveIntents, String packageName) {
34-
lookUpAppsByPackageName(resolveIntents, packageName);
36+
lookUpAppsByPackageName(resolveIntents, new ArrayList<String>(Arrays.asList(packageName)));
3537
if (resolveIntents.size() > 0) {
3638
return resolveIntents.get(0);
3739
}

0 commit comments

Comments
 (0)