Allow to analyze app from reports
This commit is contained in:
parent
90848c678a
commit
64a2e223b3
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="colorPrimary">#005e8b</color>
|
||||
<color name="colorPrimaryDark">#3d2b43</color>
|
||||
<color name="colorPrimaryDark">#005e8b</color>
|
||||
<color name="colorAccent">#007bff</color>
|
||||
<color name="percent">#77005e8b</color>
|
||||
<color name="colorGreen">#6fc384</color>
|
||||
|
|
|
@ -36,6 +36,7 @@ import androidx.databinding.DataBindingUtil;
|
|||
import androidx.fragment.app.Fragment;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
|
||||
import org.eu.exodus_privacy.exodusprivacy.BuildConfig;
|
||||
import org.eu.exodus_privacy.exodusprivacy.R;
|
||||
import org.eu.exodus_privacy.exodusprivacy.ReportViewModel;
|
||||
import org.eu.exodus_privacy.exodusprivacy.Utils;
|
||||
|
@ -141,6 +142,17 @@ public class ReportFragment extends Fragment implements Updatable {
|
|||
startActivity(intent);
|
||||
});
|
||||
|
||||
reportBinding.analyseApp.setOnClickListener(v -> {
|
||||
Uri uri;
|
||||
if (!BuildConfig.amal) {
|
||||
uri = Uri.parse("https://reports.exodus-privacy.eu.org/analysis/submit/#" + reportDisplay.packageName);
|
||||
} else {
|
||||
uri = Uri.parse("https://exodus.phm.education.gouv.fr/analysis/submit/#" + reportDisplay.packageName);
|
||||
}
|
||||
Intent browserIntent = new Intent(Intent.ACTION_VIEW, uri);
|
||||
startActivity(browserIntent);
|
||||
});
|
||||
|
||||
if (reportDisplay.report != null) {
|
||||
reportBinding.reportUrl.setOnClickListener(v -> {
|
||||
Intent intent = new Intent(Intent.ACTION_VIEW);
|
||||
|
|
|
@ -34,10 +34,9 @@
|
|||
<shape>
|
||||
<corners android:radius="5dip" />
|
||||
<gradient
|
||||
android:startColor="#FF684971"
|
||||
android:endColor="#FF3d2b43"
|
||||
android:angle="270"
|
||||
/>
|
||||
android:endColor="@color/colorAccent"
|
||||
android:startColor="@color/colorAccent"
|
||||
android:angle="270" />
|
||||
</shape>
|
||||
</clip>
|
||||
</item>
|
||||
|
|
|
@ -172,7 +172,6 @@
|
|||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/report_url" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
</layout>
|
|
@ -263,7 +263,7 @@
|
|||
android:text="@{reportInfo.trackerNumberStr}"
|
||||
android:layout_marginStart="20dp"
|
||||
android:layout_marginTop="30dp"
|
||||
app:layout_constraintTop_toBottomOf="@id/analysed"
|
||||
app:layout_constraintTop_toBottomOf="@id/analyse_app"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
android:background="@{ContextCompat.getDrawable(context,reportInfo.trackerColor)}"
|
||||
android:visibility="@{reportInfo.trackerVisibility ? View.VISIBLE : View.GONE}"
|
||||
|
@ -282,7 +282,7 @@
|
|||
android:layout_marginStart="10dp"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:layout_marginTop="30dp"
|
||||
app:layout_constraintTop_toBottomOf="@id/analysed"
|
||||
app:layout_constraintTop_toBottomOf="@id/analyse_app"
|
||||
app:layout_constraintStart_toEndOf="@id/trackers_nb_list"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:textStyle="bold"
|
||||
|
@ -437,9 +437,21 @@
|
|||
android:layout_marginEnd="20dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:textAlignment="center"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||
/>
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Small" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/analyse_app"
|
||||
style="@style/Widget.AppCompat.Button.Borderless.Colored"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="20dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:text="@string/analyse_app"
|
||||
android:visibility="@{reportInfo.trackerVisibility ? View.GONE : View.VISIBLE}"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/analysed" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
</layout>
|
|
@ -67,6 +67,7 @@
|
|||
<string name="list_of_apps">See the list of apps</string>
|
||||
<string name="apps">%1$s apps</string>
|
||||
<string name="nothing_here">Nothing to display currently. You can pull to refresh!</string>
|
||||
<string name="analyse_app">Analyze this app</string>
|
||||
|
||||
|
||||
</resources>
|
||||
|
|
Loading…
Reference in New Issue