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

Commit 257959a9 authored by Wink Saville's avatar Wink Saville Committed by Android Git Automerger
Browse files

am 562ea3fc: am 80b4e098: am 44b43a51: am 1e4cad81: Merge "GlobalActions: Fix...

am 562ea3fc: am 80b4e098: am 44b43a51: am 1e4cad81: Merge "GlobalActions: Fix Airplane Mode on/off issue"

* commit '562ea3fc':
  GlobalActions: Fix Airplane Mode on/off issue
parents 58aee2ac 562ea3fc
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -121,13 +121,14 @@ class GlobalActions implements DialogInterface.OnDismissListener, DialogInterfac
        filter.addAction(TelephonyIntents.ACTION_EMERGENCY_CALLBACK_MODE_CHANGED);
        context.registerReceiver(mBroadcastReceiver, filter);

        ConnectivityManager cm = (ConnectivityManager)
                context.getSystemService(Context.CONNECTIVITY_SERVICE);
        mHasTelephony = cm.isNetworkSupported(ConnectivityManager.TYPE_MOBILE);

        // get notified of phone state changes
        TelephonyManager telephonyManager =
                (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE);
        telephonyManager.listen(mPhoneStateListener, PhoneStateListener.LISTEN_SERVICE_STATE);
        ConnectivityManager cm = (ConnectivityManager)
                context.getSystemService(Context.CONNECTIVITY_SERVICE);
        mHasTelephony = cm.isNetworkSupported(ConnectivityManager.TYPE_MOBILE);
        mContext.getContentResolver().registerContentObserver(
                Settings.Global.getUriFor(Settings.Global.AIRPLANE_MODE_ON), true,
                mAirplaneModeObserver);