Show fingerprint in debug mode

pull/170/head
M66B 6 years ago
parent 14b3bdfe9c
commit 4ae0d02320

@ -50,15 +50,16 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc
private SwitchCompat swExperiments; private SwitchCompat swExperiments;
private TextView tvExperimentsHint; private TextView tvExperimentsHint;
private SwitchCompat swCrashReports; private SwitchCompat swCrashReports;
private TextView tvUuid;
private SwitchCompat swDebug; private SwitchCompat swDebug;
private Button btnReset; private Button btnReset;
private Button btnCleanup; private Button btnCleanup;
private TextView tvLastCleanup;
private TextView tvProcessors; private TextView tvProcessors;
private TextView tvMemoryClass; private TextView tvMemoryClass;
private TextView tvStorageSpace; private TextView tvStorageSpace;
private TextView tvLastCleanup; private TextView tvFingerprint;
private TextView tvUuid;
private Group grpDebug; private Group grpDebug;
@ -88,15 +89,16 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc
swExperiments = view.findViewById(R.id.swExperiments); swExperiments = view.findViewById(R.id.swExperiments);
tvExperimentsHint = view.findViewById(R.id.tvExperimentsHint); tvExperimentsHint = view.findViewById(R.id.tvExperimentsHint);
swCrashReports = view.findViewById(R.id.swCrashReports); swCrashReports = view.findViewById(R.id.swCrashReports);
tvUuid = view.findViewById(R.id.tvUuid);
swDebug = view.findViewById(R.id.swDebug); swDebug = view.findViewById(R.id.swDebug);
btnReset = view.findViewById(R.id.btnReset); btnReset = view.findViewById(R.id.btnReset);
btnCleanup = view.findViewById(R.id.btnCleanup); btnCleanup = view.findViewById(R.id.btnCleanup);
tvLastCleanup = view.findViewById(R.id.tvLastCleanup);
tvProcessors = view.findViewById(R.id.tvProcessors); tvProcessors = view.findViewById(R.id.tvProcessors);
tvMemoryClass = view.findViewById(R.id.tvMemoryClass); tvMemoryClass = view.findViewById(R.id.tvMemoryClass);
tvStorageSpace = view.findViewById(R.id.tvStorageSpace); tvStorageSpace = view.findViewById(R.id.tvStorageSpace);
tvLastCleanup = view.findViewById(R.id.tvLastCleanup); tvFingerprint = view.findViewById(R.id.tvFingerprint);
tvUuid = view.findViewById(R.id.tvUuid);
grpDebug = view.findViewById(R.id.grpDebug); grpDebug = view.findViewById(R.id.grpDebug);
@ -295,6 +297,7 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc
tvStorageSpace.setText(getString(R.string.title_advanced_storage_space, tvStorageSpace.setText(getString(R.string.title_advanced_storage_space,
Helper.humanReadableByteCount(Helper.getStorageSpace(), true))); Helper.humanReadableByteCount(Helper.getStorageSpace(), true)));
tvFingerprint.setText(Helper.getFingerprint(getContext()));
grpDebug.setVisibility(swDebug.isChecked() || BuildConfig.DEBUG ? View.VISIBLE : View.GONE); grpDebug.setVisibility(swDebug.isChecked() || BuildConfig.DEBUG ? View.VISIBLE : View.GONE);
} }

@ -180,6 +180,16 @@
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/btnCleanup" /> app:layout_constraintTop_toBottomOf="@id/btnCleanup" />
<TextView
android:id="@+id/tvLastCleanup"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="@string/title_advanced_last_cleanup"
android:textAppearance="@style/TextAppearance.AppCompat.Small"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvCleanupHint" />
<TextView <TextView
android:id="@+id/tvProcessors" android:id="@+id/tvProcessors"
android:layout_width="0dp" android:layout_width="0dp"
@ -189,7 +199,7 @@
android:textAppearance="@style/TextAppearance.AppCompat.Small" android:textAppearance="@style/TextAppearance.AppCompat.Small"
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/tvCleanupHint" /> app:layout_constraintTop_toBottomOf="@id/tvLastCleanup" />
<TextView <TextView
android:id="@+id/tvMemoryClass" android:id="@+id/tvMemoryClass"
@ -212,11 +222,12 @@
app:layout_constraintTop_toBottomOf="@id/tvMemoryClass" /> app:layout_constraintTop_toBottomOf="@id/tvMemoryClass" />
<TextView <TextView
android:id="@+id/tvLastCleanup" android:id="@+id/tvFingerprint"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/title_advanced_last_cleanup" android:text="12:34:56:78:9A:BC:CD:EF"
android:textAppearance="@style/TextAppearance.AppCompat.Small" android:textAppearance="@style/TextAppearance.AppCompat.Small"
android:textIsSelectable="true"
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/tvStorageSpace" /> app:layout_constraintTop_toBottomOf="@id/tvStorageSpace" />
@ -225,6 +236,6 @@
android:id="@+id/grpDebug" android:id="@+id/grpDebug"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="0dp" android:layout_height="0dp"
app:constraint_referenced_ids="tvProcessors,tvMemoryClass,tvStorageSpace,tvLastCleanup" /> app:constraint_referenced_ids="tvProcessors,tvMemoryClass,tvStorageSpace,tvFingerprint" />
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
</ScrollView> </ScrollView>

@ -362,7 +362,7 @@
<string name="title_advanced_processors" translatable="false">Processors: %1$d</string> <string name="title_advanced_processors" translatable="false">Processors: %1$d</string>
<string name="title_advanced_memory_class" translatable="false">Memory class: %1$s</string> <string name="title_advanced_memory_class" translatable="false">Memory class: %1$s</string>
<string name="title_advanced_storage_space" translatable="false">Storage space: %1$s</string> <string name="title_advanced_storage_space" translatable="false">Storage space: %1$s</string>
<string name="title_advanced_last_cleanup" translatable="false">Last cleanup: %1$s</string> <string name="title_advanced_last_cleanup">Last cleanup: %1$s</string>
<string name="title_advanced_hint">All settings have sensible default values, which should only be changed if necessary</string> <string name="title_advanced_hint">All settings have sensible default values, which should only be changed if necessary</string>

Loading…
Cancel
Save