diff --git a/app/src/main/java/eu/faircode/email/FragmentOptionsMisc.java b/app/src/main/java/eu/faircode/email/FragmentOptionsMisc.java index 746828e198..9e5776b0f7 100644 --- a/app/src/main/java/eu/faircode/email/FragmentOptionsMisc.java +++ b/app/src/main/java/eu/faircode/email/FragmentOptionsMisc.java @@ -150,6 +150,7 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc private TextView tvMemoryUsage; private TextView tvStorageUsage; private TextView tvSuffixes; + private TextView tvAndroidId; private TextView tvFingerprint; private TextView tvCursorWindow; private Button btnGC; @@ -276,6 +277,7 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc tvMemoryUsage = view.findViewById(R.id.tvMemoryUsage); tvStorageUsage = view.findViewById(R.id.tvStorageUsage); tvSuffixes = view.findViewById(R.id.tvSuffixes); + tvAndroidId = view.findViewById(R.id.tvAndroidId); tvFingerprint = view.findViewById(R.id.tvFingerprint); tvCursorWindow = view.findViewById(R.id.tvCursorWindow); btnGC = view.findViewById(R.id.btnGC); @@ -1270,6 +1272,19 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc class_large_mb + " MB", Helper.humanReadableByteCount(mi.totalMem))); + String android_id; + try { + android_id = Settings.Secure.getString( + getContext().getContentResolver(), + Settings.Secure.ANDROID_ID); + if (android_id == null) + android_id = ""; + } catch (Throwable ex) { + Log.w(ex); + android_id = "?"; + } + tvAndroidId.setText(getString(R.string.title_advanced_android_id, android_id)); + tvFingerprint.setText(Helper.getFingerprint(getContext())); int cursorWindowSize = -1; diff --git a/app/src/main/res/layout/fragment_options_misc.xml b/app/src/main/res/layout/fragment_options_misc.xml index 64a5bd9f7c..d9f113f460 100644 --- a/app/src/main/res/layout/fragment_options_misc.xml +++ b/app/src/main/res/layout/fragment_options_misc.xml @@ -912,6 +912,17 @@ app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@id/tvCursorWindow" /> + + + app:layout_constraintTop_toBottomOf="@id/tvAndroidId" />