mirror of
https://github.com/ArcaneChat/android.git
synced 2026-07-03 14:05:24 +02:00
add output of Rpc.getStorageUsageReportString() to log
This commit is contained in:
@@ -37,8 +37,6 @@ import androidx.annotation.NonNull;
|
||||
import androidx.core.content.PermissionChecker;
|
||||
import androidx.fragment.app.Fragment;
|
||||
|
||||
import com.b44t.messenger.DcContext;
|
||||
|
||||
import org.thoughtcrime.securesms.connect.DcHelper;
|
||||
import org.thoughtcrime.securesms.notifications.FcmReceiveService;
|
||||
import org.thoughtcrime.securesms.util.Prefs;
|
||||
@@ -55,6 +53,9 @@ import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.Locale;
|
||||
|
||||
import chat.delta.rpc.Rpc;
|
||||
import chat.delta.rpc.RpcException;
|
||||
|
||||
public class LogViewFragment extends Fragment {
|
||||
private EditText logPreview;
|
||||
|
||||
@@ -211,7 +212,6 @@ public class LogViewFragment extends Fragment {
|
||||
PowerManager powerManager = (PowerManager)context.getSystemService(Context.POWER_SERVICE);
|
||||
final PackageManager pm = context.getPackageManager();
|
||||
final StringBuilder builder = new StringBuilder();
|
||||
final DcContext dcContext = DcHelper.getContext(context);
|
||||
|
||||
builder.append("device=")
|
||||
.append(Build.MANUFACTURER).append(" ")
|
||||
@@ -266,8 +266,16 @@ public class LogViewFragment extends Fragment {
|
||||
builder.append("Unknown\n");
|
||||
}
|
||||
|
||||
final Rpc rpc = DcHelper.getRpc(context);
|
||||
final int accId = DcHelper.getContext(context).getAccountId();
|
||||
|
||||
builder.append("\n");
|
||||
builder.append(dcContext.getInfo());
|
||||
try {
|
||||
builder.append(rpc.getStorageUsageReportString(accId));
|
||||
builder.append(rpc.getInfo(accId));
|
||||
} catch (RpcException e) {
|
||||
builder.append(e);
|
||||
}
|
||||
|
||||
return builder.toString();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user