From 35eecf1eb9b0f4d6e3f8a094bdc7d845ffa98e61 Mon Sep 17 00:00:00 2001 From: Pavel Zhamaitsiak Date: Mon, 23 Mar 2015 14:24:38 -0700 Subject: [PATCH 01/27] Wi-Fi Calling: Update strings - Update notification and alert messages for registration errors - Move WFC mode summary strings from Settings in order to be able to share between Dialer and Wireless settings Change-Id: I12eee26f5e788d2cae5dfe1ce52e2038239fb2f3 --- core/res/res/values-mcc310-mnc260/strings.xml | 10 +++++++--- core/res/res/values/strings.xml | 14 ++++++++++++-- core/res/res/values/symbols.xml | 7 ++++++- 3 files changed, 25 insertions(+), 6 deletions(-) diff --git a/core/res/res/values-mcc310-mnc260/strings.xml b/core/res/res/values-mcc310-mnc260/strings.xml index 75b1b53761847..dc798775c70f4 100644 --- a/core/res/res/values-mcc310-mnc260/strings.xml +++ b/core/res/res/values-mcc310-mnc260/strings.xml @@ -25,9 +25,13 @@ REG09 - - - Wi-Fi Calling isn\'t available. Contact your carrier to enable Wi-Fi Calling. + + + To make calls and send messages over Wi-Fi, first ask your carrier to set up this service. Then turn on Wi-Fi calling again from Settings. + + + + Register with your carrier %s Wi-Fi Calling diff --git a/core/res/res/values/strings.xml b/core/res/res/values/strings.xml index 9f710932f89b5..aaa83235b15a7 100644 --- a/core/res/res/values/strings.xml +++ b/core/res/res/values/strings.xml @@ -249,10 +249,20 @@ Wi-Fi Calling - - + + + + %s + + Off + + Wi-Fi preferred + + Cellular preferred + + Wi-Fi only false + + 1 + + + 2 + + + 3 + + + 4 + false diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml index 9adbe8bc2f910..4bf7735169a1b 100755 --- a/core/res/res/values/symbols.xml +++ b/core/res/res/values/symbols.xml @@ -328,6 +328,10 @@ + + + + diff --git a/wifi/java/android/net/wifi/WifiActivityEnergyInfo.java b/wifi/java/android/net/wifi/WifiActivityEnergyInfo.java index 533b8bca10ac7..c9a2f076b8073 100644 --- a/wifi/java/android/net/wifi/WifiActivityEnergyInfo.java +++ b/wifi/java/android/net/wifi/WifiActivityEnergyInfo.java @@ -116,6 +116,7 @@ public final class WifiActivityEnergyInfo implements Parcelable { return (int)mControllerIdleTimeMs; } + /** * product of current(mA), voltage(V) and time(ms) * @return energy used diff --git a/wifi/java/android/net/wifi/WifiManager.java b/wifi/java/android/net/wifi/WifiManager.java index 407624cb36f78..f8a6e3fc947a4 100644 --- a/wifi/java/android/net/wifi/WifiManager.java +++ b/wifi/java/android/net/wifi/WifiManager.java @@ -839,6 +839,14 @@ public class WifiManager { public static final int WIFI_FEATURE_TDLS_OFFCHANNEL = 0x2000; // Support for TDLS off channel /** @hide */ public static final int WIFI_FEATURE_EPR = 0x4000; // Enhanced power reporting + /** @hide */ + public static final int WIFI_FEATURE_AP_STA = 0x8000; // Support for AP STA Concurrency + /** @hide */ + public static final int WIFI_FEATURE_LINK_LAYER_STATS = 0x10000; // Link layer stats collection + /** @hide */ + public static final int WIFI_FEATURE_LOGGER = 0x20000; // WiFi Logger + /** @hide */ + public static final int WIFI_FEATURE_HAL_EPNO = 0x40000; // WiFi PNO enhanced private int getSupportedFeatures() { try { @@ -950,7 +958,7 @@ public class WifiManager { * @return true if this adapter supports advanced power/performance counters */ public boolean isEnhancedPowerReportingSupported() { - return isFeatureSupported(WIFI_FEATURE_EPR); + return isFeatureSupported(WIFI_FEATURE_LINK_LAYER_STATS); } /** From faf7ce03c2bb21b5f541f9e3e0e5b76de14ac7d3 Mon Sep 17 00:00:00 2001 From: Omkar Kolangade Date: Sat, 31 Jan 2015 17:28:15 +0530 Subject: [PATCH 23/27] IMS: UT ServiceClass When CF and CW MMI request will be triggered, user preferred serviceclass will be sent to the lower layers. Change-Id: I230c59ec1ab0832e24755d5ba497b2b5e0749ec1 --- telephony/java/com/android/ims/internal/IImsUt.aidl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/telephony/java/com/android/ims/internal/IImsUt.aidl b/telephony/java/com/android/ims/internal/IImsUt.aidl index 50a016973fcfe..c531ea59ce454 100644 --- a/telephony/java/com/android/ims/internal/IImsUt.aidl +++ b/telephony/java/com/android/ims/internal/IImsUt.aidl @@ -79,12 +79,13 @@ interface IImsUt { /** * Updates the configuration of the call forward. */ - int updateCallForward(int action, int condition, String number, int timeSeconds); + int updateCallForward(int action, int condition, String number, + int serviceClass, int timeSeconds); /** * Updates the configuration of the call waiting. */ - int updateCallWaiting(boolean enable); + int updateCallWaiting(boolean enable, int serviceClass); /** * Updates the configuration of the CLIR supplementary service. From adf9e95ecc5d0867adf1dc2d7adcac958457b98e Mon Sep 17 00:00:00 2001 From: Jean-Michel Bachot Date: Thu, 11 Dec 2014 20:04:20 +0100 Subject: [PATCH 24/27] EAP-AKA' : Add support of EAP-AKA' in WiFi Enterprise methods EAP-AKA' is a new hidden method Change-Id: Ic103b25ad58807eebd5e0f8eefe3bfc02397aedc Signed-off-by: Jean-Michel Bachot Signed-off-by: Abdelmajid MLAYEH --- api/current.txt | 1 + api/system-current.txt | 1 + wifi/java/android/net/wifi/WifiEnterpriseConfig.java | 5 ++++- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/api/current.txt b/api/current.txt index 9884b1de41fd6..98b15c74efb5c 100644 --- a/api/current.txt +++ b/api/current.txt @@ -18058,6 +18058,7 @@ package android.net.wifi { public static final class WifiEnterpriseConfig.Eap { field public static final int AKA = 5; // 0x5 + field public static final int AKA_PRIME = 6; // 0x6 field public static final int NONE = -1; // 0xffffffff field public static final int PEAP = 0; // 0x0 field public static final int PWD = 3; // 0x3 diff --git a/api/system-current.txt b/api/system-current.txt index 9948996669fad..6838ec1b4fe5a 100644 --- a/api/system-current.txt +++ b/api/system-current.txt @@ -19568,6 +19568,7 @@ package android.net.wifi { public static final class WifiEnterpriseConfig.Eap { field public static final int AKA = 5; // 0x5 + field public static final int AKA_PRIME = 6; // 0x6 field public static final int NONE = -1; // 0xffffffff field public static final int PEAP = 0; // 0x0 field public static final int PWD = 3; // 0x3 diff --git a/wifi/java/android/net/wifi/WifiEnterpriseConfig.java b/wifi/java/android/net/wifi/WifiEnterpriseConfig.java index 36fc96b81feb5..440ad61eef6cf 100644 --- a/wifi/java/android/net/wifi/WifiEnterpriseConfig.java +++ b/wifi/java/android/net/wifi/WifiEnterpriseConfig.java @@ -235,8 +235,10 @@ public class WifiEnterpriseConfig implements Parcelable { public static final int SIM = 4; /** EAP-Authentication and Key Agreement */ public static final int AKA = 5; + /** EAP-Authentication and Key Agreement Prime */ + public static final int AKA_PRIME = 6; /** @hide */ - public static final String[] strings = { "PEAP", "TLS", "TTLS", "PWD", "SIM", "AKA" }; + public static final String[] strings = { "PEAP", "TLS", "TTLS", "PWD", "SIM", "AKA", "AKA'" }; /** Prevent initialization */ private Eap() {} @@ -286,6 +288,7 @@ public class WifiEnterpriseConfig implements Parcelable { case Eap.TTLS: case Eap.SIM: case Eap.AKA: + case Eap.AKA_PRIME: mFields.put(EAP_KEY, Eap.strings[eapMethod]); mFields.put(OPP_KEY_CACHING, "1"); break; From ee763b356227d2ef26f20bbe2c0ad858ce25a9ff Mon Sep 17 00:00:00 2001 From: Shriram Ganesh Date: Wed, 25 Mar 2015 18:14:42 -0700 Subject: [PATCH 25/27] Stop output of call number to logs Bug: 19602904 Change-Id: Ieb6ae8d5ab27571d1f6cf91c530713f22b21b513 --- telephony/java/com/android/ims/ImsCallProfile.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/telephony/java/com/android/ims/ImsCallProfile.java b/telephony/java/com/android/ims/ImsCallProfile.java index 8740e19fb782a..239c16a223d10 100644 --- a/telephony/java/com/android/ims/ImsCallProfile.java +++ b/telephony/java/com/android/ims/ImsCallProfile.java @@ -270,7 +270,7 @@ public class ImsCallProfile implements Parcelable { return "{ serviceType=" + mServiceType + ", callType=" + mCallType + ", restrictCause=" + mRestrictCause + - ", callExtras=" + mCallExtras.toString() + + //", callExtras=" + mCallExtras.toString() + ", mediaProfile=" + mMediaProfile.toString() + " }"; } From d91f19354d628e48577128f670afb0f5587e15e8 Mon Sep 17 00:00:00 2001 From: Wei Wang Date: Thu, 19 Mar 2015 15:09:56 -0700 Subject: [PATCH 26/27] Add API for BLE_SCAN_ALWAYS_AVAILABLE feature. Change-Id: I83e966d4db076db367ded71bfb50c39e57568156 --- api/system-current.txt | 2 ++ .../android/bluetooth/BluetoothAdapter.java | 34 +++++++++++++++++++ core/java/android/provider/Settings.java | 8 +++++ 3 files changed, 44 insertions(+) diff --git a/api/system-current.txt b/api/system-current.txt index 6838ec1b4fe5a..ae94a9caa45f9 100644 --- a/api/system-current.txt +++ b/api/system-current.txt @@ -6033,6 +6033,7 @@ package android.bluetooth { method public android.bluetooth.BluetoothDevice getRemoteDevice(byte[]); method public int getScanMode(); method public int getState(); + method public boolean isBleScanAlwaysAvailable(); method public boolean isDiscovering(); method public boolean isEnabled(); method public boolean isMultipleAdvertisementSupported(); @@ -6049,6 +6050,7 @@ package android.bluetooth { field public static final java.lang.String ACTION_DISCOVERY_FINISHED = "android.bluetooth.adapter.action.DISCOVERY_FINISHED"; field public static final java.lang.String ACTION_DISCOVERY_STARTED = "android.bluetooth.adapter.action.DISCOVERY_STARTED"; field public static final java.lang.String ACTION_LOCAL_NAME_CHANGED = "android.bluetooth.adapter.action.LOCAL_NAME_CHANGED"; + field public static final java.lang.String ACTION_REQUEST_BLE_SCAN_ALWAYS_AVAILABLE = "android.bluetooth.adapter.action.REQUEST_BLE_SCAN_ALWAYS_AVAILABLE"; field public static final java.lang.String ACTION_REQUEST_DISCOVERABLE = "android.bluetooth.adapter.action.REQUEST_DISCOVERABLE"; field public static final java.lang.String ACTION_REQUEST_ENABLE = "android.bluetooth.adapter.action.REQUEST_ENABLE"; field public static final java.lang.String ACTION_SCAN_MODE_CHANGED = "android.bluetooth.adapter.action.SCAN_MODE_CHANGED"; diff --git a/core/java/android/bluetooth/BluetoothAdapter.java b/core/java/android/bluetooth/BluetoothAdapter.java index b8f4bf8f044a1..ee055a5d5057b 100644 --- a/core/java/android/bluetooth/BluetoothAdapter.java +++ b/core/java/android/bluetooth/BluetoothAdapter.java @@ -18,6 +18,7 @@ package android.bluetooth; import android.annotation.SdkConstant; import android.annotation.SdkConstant.SdkConstantType; +import android.annotation.SystemApi; import android.bluetooth.le.BluetoothLeAdvertiser; import android.bluetooth.le.BluetoothLeScanner; import android.bluetooth.le.ScanCallback; @@ -208,6 +209,23 @@ public final class BluetoothAdapter { public static final String ACTION_REQUEST_ENABLE = "android.bluetooth.adapter.action.REQUEST_ENABLE"; + /** + * Activity Action: Show a system activity that allows user to enable BLE scans even when + * Bluetooth is turned off.

+ * + * Notification of result of this activity is posted using + * {@link android.app.Activity#onActivityResult}. The resultCode will be + * {@link android.app.Activity#RESULT_OK} if BLE scan always available setting is turned on or + * {@link android.app.Activity#RESULT_CANCELED} if the user has rejected the request or an + * error occurred. + * + * @hide + */ + @SystemApi + @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) + public static final String ACTION_REQUEST_BLE_SCAN_ALWAYS_AVAILABLE = + "android.bluetooth.adapter.action.REQUEST_BLE_SCAN_ALWAYS_AVAILABLE"; + /** * Broadcast Action: Indicates the Bluetooth scan mode of the local Adapter * has changed. @@ -918,6 +936,22 @@ public final class BluetoothAdapter { return false; } + /** + * Returns {@code true} if BLE scan is always available, {@code false} otherwise.

+ * + * If this returns {@code true}, application can issue {@link BluetoothLeScanner#startScan} and + * fetch scan results even when Bluetooth is turned off.

+ * + * To change this setting, use {@link #ACTION_REQUEST_BLE_SCAN_ALWAYS_AVAILABLE}. + * + * @hide + */ + @SystemApi + public boolean isBleScanAlwaysAvailable() { + // TODO: implement after Settings UI change. + return false; + } + /** * Returns whether peripheral mode is supported. * diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java index 2647247102d28..eeef2c22065e6 100644 --- a/core/java/android/provider/Settings.java +++ b/core/java/android/provider/Settings.java @@ -5837,6 +5837,14 @@ public final class Settings { public static final String WIFI_SCAN_ALWAYS_AVAILABLE = "wifi_scan_always_enabled"; + /** + * Settings to allow BLE scans to be enabled even when Bluetooth is turned off for + * connectivity. + * @hide + */ + public static final String BLE_SCAN_ALWAYS_AVAILABLE = + "ble_scan_always_enabled"; + /** * Used to save the Wifi_ON state prior to tethering. * This state will be checked to restore Wifi after From 50d47618300016766852523111bfc7ec991f00ea Mon Sep 17 00:00:00 2001 From: Etan Cohen Date: Tue, 31 Mar 2015 12:45:23 -0700 Subject: [PATCH 27/27] Merge (manually) pag/209446: Increase allowed duration to connect to HOGP profile Original file was moved from packages/apps/Settings to frameworks/base. Change-Id: I26912c0461780a255281a135c60cc0da2d25ae5a --- .../settingslib/bluetooth/CachedBluetoothDevice.java | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDevice.java b/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDevice.java index e1cb878cd42e0..64b4452b95542 100755 --- a/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDevice.java +++ b/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDevice.java @@ -104,6 +104,7 @@ public final class CachedBluetoothDevice implements Comparable SystemClock - .elapsedRealtime()) { + && (mConnectAttempted + timeout) > SystemClock.elapsedRealtime()) { connectWithoutResettingTimer(false); } dispatchAttributesChanged();