@@ -79,73 +79,73 @@ public static void registerListeners(AppListener appListener, ActivityListener a
79
79
80
80
public static void getAllApps (Context context , Integer uniqueIdentifier ){
81
81
WeakReference <Context > context1 = new WeakReference <>(context );
82
- appTask = new AppTask (context1 ,null , true ,null , uniqueIdentifier , appListener );
82
+ appTask = new AppTask (context1 ,null , true ,null , false , uniqueIdentifier , appListener );
83
83
appTask .execute ();
84
84
}
85
85
86
- public static void getSomeApps (Context context , Integer applicationFlags , Boolean applicationFlagsMatch , String [] permissions , Integer uniqueIdentifier ){
86
+ public static void getSomeApps (Context context , Integer applicationFlags , Boolean applicationFlagsMatch , String [] permissions , Boolean matchPermissions , Integer uniqueIdentifier ){
87
87
WeakReference <Context > context1 = new WeakReference <>(context );
88
- appTask = new AppTask (context1 , applicationFlags , applicationFlagsMatch , permissions , uniqueIdentifier , appListener );
88
+ appTask = new AppTask (context1 , applicationFlags , applicationFlagsMatch , permissions , matchPermissions , uniqueIdentifier , appListener );
89
89
appTask .execute ();
90
90
}
91
91
92
92
public static void getAllActivities (Context context , Intent intent , Integer uniqueIdentifier ){
93
93
WeakReference <Context > context1 = new WeakReference <>(context );
94
- activityTask = new ActivityTask (context1 , intent , 0 , null , false ,null , uniqueIdentifier , activitiesListener );
94
+ activityTask = new ActivityTask (context1 , intent , 0 , null , false ,null , false , uniqueIdentifier , activitiesListener );
95
95
activityTask .execute ();
96
96
}
97
97
98
- public static void getSomeActivities (Context context , Intent intent , Integer activityFlags , Integer applicationFlags , Boolean applicationFlagsMatch , String [] permissions , Integer uniqueIdentifier ){
98
+ public static void getSomeActivities (Context context , Intent intent , Integer activityFlags , Integer applicationFlags , Boolean applicationFlagsMatch , String [] permissions , Boolean matchPermissions , Integer uniqueIdentifier ){
99
99
WeakReference <Context > context1 = new WeakReference <>(context );
100
- activityTask = new ActivityTask (context1 , intent , activityFlags , applicationFlags , applicationFlagsMatch ,permissions , uniqueIdentifier , activitiesListener );
100
+ activityTask = new ActivityTask (context1 , intent , activityFlags , applicationFlags , applicationFlagsMatch ,permissions , matchPermissions , uniqueIdentifier , activitiesListener );
101
101
activityTask .execute ();
102
102
}
103
103
104
104
public static void getAllNewApps (Context context , List <AppData > appDataList , Integer uniqueIdentifier ) {
105
105
WeakReference <Context > context1 = new WeakReference <>(context );
106
- newAppTask = new NewAppTask (context1 , appDataList , null , false , null , uniqueIdentifier , newAppListener );
106
+ newAppTask = new NewAppTask (context1 , appDataList , null , false , null , false , uniqueIdentifier , newAppListener );
107
107
newAppTask .execute ();
108
108
}
109
109
110
- public static void getSomeNewApps (Context context , List <AppData > appDataList , Integer applicationFlags , Boolean applicationFlagsMatch , String [] permissions , Integer uniqueIdentifier ) {
110
+ public static void getSomeNewApps (Context context , List <AppData > appDataList , Integer applicationFlags , Boolean applicationFlagsMatch , String [] permissions , Boolean matchPermissions , Integer uniqueIdentifier ) {
111
111
WeakReference <Context > context1 = new WeakReference <>(context );
112
- newAppTask = new NewAppTask (context1 , appDataList , applicationFlags , applicationFlagsMatch , permissions , uniqueIdentifier , newAppListener );
112
+ newAppTask = new NewAppTask (context1 , appDataList , applicationFlags , applicationFlagsMatch , permissions , matchPermissions , uniqueIdentifier , newAppListener );
113
113
newAppTask .execute ();
114
114
}
115
115
116
116
public static void getAllNewActivities (Context context , List <AppData > appDataList , Intent intent , Integer uniqueIdentifier ) {
117
117
WeakReference <Context > context1 = new WeakReference <>(context );
118
- newActivityTask = new NewActivityTask (context1 ,appDataList ,intent ,0 ,null ,false ,null ,uniqueIdentifier ,newActivitiesListener );
118
+ newActivityTask = new NewActivityTask (context1 ,appDataList ,intent ,0 ,null ,false ,null ,false , uniqueIdentifier ,newActivitiesListener );
119
119
newActivityTask .execute ();
120
120
}
121
121
122
- public static void getSomeNewActivities (Context context , List <AppData > appDataList , Intent intent , Integer activityFlags , Integer applicationFlags , Boolean applicationFlagsMatch , String [] permissions , Integer uniqueIdentifier ) {
122
+ public static void getSomeNewActivities (Context context , List <AppData > appDataList , Intent intent , Integer activityFlags , Integer applicationFlags , Boolean applicationFlagsMatch , String [] permissions , Boolean matchPermissions , Integer uniqueIdentifier ) {
123
123
WeakReference <Context > context1 = new WeakReference <>(context );
124
- newActivityTask = new NewActivityTask (context1 ,appDataList ,intent ,activityFlags ,applicationFlags ,applicationFlagsMatch ,permissions ,uniqueIdentifier ,newActivitiesListener );
124
+ newActivityTask = new NewActivityTask (context1 ,appDataList ,intent ,activityFlags ,applicationFlags ,applicationFlagsMatch ,permissions ,matchPermissions , uniqueIdentifier ,newActivitiesListener );
125
125
newActivityTask .execute ();
126
126
}
127
127
128
128
public static void getAllUninstalledApps (Context context , List <AppData > appDataList , Integer uniqueIdentifier ) {
129
129
WeakReference <Context > context1 = new WeakReference <>(context );
130
- uninstalledAppTask = new UninstalledAppTask (context1 , appDataList , null , false , null ,uniqueIdentifier , uninstalledAppListener );
130
+ uninstalledAppTask = new UninstalledAppTask (context1 , appDataList , null , false , null ,false , uniqueIdentifier , uninstalledAppListener );
131
131
uninstalledAppTask .execute ();
132
132
}
133
133
134
- public static void getSomeUninstalledApps (Context context , List <AppData > appDataList , Integer applicationFlags , Boolean applicationFlagsMatch , String [] permissions , Integer uniqueIdentifier ) {
134
+ public static void getSomeUninstalledApps (Context context , List <AppData > appDataList , Integer applicationFlags , Boolean applicationFlagsMatch , String [] permissions , Boolean matchPermissions , Integer uniqueIdentifier ) {
135
135
WeakReference <Context > context1 = new WeakReference <>(context );
136
- uninstalledAppTask = new UninstalledAppTask (context1 , appDataList , applicationFlags , applicationFlagsMatch , permissions , uniqueIdentifier , uninstalledAppListener );
136
+ uninstalledAppTask = new UninstalledAppTask (context1 , appDataList , applicationFlags , applicationFlagsMatch , permissions , matchPermissions , uniqueIdentifier , uninstalledAppListener );
137
137
uninstalledAppTask .execute ();
138
138
}
139
139
140
140
public static void getAllUninstalledActivities (Context context , List <AppData > appDataList , Intent intent , Integer uniqueIdentifier ) {
141
141
WeakReference <Context > context1 = new WeakReference <>(context );
142
- uninstalledActivityTask = new UninstalledActivityTask (context1 , appDataList , intent , 0 , null , false ,null , uniqueIdentifier , uninstalledActivitiesListener );
142
+ uninstalledActivityTask = new UninstalledActivityTask (context1 , appDataList , intent , 0 , null , false ,null , false , uniqueIdentifier , uninstalledActivitiesListener );
143
143
uninstalledActivityTask .execute ();
144
144
}
145
145
146
- public static void getSomeUninstalledActivities (Context context , List <AppData > appDataList , Intent intent , Integer activityFlags , Integer applicationFlags , Boolean applicationFlagsMatch , String [] permissions , Integer uniqueIdentifier ) {
146
+ public static void getSomeUninstalledActivities (Context context , List <AppData > appDataList , Intent intent , Integer activityFlags , Integer applicationFlags , Boolean applicationFlagsMatch , String [] permissions , Boolean matchPermissions , Integer uniqueIdentifier ) {
147
147
WeakReference <Context > context1 = new WeakReference <>(context );
148
- uninstalledActivityTask = new UninstalledActivityTask (context1 , appDataList , intent , activityFlags , applicationFlags , applicationFlagsMatch ,permissions , uniqueIdentifier , uninstalledActivitiesListener );
148
+ uninstalledActivityTask = new UninstalledActivityTask (context1 , appDataList , intent , activityFlags , applicationFlags , applicationFlagsMatch ,permissions ,matchPermissions , uniqueIdentifier , uninstalledActivitiesListener );
149
149
uninstalledActivityTask .execute ();
150
150
}
151
151
@@ -156,7 +156,7 @@ public static Boolean checkApplicationFlags(AppData appData, Integer application
156
156
return ((applicationFlags ==null ) || ((appData .getFlags () & applicationFlags ) == 0 ));
157
157
}
158
158
159
- public static Boolean checkApplicationPermissions (AppData appData , String [] permissions ) {
159
+ public static Boolean checkApplicationPermissions (AppData appData , String [] permissions , Boolean matchPermissions ) {
160
160
Boolean containsPermission = false ;
161
161
for (String permission : permissions ) {
162
162
for (String permissionReal : appData .getPermissions ()) {
@@ -168,7 +168,7 @@ public static Boolean checkApplicationPermissions(AppData appData, String[] perm
168
168
if (containsPermission )
169
169
break ;
170
170
}
171
- return containsPermission ;
171
+ return ! containsPermission ;
172
172
}
173
173
174
174
public static void sort (List <AppData > appDataList , Integer sortBy , Integer inOrder , Integer uniqueIdentifier ) {
0 commit comments