2019-10-17 18:57:00 +02:00
|
|
|
<?xml version="1.0" encoding="utf-8"?>
|
2019-10-23 21:17:53 +02:00
|
|
|
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
2019-10-24 17:33:42 +02:00
|
|
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
|
|
xmlns:tools="http://schemas.android.com/tools">
|
2019-10-17 18:57:00 +02:00
|
|
|
|
|
|
|
<data>
|
|
|
|
|
2019-10-24 18:40:15 +02:00
|
|
|
<import type="android.os.Build" />
|
2020-01-13 15:01:46 +01:00
|
|
|
<import type="com.topjohnwu.magisk.core.Info" />
|
2019-10-24 17:33:42 +02:00
|
|
|
<import type="com.topjohnwu.magisk.BuildConfig" />
|
2020-08-27 14:46:41 +02:00
|
|
|
<import type="com.topjohnwu.magisk.R" />
|
2019-10-24 17:33:42 +02:00
|
|
|
|
2019-10-17 18:57:00 +02:00
|
|
|
<variable
|
|
|
|
name="viewModel"
|
2020-01-12 17:43:09 +01:00
|
|
|
type="com.topjohnwu.magisk.ui.safetynet.SafetynetViewModel" />
|
2019-10-17 18:57:00 +02:00
|
|
|
|
|
|
|
</data>
|
|
|
|
|
2019-10-24 17:33:42 +02:00
|
|
|
|
|
|
|
<androidx.core.widget.NestedScrollView
|
2019-10-17 18:57:00 +02:00
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="match_parent"
|
2019-10-24 17:33:42 +02:00
|
|
|
android:clipToPadding="false"
|
|
|
|
android:fillViewport="true"
|
2020-10-23 06:58:39 +02:00
|
|
|
android:paddingTop="@dimen/internal_action_bar_size"
|
|
|
|
app:fitsSystemWindowsInsets="top|bottom"
|
2019-10-24 17:33:42 +02:00
|
|
|
tools:paddingBottom="48dp"
|
|
|
|
tools:paddingTop="24dp">
|
2019-10-17 18:57:00 +02:00
|
|
|
|
2019-10-24 17:33:42 +02:00
|
|
|
<FrameLayout
|
2019-10-17 18:57:00 +02:00
|
|
|
android:layout_width="match_parent"
|
2019-10-23 21:17:53 +02:00
|
|
|
android:layout_height="match_parent">
|
2019-10-17 18:57:00 +02:00
|
|
|
|
2020-06-30 12:56:41 +02:00
|
|
|
<TextView
|
2019-10-24 17:33:42 +02:00
|
|
|
invisibleUnless="@{viewModel.checking}"
|
2019-10-23 21:17:53 +02:00
|
|
|
android:layout_width="wrap_content"
|
|
|
|
android:layout_height="wrap_content"
|
2019-10-24 17:33:42 +02:00
|
|
|
android:layout_gravity="center"
|
|
|
|
android:text="@string/safetynet_attest_loading"
|
2019-11-22 19:29:53 +01:00
|
|
|
android:textAppearance="@style/AppearanceFoundation.Title" />
|
2019-10-23 21:17:53 +02:00
|
|
|
|
2019-10-24 17:33:42 +02:00
|
|
|
<androidx.constraintlayout.widget.ConstraintLayout
|
2020-08-27 14:46:41 +02:00
|
|
|
invisible="@{viewModel.checking}"
|
2019-10-24 17:33:42 +02:00
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="match_parent"
|
|
|
|
android:paddingTop="@dimen/l1"
|
|
|
|
android:paddingBottom="@dimen/l1">
|
|
|
|
|
|
|
|
<com.google.android.material.card.MaterialCardView
|
|
|
|
android:id="@+id/safetynet_attestation"
|
2019-11-22 19:29:53 +01:00
|
|
|
style="@style/WidgetFoundation.Card.Elevated"
|
2020-08-27 14:46:41 +02:00
|
|
|
cardBackgroundColorAttr="@{viewModel.success ? R.attr.colorPrimary : R.attr.colorError}"
|
2019-10-24 17:33:42 +02:00
|
|
|
android:layout_width="0dp"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:layout_marginStart="@dimen/l1"
|
|
|
|
android:layout_marginTop="@dimen/l2"
|
|
|
|
android:layout_marginEnd="@dimen/l1"
|
|
|
|
app:cardCornerRadius="@dimen/l1"
|
|
|
|
app:cardElevation="@dimen/l1"
|
2020-06-30 12:56:41 +02:00
|
|
|
app:layout_constraintHorizontal_chainStyle="packed"
|
2019-10-24 17:33:42 +02:00
|
|
|
app:layout_constraintBottom_toBottomOf="parent"
|
|
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
|
|
app:layout_constraintStart_toStartOf="parent"
|
2020-06-30 12:56:41 +02:00
|
|
|
app:layout_constraintTop_toTopOf="parent"
|
|
|
|
app:layout_constraintVertical_bias=".35"
|
2020-08-27 14:46:41 +02:00
|
|
|
app:layout_constraintWidth_max="300dp"
|
|
|
|
tools:cardBackgroundColor="?colorPrimary">
|
2019-10-24 17:33:42 +02:00
|
|
|
|
|
|
|
<androidx.constraintlayout.widget.ConstraintLayout
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="wrap_content">
|
|
|
|
|
2020-06-30 12:56:41 +02:00
|
|
|
<TextView
|
2019-10-24 17:33:42 +02:00
|
|
|
android:id="@+id/safetynet_title"
|
|
|
|
android:layout_width="0dp"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:layout_marginStart="@dimen/l1"
|
|
|
|
android:layout_marginTop="@dimen/l2"
|
|
|
|
android:layout_marginEnd="@dimen/l1"
|
|
|
|
android:gravity="center"
|
|
|
|
android:text="@{viewModel.safetyNetTitle}"
|
2019-11-22 19:29:53 +01:00
|
|
|
android:textAppearance="@style/AppearanceFoundation.Display.OnPrimary"
|
2019-10-24 17:33:42 +02:00
|
|
|
android:textStyle="bold"
|
2020-09-17 07:16:28 +02:00
|
|
|
app:textColorAttr="@{viewModel.textColorAttr}"
|
2019-10-24 17:33:42 +02:00
|
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
|
|
app:layout_constraintHorizontal_chainStyle="packed"
|
|
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
|
|
app:layout_constraintTop_toTopOf="parent"
|
|
|
|
tools:text="@string/safetynet_attest_success" />
|
|
|
|
|
2020-09-12 12:17:21 +02:00
|
|
|
<ImageView
|
2019-10-24 17:33:42 +02:00
|
|
|
android:id="@+id/safetynet_divider"
|
|
|
|
android:layout_width="50dp"
|
|
|
|
android:layout_height="4dp"
|
|
|
|
android:layout_marginTop="@dimen/l2"
|
2020-09-12 12:17:21 +02:00
|
|
|
app:srcCompat="@drawable/bg_divider_rounded_on_primary"
|
2020-09-17 07:16:28 +02:00
|
|
|
app:tintAttr="@{viewModel.textColorAttr}"
|
2019-10-24 17:33:42 +02:00
|
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
|
|
app:layout_constraintStart_toStartOf="parent"
|
2020-09-17 07:16:28 +02:00
|
|
|
app:layout_constraintTop_toBottomOf="@+id/safetynet_title"
|
|
|
|
tools:tint="?colorOnPrimary"/>
|
2019-10-24 17:33:42 +02:00
|
|
|
|
2020-06-30 12:56:41 +02:00
|
|
|
<androidx.constraintlayout.widget.ConstraintLayout
|
|
|
|
android:id="@+id/checkbox_layout"
|
2019-10-24 17:33:42 +02:00
|
|
|
android:layout_width="wrap_content"
|
|
|
|
android:layout_height="wrap_content"
|
2020-06-30 12:56:41 +02:00
|
|
|
android:paddingBottom="@dimen/l1"
|
2019-10-24 17:33:42 +02:00
|
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
|
|
app:layout_constraintTop_toBottomOf="@+id/safetynet_divider">
|
|
|
|
|
2020-06-30 12:56:41 +02:00
|
|
|
<TextView
|
|
|
|
android:id="@+id/basic_text"
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:layout_gravity="center_vertical"
|
|
|
|
android:gravity="start"
|
|
|
|
android:text="basicIntegrity"
|
|
|
|
android:textAppearance="@style/AppearanceFoundation.Body.OnPrimary"
|
|
|
|
android:textStyle="bold"
|
|
|
|
android:layout_marginTop="@dimen/l2"
|
2020-09-17 07:16:28 +02:00
|
|
|
app:textColorAttr="@{viewModel.textColorAttr}"
|
2020-06-30 12:56:41 +02:00
|
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
|
|
app:layout_constraintEnd_toEndOf="@id/snet_barrier"
|
|
|
|
app:layout_constraintTop_toTopOf="parent"
|
|
|
|
tools:ignore="HardcodedText" />
|
|
|
|
|
|
|
|
<TextView
|
|
|
|
android:id="@+id/cts_text"
|
2019-10-24 17:33:42 +02:00
|
|
|
android:layout_width="wrap_content"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:layout_gravity="center_vertical"
|
|
|
|
android:gravity="start"
|
|
|
|
android:text="ctsProfile"
|
2019-11-22 19:29:53 +01:00
|
|
|
android:textAppearance="@style/AppearanceFoundation.Body.OnPrimary"
|
2019-10-24 17:33:42 +02:00
|
|
|
android:textStyle="bold"
|
2020-06-30 12:56:41 +02:00
|
|
|
android:layout_marginTop="@dimen/l2"
|
2020-09-17 07:16:28 +02:00
|
|
|
app:textColorAttr="@{viewModel.textColorAttr}"
|
2020-06-30 12:56:41 +02:00
|
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
|
|
app:layout_constraintEnd_toEndOf="@id/snet_barrier"
|
|
|
|
app:layout_constraintTop_toBottomOf="@id/basic_text"
|
2019-10-24 17:33:42 +02:00
|
|
|
tools:ignore="HardcodedText" />
|
|
|
|
|
2020-06-30 12:56:41 +02:00
|
|
|
<androidx.constraintlayout.widget.Barrier
|
|
|
|
android:id="@+id/snet_barrier"
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
app:barrierDirection="end"
|
|
|
|
app:constraint_referenced_ids="basic_text,cts_text"/>
|
|
|
|
|
|
|
|
<ImageView
|
|
|
|
style="@style/WidgetFoundation.Icon.OnPrimary"
|
|
|
|
isSelected="@{viewModel.basicIntegrityState}"
|
|
|
|
android:layout_gravity="center"
|
|
|
|
app:srcCompat="@drawable/ic_check_circle_md2"
|
2020-09-17 07:16:28 +02:00
|
|
|
app:tintAttr="@{viewModel.textColorAttr}"
|
2020-06-30 12:56:41 +02:00
|
|
|
app:layout_constraintStart_toEndOf="@id/snet_barrier"
|
|
|
|
app:layout_constraintTop_toTopOf="@id/basic_text"
|
2020-09-17 07:16:28 +02:00
|
|
|
app:layout_constraintBottom_toBottomOf="@id/basic_text"
|
|
|
|
tools:tint="?colorOnPrimary"/>
|
2020-06-30 12:56:41 +02:00
|
|
|
|
|
|
|
<ImageView
|
2019-11-22 19:29:53 +01:00
|
|
|
style="@style/WidgetFoundation.Icon.OnPrimary"
|
2019-10-24 17:33:42 +02:00
|
|
|
isSelected="@{viewModel.ctsState}"
|
|
|
|
android:layout_gravity="center"
|
2020-06-30 12:56:41 +02:00
|
|
|
app:srcCompat="@drawable/ic_check_circle_md2"
|
2020-09-17 07:16:28 +02:00
|
|
|
app:tintAttr="@{viewModel.textColorAttr}"
|
2020-06-30 12:56:41 +02:00
|
|
|
app:layout_constraintStart_toEndOf="@id/snet_barrier"
|
|
|
|
app:layout_constraintTop_toTopOf="@id/cts_text"
|
2020-09-17 07:16:28 +02:00
|
|
|
app:layout_constraintBottom_toBottomOf="@id/cts_text"
|
|
|
|
tools:tint="?colorOnPrimary"/>
|
2019-10-24 17:33:42 +02:00
|
|
|
|
2020-06-30 12:56:41 +02:00
|
|
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
2019-10-24 17:33:42 +02:00
|
|
|
|
|
|
|
<LinearLayout
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:orientation="horizontal"
|
2020-06-30 12:56:41 +02:00
|
|
|
android:paddingBottom="@dimen/l2"
|
2019-10-24 17:33:42 +02:00
|
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
|
|
app:layout_constraintStart_toStartOf="parent"
|
2020-06-30 12:56:41 +02:00
|
|
|
app:layout_constraintTop_toBottomOf="@+id/checkbox_layout">
|
2019-10-24 17:33:42 +02:00
|
|
|
|
2020-06-30 12:56:41 +02:00
|
|
|
<TextView
|
2019-10-24 17:33:42 +02:00
|
|
|
android:layout_width="wrap_content"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:layout_gravity="center_vertical"
|
|
|
|
android:gravity="start"
|
2020-06-30 12:56:41 +02:00
|
|
|
android:text="evalType"
|
2019-11-22 19:29:53 +01:00
|
|
|
android:textAppearance="@style/AppearanceFoundation.Body.OnPrimary"
|
2019-10-24 17:33:42 +02:00
|
|
|
android:textStyle="bold"
|
2020-09-17 07:16:28 +02:00
|
|
|
app:textColorAttr="@{viewModel.textColorAttr}"
|
2019-10-24 17:33:42 +02:00
|
|
|
tools:ignore="HardcodedText" />
|
|
|
|
|
2020-06-30 12:56:41 +02:00
|
|
|
<TextView
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:layout_gravity="center_vertical"
|
|
|
|
android:textAppearance="@style/AppearanceFoundation.Body.OnPrimary"
|
|
|
|
android:textStyle="bold"
|
|
|
|
android:layout_marginStart="@dimen/l1"
|
|
|
|
android:text="@{viewModel.evalType}"
|
2020-09-17 07:16:28 +02:00
|
|
|
app:textColorAttr="@{viewModel.textColorAttr}"
|
2020-06-30 12:56:41 +02:00
|
|
|
tools:text="HARDWARE"/>
|
2019-10-24 17:33:42 +02:00
|
|
|
|
|
|
|
</LinearLayout>
|
|
|
|
|
|
|
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
|
|
|
|
|
|
</com.google.android.material.card.MaterialCardView>
|
|
|
|
|
2020-08-19 11:45:14 +02:00
|
|
|
<Button
|
2019-11-22 19:29:53 +01:00
|
|
|
style="@style/WidgetFoundation.Button.Text"
|
2019-10-24 17:33:42 +02:00
|
|
|
android:layout_width="wrap_content"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:layout_marginTop="@dimen/l1"
|
|
|
|
android:layout_marginBottom="@dimen/l1"
|
|
|
|
android:onClick="@{() -> viewModel.reset()}"
|
|
|
|
android:text="@string/safetynet_attest_restart"
|
|
|
|
android:textAllCaps="false"
|
|
|
|
android:textColor="?colorOnSurfaceVariant"
|
|
|
|
app:icon="@drawable/ic_refresh_safetynet_md2"
|
|
|
|
app:iconTint="?colorOnSurfaceVariant"
|
|
|
|
app:layout_constraintEnd_toEndOf="@+id/safetynet_attestation"
|
|
|
|
app:layout_constraintTop_toBottomOf="@+id/safetynet_attestation" />
|
|
|
|
|
|
|
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
|
|
|
|
|
|
</FrameLayout>
|
2019-10-23 21:17:53 +02:00
|
|
|
|
|
|
|
|
2019-10-24 17:33:42 +02:00
|
|
|
</androidx.core.widget.NestedScrollView>
|
2019-10-17 18:57:00 +02:00
|
|
|
|
2020-01-12 17:43:09 +01:00
|
|
|
</layout>
|