// Path: app/src/main/java/it/unisannio/security/DoApp/model/Commons.java
// public class Commons {
// 
//     // public static int ABOUT = 3;
// 
//     // sono i tre stadi per il progressbar di applistactivity
//     public static final int MSG_PROCESSING = 0;
//     public static final int MSG_DONE = 1;
//     public static final int MSG_ERROR = 2;
// 
//     public static final int ACTIVITIES = 0;
//     public static final int RECEIVERS = 1;
//     public static final int SERVICES = 2;
// 
//     public static final String PKGINFO_KEY = "pkginfo";
//     public static final String APPTYPE_KEY = "apptype";
//     public static final String pkgName = "pkgname";
// 
//     public static final String path = Environment.getExternalStorageDirectory().getAbsolutePath()+"/DoAppReports/";
//     public static final String pathFile = "pathFile";
// 
// }
// 
// Path: app/src/main/java/it/unisannio/security/DoApp/model/MalIntent.java
// public class MalIntent extends Intent{
// 
//     private AndroidComponent targetComponent;
// 
//     public MalIntent(IntentDataInfo datafield){
//         super();
//         this.targetComponent = datafield.getComponent();
//         String packageName = datafield.getPackageName();
// 
//         // se il nome inizia per '.' è necessario creare il nome completo del componente
//         // altrimenti si va in ActivityNotFoundException durante lo startActivity()
//         String name = targetComponent.name;
//         if(name.startsWith("."))
//             name = packageName+name;
// 
//         this.setComponent(new ComponentName(packageName, name));
//     }
// 
//     //empty constructor
//     private MalIntent(){super();}
// 
//     public AndroidComponent getTargetComponent() {
//         return targetComponent;
//     }
// 
//     public void setTargetComponent(AndroidComponent targetComponent) {
//         this.targetComponent = targetComponent;
//     }
// 
//     public MalIntent clone(){
//         MalIntent cloned = new MalIntent();
//         cloned.setType(this.getType());
//         cloned.setComponent(this.getComponent());
//         if(this.getExtras()!=null)
//             cloned.putExtras(this.getExtras());
//         cloned.setTargetComponent(this.targetComponent);
//         cloned.setData(this.getData());
// 
//         return cloned;
//     }
// 
//     @Override
//     public boolean equals(Object object){
//         MalIntent mal1 = (MalIntent) object;
//         // filterEquals fa: Returns true if action, data, type, class, and categories are the same.
//         if(this.filterEquals(mal1)){
//             //dobbiamo fare il confronto per gli extra in qualche modo
//             Bundle b1 = mal1.getExtras();
//             Bundle b = this.getExtras();
//             if (b1 == null && b == null)
//                 return true;
//             else if (b1 == null ^ b == null) // xor: ^
//                 return false;
//             else {
//                 // dynamic binding (speriamo che va)
//                 return equalsObject(b.get(Intent.EXTRA_TEXT), b1.get(Intent.EXTRA_TEXT)) &&
//                         equalsObject(b.get(Intent.EXTRA_STREAM), b1.get(EXTRA_STREAM)) &&
//                         equalsObject(this.getData(), mal1.getData());
//             }
//         }
//         return false;
//     }
// 
//     private static boolean equalsObject(Object o, Object o1){
//         if ( o == null && o1 == null)
//             return true;
//         else if (o == null ^ o1 == null)
//             return false;
//         else return o.equals(o1);
//     }
// 
//     public String toString(){
//         return "MalIntent: \n\t Type: "+((getType()==null)? "null" : getType()) +
//                 "\t - Action:" + ((getAction() == null) ? "null" : getAction())+
//                 "\t - Extra Text: "+((getExtras()==null) || ((getExtras().get(Intent.EXTRA_TEXT) == null))? "null" : getExtras().get(Intent.EXTRA_TEXT)) +
//                 "\t - Extra Stream: "+((getExtras()==null) || ((getExtras().get(Intent.EXTRA_STREAM) == null))? "null" : getExtras().get(Intent.EXTRA_STREAM)) +
//                 "\t - Data: " + ((getData() == null ) ? "null" : getData().toString());
//     }
// 
// 
// 
// }


import android.content.Intent;
import android.content.res.ColorStateList;
import android.graphics.Color;
import android.os.Environment;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.widget.EditText;
import android.widget.TextView;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import it.unisannio.security.DoApp.R;
import it.unisannio.security.DoApp.model.Commons;
import it.unisannio.security.DoApp.model.MalIntent;
package it.unisannio.security.DoApp.activities;




public class ViewReportActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.edit_activity);

// Path: app/src/main/java/it/unisannio/security/DoApp/model/Commons.java
// public class Commons {
// 
//     // public static int ABOUT = 3;
// 
//     // sono i tre stadi per il progressbar di applistactivity
//     public static final int MSG_PROCESSING = 0;
//     public static final int MSG_DONE = 1;
//     public static final int MSG_ERROR = 2;
// 
//     public static final int ACTIVITIES = 0;
//     public static final int RECEIVERS = 1;
//     public static final int SERVICES = 2;
// 
//     public static final String PKGINFO_KEY = "pkginfo";
//     public static final String APPTYPE_KEY = "apptype";
//     public static final String pkgName = "pkgname";
// 
//     public static final String path = Environment.getExternalStorageDirectory().getAbsolutePath()+"/DoAppReports/";
//     public static final String pathFile = "pathFile";
// 
// }
// 
// Path: app/src/main/java/it/unisannio/security/DoApp/model/MalIntent.java
// public class MalIntent extends Intent{
// 
//     private AndroidComponent targetComponent;
// 
//     public MalIntent(IntentDataInfo datafield){
//         super();
//         this.targetComponent = datafield.getComponent();
//         String packageName = datafield.getPackageName();
// 
//         // se il nome inizia per '.' è necessario creare il nome completo del componente
//         // altrimenti si va in ActivityNotFoundException durante lo startActivity()
//         String name = targetComponent.name;
//         if(name.startsWith("."))
//             name = packageName+name;
// 
//         this.setComponent(new ComponentName(packageName, name));
//     }
// 
//     //empty constructor
//     private MalIntent(){super();}
// 
//     public AndroidComponent getTargetComponent() {
//         return targetComponent;
//     }
// 
//     public void setTargetComponent(AndroidComponent targetComponent) {
//         this.targetComponent = targetComponent;
//     }
// 
//     public MalIntent clone(){
//         MalIntent cloned = new MalIntent();
//         cloned.setType(this.getType());
//         cloned.setComponent(this.getComponent());
//         if(this.getExtras()!=null)
//             cloned.putExtras(this.getExtras());
//         cloned.setTargetComponent(this.targetComponent);
//         cloned.setData(this.getData());
// 
//         return cloned;
//     }
// 
//     @Override
//     public boolean equals(Object object){
//         MalIntent mal1 = (MalIntent) object;
//         // filterEquals fa: Returns true if action, data, type, class, and categories are the same.
//         if(this.filterEquals(mal1)){
//             //dobbiamo fare il confronto per gli extra in qualche modo
//             Bundle b1 = mal1.getExtras();
//             Bundle b = this.getExtras();
//             if (b1 == null && b == null)
//                 return true;
//             else if (b1 == null ^ b == null) // xor: ^
//                 return false;
//             else {
//                 // dynamic binding (speriamo che va)
//                 return equalsObject(b.get(Intent.EXTRA_TEXT), b1.get(Intent.EXTRA_TEXT)) &&
//                         equalsObject(b.get(Intent.EXTRA_STREAM), b1.get(EXTRA_STREAM)) &&
//                         equalsObject(this.getData(), mal1.getData());
//             }
//         }
//         return false;
//     }
// 
//     private static boolean equalsObject(Object o, Object o1){
//         if ( o == null && o1 == null)
//             return true;
//         else if (o == null ^ o1 == null)
//             return false;
//         else return o.equals(o1);
//     }
// 
//     public String toString(){
//         return "MalIntent: \n\t Type: "+((getType()==null)? "null" : getType()) +
//                 "\t - Action:" + ((getAction() == null) ? "null" : getAction())+
//                 "\t - Extra Text: "+((getExtras()==null) || ((getExtras().get(Intent.EXTRA_TEXT) == null))? "null" : getExtras().get(Intent.EXTRA_TEXT)) +
//                 "\t - Extra Stream: "+((getExtras()==null) || ((getExtras().get(Intent.EXTRA_STREAM) == null))? "null" : getExtras().get(Intent.EXTRA_STREAM)) +
//                 "\t - Data: " + ((getData() == null ) ? "null" : getData().toString());
//     }
// 
// 
// 
// }


// Path: app/src/main/java/it/unisannio/security/DoApp/activities/ViewReportActivity.java
import android.content.Intent;
import android.content.res.ColorStateList;
import android.graphics.Color;
import android.os.Environment;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.widget.EditText;
import android.widget.TextView;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import it.unisannio.security.DoApp.R;
import it.unisannio.security.DoApp.model.Commons;
import it.unisannio.security.DoApp.model.MalIntent;

package it.unisannio.security.DoApp.activities;




public class ViewReportActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.edit_activity);

        String pathFile = getIntent().getStringExtra(Commons.pathFile);