From 373b76e8b87ff4643dc8bcc0ac113df41f5f1eaa Mon Sep 17 00:00:00 2001 From: Alwi Shihab Date: Sun, 15 Jul 2018 00:03:57 +0800 Subject: [PATCH] Update Listapp.java --- main/java/com/wishihab/widefend/Listapp.java | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/main/java/com/wishihab/widefend/Listapp.java b/main/java/com/wishihab/widefend/Listapp.java index 90e4800..45d84f3 100644 --- a/main/java/com/wishihab/widefend/Listapp.java +++ b/main/java/com/wishihab/widefend/Listapp.java @@ -42,18 +42,7 @@ protected void onCreate(Bundle savedInstanceState) { final List 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( @@ -79,7 +68,10 @@ private List 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)); } } @@ -92,8 +84,6 @@ private boolean isSystemPackage(PackageInfo pkgInfo) { } - - @Override public void onBackPressed() { DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);