Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 03f06070 authored by Bonian Chen's avatar Bonian Chen
Browse files

resolve merge conflicts of a8ebd89c to sc-dev

Bug: 180693313
Test: build pass
Change-Id: I77a4d189e3ac067cdc8dd01f2031920011bb3ec1
parents 5d3166d4 a8ebd89c
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -25,6 +25,7 @@ import android.location.LocationManager;
import android.media.AudioManager;
import android.net.ConnectivityManager;
import android.net.NetworkCapabilities;
import android.net.TetheringManager;
import android.net.vcn.VcnTransportInfo;
import android.net.wifi.WifiInfo;
import android.os.BatteryManager;
@@ -90,10 +91,10 @@ public class Utils {
     * Return string resource that best describes combination of tethering
     * options available on this device.
     */
    public static int getTetheringLabel(ConnectivityManager cm) {
        String[] usbRegexs = cm.getTetherableUsbRegexs();
        String[] wifiRegexs = cm.getTetherableWifiRegexs();
        String[] bluetoothRegexs = cm.getTetherableBluetoothRegexs();
    public static int getTetheringLabel(TetheringManager tm) {
        String[] usbRegexs = tm.getTetherableUsbRegexs();
        String[] wifiRegexs = tm.getTetherableWifiRegexs();
        String[] bluetoothRegexs = tm.getTetherableBluetoothRegexs();

        boolean usbAvailable = usbRegexs.length != 0;
        boolean wifiAvailable = wifiRegexs.length != 0;
+3 −4
Original line number Diff line number Diff line
@@ -26,7 +26,7 @@ import android.content.pm.PackageManager.NameNotFoundException;
import android.content.pm.UserInfo;
import android.content.res.Resources;
import android.graphics.drawable.Drawable;
import android.net.ConnectivityManager;
import android.net.TetheringManager;
import android.net.TrafficStats;
import android.os.Process;
import android.os.RemoteException;
@@ -123,9 +123,8 @@ public class UidDetailProvider {
                detail.icon = pm.getDefaultActivityIcon();
                return detail;
            case TrafficStats.UID_TETHERING:
                final ConnectivityManager cm = (ConnectivityManager) mContext.getSystemService(
                        Context.CONNECTIVITY_SERVICE);
                detail.label = res.getString(Utils.getTetheringLabel(cm));
                final TetheringManager tm = mContext.getSystemService(TetheringManager.class);
                detail.label = res.getString(Utils.getTetheringLabel(tm));
                detail.icon = pm.getDefaultActivityIcon();
                return detail;
            case Process.OTA_UPDATE_UID: