Check for tracker
This commit is contained in:
parent
55303f158e
commit
8e4db1d284
|
@ -1,13 +1,19 @@
|
||||||
package org.eu.exodus_privacy.exodusprivacy;
|
package org.eu.exodus_privacy.exodusprivacy;
|
||||||
|
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
|
import android.net.Uri;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
|
|
||||||
import androidx.appcompat.app.AppCompatActivity;
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
|
import androidx.fragment.app.FragmentManager;
|
||||||
|
import androidx.fragment.app.FragmentTransaction;
|
||||||
|
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||||
|
|
||||||
import org.eu.exodus_privacy.exodusprivacy.adapters.ApplicationViewModel;
|
import org.eu.exodus_privacy.exodusprivacy.adapters.ApplicationViewModel;
|
||||||
|
import org.eu.exodus_privacy.exodusprivacy.adapters.TrackerListAdapter;
|
||||||
import org.eu.exodus_privacy.exodusprivacy.databinding.AppCheckActivityBinding;
|
import org.eu.exodus_privacy.exodusprivacy.databinding.AppCheckActivityBinding;
|
||||||
|
import org.eu.exodus_privacy.exodusprivacy.fragments.TrackerFragment;
|
||||||
import org.eu.exodus_privacy.exodusprivacy.fragments.Updatable;
|
import org.eu.exodus_privacy.exodusprivacy.fragments.Updatable;
|
||||||
import org.eu.exodus_privacy.exodusprivacy.listener.NetworkListener;
|
import org.eu.exodus_privacy.exodusprivacy.listener.NetworkListener;
|
||||||
import org.eu.exodus_privacy.exodusprivacy.manager.DatabaseManager;
|
import org.eu.exodus_privacy.exodusprivacy.manager.DatabaseManager;
|
||||||
|
@ -20,13 +26,24 @@ import java.util.ArrayList;
|
||||||
import java.util.regex.Matcher;
|
import java.util.regex.Matcher;
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
public class CheckAppActivity extends AppCompatActivity implements NetworkListener {
|
public class CheckAppActivity extends AppCompatActivity implements NetworkListener, TrackerListAdapter.OnTrackerClickListener {
|
||||||
|
|
||||||
private static final Pattern fdroidRegex = Pattern.compile("https?://f-droid\\.org/[\\w-]+/packages/([\\w.-]+)");
|
private static final Pattern fdroidRegex = Pattern.compile("https?://f-droid\\.org/[\\w-]+/packages/([\\w.-]+)");
|
||||||
private static final Pattern googleRegex = Pattern.compile("https?://play\\.google\\.com/store/apps/details\\?id=([\\w.-]+)");
|
private static final Pattern googleRegex = Pattern.compile("https?://play\\.google\\.com/store/apps/details\\?id=([\\w.-]+)");
|
||||||
|
|
||||||
ArrayList<Updatable> fragments;
|
ArrayList<Updatable> fragments;
|
||||||
AppCheckActivityBinding binding;
|
AppCheckActivityBinding binding;
|
||||||
|
TrackerListAdapter.OnTrackerClickListener onTrackerClickListener = id -> {
|
||||||
|
TrackerFragment tracker = TrackerFragment.newInstance(id);
|
||||||
|
fragments.add(tracker);
|
||||||
|
FragmentManager manager = getSupportFragmentManager();
|
||||||
|
FragmentTransaction transaction = manager.beginTransaction();
|
||||||
|
transaction.setCustomAnimations(R.anim.slide_in_right, R.anim.slide_out_right, R.anim.slide_in_left, R.anim.slide_out_left)
|
||||||
|
.replace(R.id.fragment_container, tracker)
|
||||||
|
.addToBackStack(null)
|
||||||
|
.commit();
|
||||||
|
};
|
||||||
|
private TrackerListAdapter.OnTrackerClickListener trackerClickListener;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
|
@ -48,13 +65,15 @@ public class CheckAppActivity extends AppCompatActivity implements NetworkListen
|
||||||
app_id = matcher.group(1);
|
app_id = matcher.group(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
setOnTrackerClickListener(trackerClickListener);
|
||||||
fragments = new ArrayList<>();
|
fragments = new ArrayList<>();
|
||||||
NetworkManager.getInstance().getSingleReport(CheckAppActivity.this, this, app_id);
|
NetworkManager.getInstance().getSingleReport(CheckAppActivity.this, this, app_id);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void setOnTrackerClickListener(TrackerListAdapter.OnTrackerClickListener listener) {
|
||||||
|
trackerClickListener = listener;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -78,14 +97,24 @@ public class CheckAppActivity extends AppCompatActivity implements NetworkListen
|
||||||
}
|
}
|
||||||
applicationViewModel.report = reportToKeep;
|
applicationViewModel.report = reportToKeep;
|
||||||
applicationViewModel.source = reportToKeep.source;
|
applicationViewModel.source = reportToKeep.source;
|
||||||
|
applicationViewModel.versionCode = (int) reportToKeep.versionCode;
|
||||||
|
applicationViewModel.versionName = reportToKeep.version;
|
||||||
applicationViewModel.trackers = DatabaseManager.getInstance(CheckAppActivity.this).getTrackers(reportToKeep.trackers);
|
applicationViewModel.trackers = DatabaseManager.getInstance(CheckAppActivity.this).getTrackers(reportToKeep.trackers);
|
||||||
|
|
||||||
ReportDisplay reportDisplay = ReportDisplay.buildReportDisplay(CheckAppActivity.this, applicationViewModel, null, null);
|
ReportDisplay reportDisplay = ReportDisplay.buildReportDisplay(CheckAppActivity.this, applicationViewModel, null, null);
|
||||||
ReportViewModel viewModel = new ReportViewModel();
|
ReportViewModel viewModel = new ReportViewModel();
|
||||||
|
|
||||||
viewModel.setReportDisplay(reportDisplay);
|
viewModel.setReportDisplay(reportDisplay);
|
||||||
|
TrackerListAdapter trackerAdapter = new TrackerListAdapter(reportDisplay.trackers, R.layout.tracker_item, onTrackerClickListener);
|
||||||
|
|
||||||
binding = AppCheckActivityBinding.inflate(getLayoutInflater());
|
binding = AppCheckActivityBinding.inflate(getLayoutInflater());
|
||||||
|
binding.reportUrl.setOnClickListener(v -> {
|
||||||
|
Intent intent = new Intent(Intent.ACTION_VIEW);
|
||||||
|
intent.setData(Uri.parse("https://" + Utils.getDomain() + "/reports/" + reportDisplay.report.id + "/"));
|
||||||
|
startActivity(intent);
|
||||||
|
});
|
||||||
binding.setReportInfo(viewModel);
|
binding.setReportInfo(viewModel);
|
||||||
|
binding.trackers.setAdapter(trackerAdapter);
|
||||||
|
binding.trackers.setLayoutManager(new LinearLayoutManager(CheckAppActivity.this));
|
||||||
View viewRoot = binding.getRoot();
|
View viewRoot = binding.getRoot();
|
||||||
setContentView(viewRoot);
|
setContentView(viewRoot);
|
||||||
});
|
});
|
||||||
|
@ -98,4 +127,9 @@ public class CheckAppActivity extends AppCompatActivity implements NetworkListen
|
||||||
@Override
|
@Override
|
||||||
public void onProgress(int resourceId, int progress, int maxProgress) {
|
public void onProgress(int resourceId, int progress, int maxProgress) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onTrackerClick(long trackerId) {
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,6 +29,10 @@ public class Utils {
|
||||||
public static final String APP_PREFS = "app_prefs";
|
public static final String APP_PREFS = "app_prefs";
|
||||||
public static final String LAST_REFRESH = "last_refresh";
|
public static final String LAST_REFRESH = "last_refresh";
|
||||||
|
|
||||||
|
public static String getDomain() {
|
||||||
|
return BuildConfig.FLAVOR.compareTo("exodus") == 0 ? "reports.exodus-privacy.eu.org" : "exodus.phm.education.gouv.fr";
|
||||||
|
}
|
||||||
|
|
||||||
@SuppressLint("PackageManagerGetSignatures")
|
@SuppressLint("PackageManagerGetSignatures")
|
||||||
public static String getCertificateSHA1Fingerprint(PackageManager pm, String packageName) {
|
public static String getCertificateSHA1Fingerprint(PackageManager pm, String packageName) {
|
||||||
int flags = PackageManager.GET_SIGNATURES;
|
int flags = PackageManager.GET_SIGNATURES;
|
||||||
|
|
|
@ -38,6 +38,7 @@ import androidx.recyclerview.widget.LinearLayoutManager;
|
||||||
|
|
||||||
import org.eu.exodus_privacy.exodusprivacy.R;
|
import org.eu.exodus_privacy.exodusprivacy.R;
|
||||||
import org.eu.exodus_privacy.exodusprivacy.ReportViewModel;
|
import org.eu.exodus_privacy.exodusprivacy.ReportViewModel;
|
||||||
|
import org.eu.exodus_privacy.exodusprivacy.Utils;
|
||||||
import org.eu.exodus_privacy.exodusprivacy.adapters.ApplicationViewModel;
|
import org.eu.exodus_privacy.exodusprivacy.adapters.ApplicationViewModel;
|
||||||
import org.eu.exodus_privacy.exodusprivacy.adapters.PermissionListAdapter;
|
import org.eu.exodus_privacy.exodusprivacy.adapters.PermissionListAdapter;
|
||||||
import org.eu.exodus_privacy.exodusprivacy.adapters.TrackerListAdapter;
|
import org.eu.exodus_privacy.exodusprivacy.adapters.TrackerListAdapter;
|
||||||
|
@ -143,7 +144,7 @@ public class ReportFragment extends Fragment implements Updatable {
|
||||||
if (reportDisplay.report != null) {
|
if (reportDisplay.report != null) {
|
||||||
reportBinding.reportUrl.setOnClickListener(v -> {
|
reportBinding.reportUrl.setOnClickListener(v -> {
|
||||||
Intent intent = new Intent(Intent.ACTION_VIEW);
|
Intent intent = new Intent(Intent.ACTION_VIEW);
|
||||||
intent.setData(Uri.parse("https://reports.exodus-privacy.eu.org/reports/" + reportDisplay.report.id + "/"));
|
intent.setData(Uri.parse("https://" + Utils.getDomain() + "/reports/" + reportDisplay.report.id + "/"));
|
||||||
startActivity(intent);
|
startActivity(intent);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,7 +24,6 @@ import android.net.ConnectivityManager;
|
||||||
import android.net.NetworkInfo;
|
import android.net.NetworkInfo;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
|
||||||
import org.eu.exodus_privacy.exodusprivacy.BuildConfig;
|
|
||||||
import org.eu.exodus_privacy.exodusprivacy.R;
|
import org.eu.exodus_privacy.exodusprivacy.R;
|
||||||
import org.eu.exodus_privacy.exodusprivacy.Utils;
|
import org.eu.exodus_privacy.exodusprivacy.Utils;
|
||||||
import org.eu.exodus_privacy.exodusprivacy.listener.NetworkListener;
|
import org.eu.exodus_privacy.exodusprivacy.listener.NetworkListener;
|
||||||
|
@ -112,7 +111,7 @@ public class NetworkManager {
|
||||||
}
|
}
|
||||||
|
|
||||||
private static class NetworkProcessingThread extends Thread {
|
private static class NetworkProcessingThread extends Thread {
|
||||||
private final String domain = BuildConfig.FLAVOR.compareTo("exodus") == 0 ? "reports.exodus-privacy.eu.org" : "exodus.phm.education.gouv.fr";
|
private final String domain = Utils.getDomain();
|
||||||
private final String apiUrl = "https://" + domain + "/api/";
|
private final String apiUrl = "https://" + domain + "/api/";
|
||||||
private final List<Message> messageQueue;
|
private final List<Message> messageQueue;
|
||||||
private final Semaphore sem;
|
private final Semaphore sem;
|
||||||
|
@ -146,7 +145,8 @@ public class NetworkManager {
|
||||||
editor.apply();
|
editor.apply();
|
||||||
break;
|
break;
|
||||||
case GET_SINGLE_REPORT:
|
case GET_SINGLE_REPORT:
|
||||||
Application application = getApplicationsNoActions(mes);
|
String packageName = mes.args.getString("package");
|
||||||
|
Application application = getSingleReport(mes, packageName);
|
||||||
mes.listener.onSuccess(application);
|
mes.listener.onSuccess(application);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -246,25 +246,6 @@ public class NetworkManager {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private Application getApplicationsNoActions(Message mes) {
|
|
||||||
URL url;
|
|
||||||
try {
|
|
||||||
url = new URL(apiUrl + "applications?option=short");
|
|
||||||
} catch (Exception e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
JSONObject object = makeDataRequest(mes.context, mes.listener, url);
|
|
||||||
|
|
||||||
if (object != null) {
|
|
||||||
String packageName = mes.args.getString("package");
|
|
||||||
if (packageName == null)
|
|
||||||
return null;
|
|
||||||
return getSingleReport(mes, packageName);
|
|
||||||
}
|
|
||||||
mes.listener.onSuccess(null);
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void getApplications(Message mes) {
|
private void getApplications(Message mes) {
|
||||||
mes.listener.onProgress(R.string.get_reports_connection, 0, 0);
|
mes.listener.onProgress(R.string.get_reports_connection, 0, 0);
|
||||||
|
|
|
@ -16,22 +16,9 @@
|
||||||
<androidx.core.widget.NestedScrollView
|
<androidx.core.widget.NestedScrollView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/logo"
|
|
||||||
android:layout_width="100dp"
|
|
||||||
android:layout_height="100dp"
|
|
||||||
android:layout_marginTop="20dp"
|
|
||||||
android:padding="10dp"
|
|
||||||
android:src="@{reportInfo.logo}"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/name"
|
android:id="@+id/name"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
@ -44,7 +31,7 @@
|
||||||
android:textSize="30sp"
|
android:textSize="30sp"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/logo" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
<View
|
<View
|
||||||
android:id="@+id/dummy"
|
android:id="@+id/dummy"
|
||||||
|
@ -84,37 +71,7 @@
|
||||||
app:layout_constraintStart_toEndOf="@id/trackers_nb"
|
app:layout_constraintStart_toEndOf="@id/trackers_nb"
|
||||||
app:layout_constraintTop_toTopOf="@id/trackers_nb" />
|
app:layout_constraintTop_toTopOf="@id/trackers_nb" />
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/permissions_nb"
|
|
||||||
android:layout_width="40dp"
|
|
||||||
android:layout_height="0dp"
|
|
||||||
android:layout_marginStart="20dp"
|
|
||||||
android:layout_marginTop="15dp"
|
|
||||||
android:background="@{ContextCompat.getDrawable(context,reportInfo.permissionColor)}"
|
|
||||||
android:text="@{reportInfo.permissionNumberStr}"
|
|
||||||
android:textAlignment="center"
|
|
||||||
android:textColor="@color/textColorWhite"
|
|
||||||
android:textSize="22sp"
|
|
||||||
android:textStyle="bold"
|
|
||||||
android:visibility="@{reportInfo.permissionVisibility ? View.VISIBLE : View.GONE}"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/trackers_nb" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/permissions_title"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="10dp"
|
|
||||||
android:layout_marginTop="15dp"
|
|
||||||
android:layout_marginEnd="20dp"
|
|
||||||
android:text="@string/permissions"
|
|
||||||
android:textColor="@color/textColorDark"
|
|
||||||
android:textSize="22sp"
|
|
||||||
android:textStyle="bold"
|
|
||||||
android:visibility="@{reportInfo.permissionVisibility ? View.VISIBLE : View.GONE}"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toEndOf="@id/permissions_nb"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/trackers_nb" />
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/installed_version"
|
android:id="@+id/installed_version"
|
||||||
|
@ -123,98 +80,26 @@
|
||||||
android:layout_marginStart="20dp"
|
android:layout_marginStart="20dp"
|
||||||
android:layout_marginTop="30dp"
|
android:layout_marginTop="30dp"
|
||||||
android:layout_marginEnd="20dp"
|
android:layout_marginEnd="20dp"
|
||||||
android:text="@string/installed"
|
android:text="@string/report_version"
|
||||||
android:textColor="@color/textColorDark"
|
android:textColor="@color/textColorDark"
|
||||||
android:textSize="16sp"
|
android:textSize="16sp"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/permissions_nb" />
|
app:layout_constraintTop_toBottomOf="@id/trackers_title" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/installed_version_value"
|
android:id="@+id/installed_version_value"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="5dp"
|
android:layout_marginStart="5dp"
|
||||||
android:layout_marginTop="30dp"
|
|
||||||
android:layout_marginEnd="20dp"
|
|
||||||
android:text="@{reportInfo.installedVersion}"
|
android:text="@{reportInfo.installedVersion}"
|
||||||
android:textColor="@color/textColorDark"
|
android:textColor="@color/textColorDark"
|
||||||
android:textSize="16sp"
|
android:textSize="16sp"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toEndOf="@id/installed_version"
|
app:layout_constraintStart_toEndOf="@id/installed_version"
|
||||||
app:layout_constraintTop_toBottomOf="@id/permissions_nb" />
|
app:layout_constraintTop_toTopOf="@+id/installed_version" />
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/report_version"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="20dp"
|
|
||||||
android:layout_marginTop="5dp"
|
|
||||||
android:layout_marginEnd="20dp"
|
|
||||||
android:text="@string/report_version"
|
|
||||||
android:textColor="@color/textColorDark"
|
|
||||||
android:textSize="16sp"
|
|
||||||
android:visibility="@{reportInfo.reportVersionVisibility ? View.VISIBLE : View.GONE}"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/installed_version_value" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/report_version_value"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="5dp"
|
|
||||||
android:layout_marginTop="5dp"
|
|
||||||
android:layout_marginEnd="20dp"
|
|
||||||
android:text="@{reportInfo.reportVersion}"
|
|
||||||
android:textColor="@color/textColorDark"
|
|
||||||
android:textSize="16sp"
|
|
||||||
android:textStyle="bold"
|
|
||||||
android:visibility="@{reportInfo.reportVersionVisibility ? View.VISIBLE : View.GONE}"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toEndOf="@id/report_version"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/installed_version_value" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/source"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="20dp"
|
|
||||||
android:layout_marginTop="5dp"
|
|
||||||
android:layout_marginEnd="20dp"
|
|
||||||
android:text="@{reportInfo.source}"
|
|
||||||
android:textColor="@color/textColorDark"
|
|
||||||
android:textSize="16sp"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/report_version_value" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/creator"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="20dp"
|
|
||||||
android:layout_marginTop="5dp"
|
|
||||||
android:layout_marginEnd="20dp"
|
|
||||||
android:text="@string/created_by"
|
|
||||||
android:textColor="@color/textColorDark"
|
|
||||||
android:textSize="16sp"
|
|
||||||
android:visibility="@{reportInfo.creatorVisibility ? View.VISIBLE : View.GONE}"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/source" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/creator_value"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="5dp"
|
|
||||||
android:layout_marginTop="5dp"
|
|
||||||
android:layout_marginEnd="20dp"
|
|
||||||
android:textColor="@color/textColorDark"
|
|
||||||
android:textSize="16sp"
|
|
||||||
android:visibility="@{reportInfo.creatorVisibility ? View.VISIBLE : View.GONE}"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toEndOf="@id/creator"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/source" />
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/report_date"
|
android:id="@+id/report_date"
|
||||||
|
@ -228,7 +113,7 @@
|
||||||
android:visibility="@{reportInfo.reportVisibility ? View.VISIBLE : View.GONE}"
|
android:visibility="@{reportInfo.reportVisibility ? View.VISIBLE : View.GONE}"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/creator_value" />
|
app:layout_constraintTop_toBottomOf="@id/installed_version_value" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/report_url"
|
android:id="@+id/report_url"
|
||||||
|
@ -246,179 +131,31 @@
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/report_date" />
|
app:layout_constraintTop_toBottomOf="@id/report_date" />
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/view_store"
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="20dp"
|
|
||||||
android:layout_marginTop="5dp"
|
|
||||||
android:layout_marginEnd="20dp"
|
|
||||||
android:autoLink="web"
|
|
||||||
android:text="@{reportInfo.viewOnStore}"
|
|
||||||
android:textAlignment="textEnd"
|
|
||||||
android:textColor="@color/colorPurple"
|
|
||||||
android:textSize="16sp"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/report_url" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/trackers_nb_list"
|
|
||||||
android:layout_width="40dp"
|
|
||||||
android:layout_height="0dp"
|
|
||||||
android:layout_marginStart="20dp"
|
|
||||||
android:layout_marginTop="30dp"
|
|
||||||
android:background="@{ContextCompat.getDrawable(context,reportInfo.trackerColor)}"
|
|
||||||
android:text="@{reportInfo.trackerNumberStr}"
|
|
||||||
android:textAlignment="center"
|
|
||||||
android:textColor="@color/textColorWhite"
|
|
||||||
android:textSize="22sp"
|
|
||||||
android:textStyle="bold"
|
|
||||||
android:visibility="@{reportInfo.trackerVisibility ? View.VISIBLE : View.GONE}"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/analysed" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/trackers_title_list"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="10dp"
|
|
||||||
android:layout_marginTop="30dp"
|
|
||||||
android:layout_marginEnd="20dp"
|
|
||||||
android:text="@string/trackers"
|
|
||||||
android:textColor="@color/textColorDark"
|
|
||||||
android:textSize="22sp"
|
|
||||||
android:textStyle="bold"
|
|
||||||
android:visibility="@{reportInfo.trackerVisibility ? View.VISIBLE : View.GONE}"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toEndOf="@id/trackers_nb_list"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/analysed" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/code_signature"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="20dp"
|
|
||||||
android:layout_marginTop="5dp"
|
|
||||||
android:layout_marginEnd="20dp"
|
|
||||||
android:layout_marginBottom="5dp"
|
|
||||||
android:visibility="@{reportInfo.trackerVisibility ? View.VISIBLE : View.GONE}"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/trackers_nb_list" />
|
app:layout_constraintTop_toBottomOf="@id/report_url">
|
||||||
|
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
android:id="@+id/trackers"
|
android:id="@+id/trackers"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="match_parent"
|
||||||
android:layout_marginStart="20dp"
|
android:layout_marginStart="20dp"
|
||||||
android:layout_marginTop="5dp"
|
android:layout_marginTop="5dp"
|
||||||
android:layout_marginEnd="20dp"
|
android:layout_marginEnd="20dp"
|
||||||
android:layout_marginBottom="5dp"
|
android:layout_marginBottom="5dp"
|
||||||
android:visibility="@{reportInfo.trackerVisibility ? View.VISIBLE : View.GONE}"
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/code_signature" />
|
|
||||||
|
|
||||||
<TextView
|
<RelativeLayout
|
||||||
android:id="@+id/tracker_explanation"
|
android:id="@+id/fragment_container"
|
||||||
android:layout_width="0dp"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="match_parent"
|
||||||
android:layout_marginStart="20dp"
|
android:background="@android:color/white"
|
||||||
android:layout_marginTop="5dp"
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
android:layout_marginEnd="20dp"
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
android:layout_marginBottom="5dp"
|
|
||||||
android:text="@string/tracker_infos"
|
|
||||||
android:visibility="@{reportInfo.trackerVisibility ? View.VISIBLE : View.GONE}"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/trackers" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/permissions_nb_list"
|
|
||||||
android:layout_width="40dp"
|
|
||||||
android:layout_height="0dp"
|
|
||||||
android:layout_marginStart="20dp"
|
|
||||||
android:layout_marginTop="30dp"
|
|
||||||
android:background="@{ContextCompat.getDrawable(context,reportInfo.permissionColor)}"
|
|
||||||
android:text="@{reportInfo.permissionNumberStr}"
|
|
||||||
android:textAlignment="center"
|
|
||||||
android:textColor="@color/textColorWhite"
|
|
||||||
android:textSize="22sp"
|
|
||||||
android:textStyle="bold"
|
|
||||||
android:visibility="@{reportInfo.permissionVisibility ? View.VISIBLE : View.GONE}"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/tracker_explanation" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/permissions_title_list"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="10dp"
|
|
||||||
android:layout_marginTop="30dp"
|
|
||||||
android:layout_marginEnd="20dp"
|
|
||||||
android:text="@string/permissions"
|
|
||||||
android:textColor="@color/textColorDark"
|
|
||||||
android:textSize="22sp"
|
|
||||||
android:textStyle="bold"
|
|
||||||
android:visibility="@{reportInfo.permissionVisibility ? View.VISIBLE : View.GONE}"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toEndOf="@id/permissions_nb_list"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/tracker_explanation" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/code_permission"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="20dp"
|
|
||||||
android:layout_marginTop="5dp"
|
|
||||||
android:layout_marginEnd="20dp"
|
|
||||||
android:layout_marginBottom="5dp"
|
|
||||||
android:visibility="@{reportInfo.permissionVisibility ? View.VISIBLE : View.GONE}"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/permissions_nb_list" />
|
|
||||||
|
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
|
||||||
android:id="@+id/permissions"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="20dp"
|
|
||||||
android:layout_marginTop="5dp"
|
|
||||||
android:layout_marginEnd="20dp"
|
|
||||||
android:layout_marginBottom="5dp"
|
|
||||||
android:visibility="@{reportInfo.permissionVisibility ? View.VISIBLE : View.GONE}"
|
|
||||||
app:layout_constraintBottom_toTopOf="@id/permission_explanation_dangerous"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/code_permission" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/permission_explanation_dangerous"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="20dp"
|
|
||||||
android:layout_marginTop="5dp"
|
|
||||||
android:layout_marginEnd="20dp"
|
|
||||||
android:layout_marginBottom="10dp"
|
|
||||||
android:text="@string/permission_infos_dangerous"
|
|
||||||
android:visibility="@{reportInfo.hasPermissionDangerous ? View.VISIBLE : View.GONE}"
|
|
||||||
app:layout_constraintBottom_toTopOf="@id/permission_explanation"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/permission_explanation"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="20dp"
|
|
||||||
android:layout_marginTop="5dp"
|
|
||||||
android:layout_marginEnd="20dp"
|
|
||||||
android:layout_marginBottom="10dp"
|
|
||||||
android:text="@string/permission_infos"
|
|
||||||
android:visibility="@{reportInfo.permissionVisibility ? View.VISIBLE : View.GONE}"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent" />
|
|
||||||
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
@ -434,7 +171,7 @@
|
||||||
android:visibility="@{reportInfo.trackerVisibility ? View.GONE : View.VISIBLE}"
|
android:visibility="@{reportInfo.trackerVisibility ? View.GONE : View.VISIBLE}"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/view_store" />
|
app:layout_constraintTop_toBottomOf="@id/report_url" />
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
</androidx.core.widget.NestedScrollView>
|
</androidx.core.widget.NestedScrollView>
|
||||||
|
|
Loading…
Reference in New Issue