44
55import android .content .Context ;
66import android .content .pm .ApplicationInfo ;
7- import android .content .pm .PackageInfo ;
87import android .content .pm .PackageManager ;
98import android .os .Build ;
109import android .provider .Settings ;
1110import android .telephony .TelephonyManager ;
1211import android .util .Log ;
1312
1413import com .sift .api .representations .AndroidDevicePropertiesJson ;
15- import com .sift .api .representations .AndroidInstalledAppJson ;
1614import com .sift .api .representations .MobileEventJson ;
1715
1816import org .apache .commons .lang3 .ArrayUtils ;
@@ -139,8 +137,6 @@ private AndroidDevicePropertiesJson get() {
139137 List <String > evidenceProperties = existingDangerousProperties ();
140138 List <String > evidenceRWPaths = existingRWPaths ();
141139
142- List <AndroidInstalledAppJson > installedApps = getInstalledApps ();
143-
144140 return AndroidDevicePropertiesJson .newBuilder ()
145141 .withAppName (appName )
146142 .withAppVersion (appVersion )
@@ -161,7 +157,6 @@ private AndroidDevicePropertiesJson get() {
161157 .withEvidencePackagesPresent (evidencePackages )
162158 .withEvidenceProperties (evidenceProperties )
163159 .withEvidenceDirectoriesWritable (evidenceRWPaths )
164- .withInstalledApps (installedApps )
165160 .build ();
166161 }
167162
@@ -302,23 +297,4 @@ private String[] mountReader() {
302297 }
303298 return allPaths .split ("\n " );
304299 }
305-
306- private List <AndroidInstalledAppJson > getInstalledApps () {
307- final PackageManager pm = context .getPackageManager ();
308- List <AndroidInstalledAppJson > installedApps = new ArrayList <>();
309-
310- List <PackageInfo > packageList = pm .getInstalledPackages (0 );
311- for (PackageInfo packageInfo : packageList ) {
312- if ((packageInfo .applicationInfo .flags & ApplicationInfo .FLAG_SYSTEM ) == 0 ) {
313- String appName = packageInfo .applicationInfo .loadLabel (pm ).toString ();
314- String packageName = packageInfo .packageName ;
315- installedApps .add (AndroidInstalledAppJson .newBuilder ()
316- .withAppName (appName )
317- .withPackageName (packageName )
318- .build ());
319- }
320- }
321-
322- return installedApps ;
323- }
324300}
0 commit comments