mirror of
https://github.com/M66B/FairEmail.git
synced 2026-04-14 13:03:13 +02:00
Debug: contact info
This commit is contained in:
@@ -1038,6 +1038,12 @@ public class ContactInfo {
|
||||
return all;
|
||||
}
|
||||
|
||||
static int[] getStats() {
|
||||
synchronized (emailContactInfo) {
|
||||
return new int[]{emailLookup.size(), emailContactInfo.size()};
|
||||
}
|
||||
}
|
||||
|
||||
private static class Lookup {
|
||||
Uri uri;
|
||||
String displayName;
|
||||
|
||||
@@ -178,6 +178,7 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc
|
||||
private TextView tvMemoryClass;
|
||||
private TextView tvMemoryUsage;
|
||||
private TextView tvStorageUsage;
|
||||
private TextView tvContactInfo;
|
||||
private TextView tvSuffixes;
|
||||
private TextView tvAndroidId;
|
||||
private TextView tvFingerprint;
|
||||
@@ -343,6 +344,7 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc
|
||||
tvMemoryClass = view.findViewById(R.id.tvMemoryClass);
|
||||
tvMemoryUsage = view.findViewById(R.id.tvMemoryUsage);
|
||||
tvStorageUsage = view.findViewById(R.id.tvStorageUsage);
|
||||
tvContactInfo = view.findViewById(R.id.tvContactInfo);
|
||||
tvSuffixes = view.findViewById(R.id.tvSuffixes);
|
||||
tvAndroidId = view.findViewById(R.id.tvAndroidId);
|
||||
tvFingerprint = view.findViewById(R.id.tvFingerprint);
|
||||
@@ -1481,6 +1483,7 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc
|
||||
@Override
|
||||
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
|
||||
super.onViewCreated(view, savedInstanceState);
|
||||
setContactInfo();
|
||||
setSuffixes();
|
||||
setPermissionInfo();
|
||||
}
|
||||
@@ -1826,6 +1829,11 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc
|
||||
time < 0 ? "-" : DTF.format(time)));
|
||||
}
|
||||
|
||||
private void setContactInfo() {
|
||||
int[] stats = ContactInfo.getStats();
|
||||
tvContactInfo.setText(getString(R.string.title_advanced_contact_info, stats[0], stats[1]));
|
||||
}
|
||||
|
||||
private void setSuffixes() {
|
||||
new SimpleTask<Integer>() {
|
||||
@Override
|
||||
|
||||
@@ -1887,6 +1887,10 @@ public class Log {
|
||||
|
||||
sb.append("\r\n");
|
||||
|
||||
int[] contacts = ContactInfo.getStats();
|
||||
sb.append(String.format("Contact lookup: %d cached: %s\r\n",
|
||||
contacts[0], contacts[1]));
|
||||
|
||||
Locale slocale = Resources.getSystem().getConfiguration().locale;
|
||||
String language = prefs.getString("language", null);
|
||||
sb.append(String.format("Locale: def=%s sys=%s lang=%s\r\n",
|
||||
|
||||
Reference in New Issue
Block a user