Skip to content

Commit

Permalink
Update Listapp.java
Browse files Browse the repository at this point in the history
  • Loading branch information
Alwi Shihab authored Jul 14, 2018
1 parent 6edf773 commit 373b76e
Showing 1 changed file with 5 additions and 15 deletions.
20 changes: 5 additions & 15 deletions main/java/com/wishihab/widefend/Listapp.java
Original file line number Diff line number Diff line change
Expand Up @@ -42,18 +42,7 @@ protected void onCreate(Bundle savedInstanceState) {
final List<AppList> installedApps = getInstalledApps();
final AppAdapter installedAppAdapter = new AppAdapter(Listapp.this, installedApps);
userInstalledApps.setAdapter(installedAppAdapter);
/*userInstalledApps.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> arg0, View arg1, int position, long arg3) {
Intent intent = new Intent();
intent.setAction(Settings.ACTION_APPLICATION_DETAILS_SETTINGS);
Uri uri = Uri.fromParts("package", getPackageName(), null);
intent.setData(uri);
startActivity(intent);
}
});
*/


DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
ActionBarDrawerToggle toggle = new ActionBarDrawerToggle(
Expand All @@ -79,7 +68,10 @@ private List<AppList> getInstalledApps() {
if ((!isSystemPackage(p))) {
String appName = p.applicationInfo.loadLabel(getPackageManager()).toString();
Drawable icon = p.applicationInfo.loadIcon(getPackageManager());

// Example for catch appName Trojan
if (appName.equals("AhMyth") || appName.equals("DroidJack")){
Toast.makeText(Listapp.this, "We found AhMyth Trojan!!", Toast.LENGTH_SHORT).show();
}
res.add(new AppList(appName, icon));
}
}
Expand All @@ -92,8 +84,6 @@ private boolean isSystemPackage(PackageInfo pkgInfo) {
}




@Override
public void onBackPressed() {
DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
Expand Down

0 comments on commit 373b76e

Please sign in to comment.