diff options
author | Wink Saville <wink@google.com> | 2014-03-30 15:23:30 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-03-30 15:23:30 +0000 |
commit | 562ea3fc7b5b97644bc8aa03e416a8334fac7a2d (patch) | |
tree | b03e390060bdabc3557b77534befff43f440e618 /policy/src/com/android | |
parent | ab4fc115e953831d22d76163685b2a8f479efda5 (diff) | |
parent | 80b4e09849048a78e08911eff9907cae618eba35 (diff) | |
download | frameworks_base-562ea3fc7b5b97644bc8aa03e416a8334fac7a2d.zip frameworks_base-562ea3fc7b5b97644bc8aa03e416a8334fac7a2d.tar.gz frameworks_base-562ea3fc7b5b97644bc8aa03e416a8334fac7a2d.tar.bz2 |
am 80b4e098: am 44b43a51: am 1e4cad81: Merge "GlobalActions: Fix Airplane Mode on/off issue"
* commit '80b4e09849048a78e08911eff9907cae618eba35':
GlobalActions: Fix Airplane Mode on/off issue
Diffstat (limited to 'policy/src/com/android')
-rw-r--r-- | policy/src/com/android/internal/policy/impl/GlobalActions.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/policy/src/com/android/internal/policy/impl/GlobalActions.java b/policy/src/com/android/internal/policy/impl/GlobalActions.java index 0120a03..6e025bb 100644 --- a/policy/src/com/android/internal/policy/impl/GlobalActions.java +++ b/policy/src/com/android/internal/policy/impl/GlobalActions.java @@ -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); |