|
|
|
@ -29,6 +29,7 @@ import android.graphics.Point;
|
|
|
|
|
import android.net.ConnectivityManager;
|
|
|
|
|
import android.net.Network;
|
|
|
|
|
import android.net.NetworkCapabilities;
|
|
|
|
|
import android.net.NetworkInfo;
|
|
|
|
|
import android.os.Build;
|
|
|
|
|
import android.os.Bundle;
|
|
|
|
|
import android.os.DeadObjectException;
|
|
|
|
@ -682,6 +683,10 @@ public class Log {
|
|
|
|
|
try (OutputStream os = new BufferedOutputStream(new FileOutputStream(file))) {
|
|
|
|
|
ConnectivityManager cm = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);
|
|
|
|
|
|
|
|
|
|
NetworkInfo ani = cm.getActiveNetworkInfo();
|
|
|
|
|
if (ani != null)
|
|
|
|
|
size += write(os, ani.toString() + " metered=" + cm.isActiveNetworkMetered() + "\r\n\r\n");
|
|
|
|
|
|
|
|
|
|
Network active = null;
|
|
|
|
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M)
|
|
|
|
|
active = cm.getActiveNetwork();
|
|
|
|
|