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

Commit b6739b5b authored by DvTonder's avatar DvTonder
Browse files

QuickSettings: Add LTE Tile (1 of 2)

Patchset 3 - Add proper drawables and update logic
Patchset 4 - Rebase
Patchset 5 - Fix build errors

Thank you to Bjorn Lunden for the drawables

Change-Id: Ia25d098020586e06d38589f84d3d1a581e7cbd9a
parent 775d25e6
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -9,6 +9,9 @@ import android.hardware.display.WifiDisplayStatus;
import android.net.ConnectivityManager;
import android.nfc.NfcAdapter;
import android.provider.Settings;
import android.telephony.TelephonyManager;

import com.android.internal.telephony.PhoneConstants;

public class QSUtils {
        public static boolean deviceSupportsUsbTether(Context ctx) {
@@ -37,4 +40,9 @@ public class QSUtils {
        public static boolean deviceSupportsNfc(Context ctx) {
            return NfcAdapter.getDefaultAdapter(ctx) != null;
        }

        public static boolean deviceSupportsLte(Context ctx) {
            final TelephonyManager tm = (TelephonyManager) ctx.getSystemService(Context.TELEPHONY_SERVICE);
            return (tm.getLteOnCdmaMode() == PhoneConstants.LTE_ON_CDMA_TRUE) || tm.getLteOnGsmMode() != 0;
        }
}
+2.94 KiB
Loading image diff...
+2.94 KiB
Loading image diff...
+2.88 KiB
Loading image diff...
+2.89 KiB
Loading image diff...
Loading