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

Commit cc0de009 authored by Lucas Lin's avatar Lucas Lin Committed by Automerger Merge Worker
Browse files

Merge "Replace CM#isNetworkSupported() with checking FEATURE_TELEPHONY" am:...

Merge "Replace CM#isNetworkSupported() with checking FEATURE_TELEPHONY" am: ac06b167 am: 9214c04e

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1649305

Change-Id: I9428a5954d7461f6e8ae0e1a28cf9a3ecc4a7859
parents 8f3e66d3 9214c04e
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -20,7 +20,7 @@ import android.annotation.Nullable;
import android.app.AlarmManager;
import android.content.ContentResolver;
import android.content.Context;
import android.net.ConnectivityManager;
import android.content.pm.PackageManager;
import android.os.SystemProperties;
import android.provider.Settings;

@@ -52,9 +52,7 @@ public final class TimeZoneDetectorCallbackImpl implements TimeZoneDetectorStrat
    }

    private boolean deviceHasTelephonyNetwork() {
        // TODO b/150583524 Avoid the use of a deprecated API.
        return mContext.getSystemService(ConnectivityManager.class)
                .isNetworkSupported(ConnectivityManager.TYPE_MOBILE);
        return mContext.getPackageManager().hasSystemFeature(PackageManager.FEATURE_TELEPHONY);
    }

    @Override