diff options
5 files changed, 26 insertions, 15 deletions
diff --git a/api/current.txt b/api/current.txt index a9d0f5720863..e5fd37899f21 100644 --- a/api/current.txt +++ b/api/current.txt @@ -4923,7 +4923,7 @@ package android.bluetooth { method public boolean setCharacteristicNotification(android.bluetooth.BluetoothGattCharacteristic, boolean); method public boolean writeCharacteristic(android.bluetooth.BluetoothGattCharacteristic); method public boolean writeDescriptor(android.bluetooth.BluetoothGattDescriptor); - field public static final int GATT_FAILURE = 0; // 0x0 + field public static final int GATT_FAILURE = 257; // 0x101 field public static final int GATT_INSUFFICIENT_AUTHENTICATION = 5; // 0x5 field public static final int GATT_INSUFFICIENT_ENCRYPTION = 15; // 0xf field public static final int GATT_INVALID_ATTRIBUTE_LENGTH = 13; // 0xd diff --git a/core/java/android/bluetooth/BluetoothGatt.java b/core/java/android/bluetooth/BluetoothGatt.java index bffe64b35702..f3032062cf0a 100644 --- a/core/java/android/bluetooth/BluetoothGatt.java +++ b/core/java/android/bluetooth/BluetoothGatt.java @@ -70,9 +70,6 @@ public final class BluetoothGatt implements BluetoothProfile { private List<BluetoothGattService> mServices; - /** A GATT operation failed */ - public static final int GATT_FAILURE = 0; - /** A GATT operation completed successfully */ public static final int GATT_SUCCESS = 0; @@ -97,6 +94,9 @@ public final class BluetoothGatt implements BluetoothProfile { /** A write operation exceeds the maximum length of the attribute */ public static final int GATT_INVALID_ATTRIBUTE_LENGTH = 0xd; + /** A GATT operation failed, errors other than the above */ + public static final int GATT_FAILURE = 0x101; + /** * No authentication required. * @hide diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java index edb317226708..7d23e894a54e 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java @@ -496,17 +496,21 @@ public class PhoneStatusBar extends BaseStatusBar { mNetworkController.addSignalCluster(signalCluster); signalCluster.setNetworkController(mNetworkController); - mEmergencyCallLabel = (TextView)mStatusBarWindow.findViewById(R.id.emergency_calls_only); - if (mEmergencyCallLabel != null) { - mNetworkController.addEmergencyLabelView(mEmergencyCallLabel); - mEmergencyCallLabel.setOnClickListener(new View.OnClickListener() { - public void onClick(View v) { }}); - mEmergencyCallLabel.addOnLayoutChangeListener(new View.OnLayoutChangeListener() { - @Override - public void onLayoutChange(View v, int left, int top, int right, int bottom, - int oldLeft, int oldTop, int oldRight, int oldBottom) { - updateCarrierLabelVisibility(false); - }}); + final boolean isAPhone = mNetworkController.hasVoiceCallingFeature(); + if (isAPhone) { + mEmergencyCallLabel = + (TextView) mStatusBarWindow.findViewById(R.id.emergency_calls_only); + if (mEmergencyCallLabel != null) { + mNetworkController.addEmergencyLabelView(mEmergencyCallLabel); + mEmergencyCallLabel.setOnClickListener(new View.OnClickListener() { + public void onClick(View v) { }}); + mEmergencyCallLabel.addOnLayoutChangeListener(new View.OnLayoutChangeListener() { + @Override + public void onLayoutChange(View v, int left, int top, int right, int bottom, + int oldLeft, int oldTop, int oldRight, int oldBottom) { + updateCarrierLabelVisibility(false); + }}); + } } mCarrierLabel = (TextView)mStatusBarWindow.findViewById(R.id.carrier_label); diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java index cda36755a0d4..36195871ee4f 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java @@ -263,6 +263,10 @@ public class NetworkController extends BroadcastReceiver { return mHasMobileDataFeature; } + public boolean hasVoiceCallingFeature() { + return mPhone.getPhoneType() != TelephonyManager.PHONE_TYPE_NONE; + } + public boolean isEmergencyOnly() { return (mServiceState != null && mServiceState.isEmergencyOnly()); } @@ -1377,6 +1381,8 @@ public class NetworkController extends BroadcastReceiver { mConnected?"CONNECTED":"DISCONNECTED", mConnectedNetworkType, mConnectedNetworkTypeName)); pw.println(" - telephony ------"); + pw.print(" hasVoiceCallingFeature()="); + pw.println(hasVoiceCallingFeature()); pw.print(" hasService()="); pw.println(hasService()); pw.print(" mHspaDataDistinguishable="); diff --git a/wifi/java/android/net/wifi/WifiStateMachine.java b/wifi/java/android/net/wifi/WifiStateMachine.java index 0fc72d4d02a9..0560077e22e5 100644 --- a/wifi/java/android/net/wifi/WifiStateMachine.java +++ b/wifi/java/android/net/wifi/WifiStateMachine.java @@ -2355,6 +2355,7 @@ public class WifiStateMachine extends StateMachine { public void enter() { mIsRunning = true; mInDelayedStop = false; + mDelayedStopCounter++; updateBatteryWorkSource(null); /** |