Skip to content

Commit

Permalink
Add info about play services to the debug log.
Browse files Browse the repository at this point in the history
  • Loading branch information
greyson-signal committed Jun 1, 2020
1 parent dbf74a2 commit c39751f
Showing 1 changed file with 13 additions and 0 deletions.
Expand Up @@ -10,9 +10,14 @@

import androidx.annotation.NonNull;

import com.google.android.gms.common.ConnectionResult;
import com.google.android.gms.common.GoogleApiAvailability;

import org.thoughtcrime.securesms.BuildConfig;
import org.thoughtcrime.securesms.push.SignalServiceNetworkAccess;
import org.thoughtcrime.securesms.util.AppSignatureUtil;
import org.thoughtcrime.securesms.util.ByteUnit;
import org.thoughtcrime.securesms.util.CensorshipUtil;
import org.thoughtcrime.securesms.util.ServiceUtil;
import org.thoughtcrime.securesms.util.TextSecurePreferences;
import org.thoughtcrime.securesms.util.Util;
Expand Down Expand Up @@ -50,6 +55,9 @@ public class LogSectionSystemInfo implements LogSection {
builder.append("Memory : ").append(getMemoryUsage()).append("\n");
builder.append("Memclass : ").append(getMemoryClass(context)).append("\n");
builder.append("OS Host : ").append(Build.HOST).append("\n");
builder.append("Censored : ").append(CensorshipUtil.isCensored(context)).append("\n");
builder.append("Play Services: ").append(getPlayServicesString(context)).append("\n");
builder.append("FCM : ").append(!TextSecurePreferences.isFcmDisabled(context)).append("\n");
builder.append("First Version: ").append(TextSecurePreferences.getFirstInstallVersion(context)).append("\n");
builder.append("App : ");
try {
Expand Down Expand Up @@ -141,4 +149,9 @@ public class LogSectionSystemInfo implements LogSection {
private static String getSigningString(@NonNull Context context) {
return AppSignatureUtil.getAppSignature(context).or("Unknown");
}

private static String getPlayServicesString(@NonNull Context context) {
int result = GoogleApiAvailability.getInstance().isGooglePlayServicesAvailable(context);
return result == ConnectionResult.SUCCESS ? "true" : "false (" + result + ")";
}
}

0 comments on commit c39751f

Please sign in to comment.