diff options
56 files changed, 492 insertions, 128 deletions
diff --git a/api/system-current.txt b/api/system-current.txt index 729f65618046..9920ca7cf8ad 100644 --- a/api/system-current.txt +++ b/api/system-current.txt @@ -29995,6 +29995,7 @@ package android.telecom { method public final android.telecom.PhoneAccountHandle getPhoneAccountHandle(); method public android.telecom.Connection getPrimaryConnection(); method public final int getState(); + method public final android.telecom.StatusHints getStatusHints(); method public void onAudioStateChanged(android.telecom.AudioState); method public void onConnectionAdded(android.telecom.Connection); method public void onDisconnect(); @@ -30013,6 +30014,7 @@ package android.telecom { method public final void setConnectionCapabilities(int); method public final void setDisconnected(android.telecom.DisconnectCause); method public final void setOnHold(); + method public final void setStatusHints(android.telecom.StatusHints); field public static long CONNECT_TIME_NOT_SPECIFIED; field protected android.telecom.PhoneAccountHandle mPhoneAccount; } diff --git a/core/java/android/app/ActivityManagerNative.java b/core/java/android/app/ActivityManagerNative.java index 8c571692131f..e8d08b8ccc2f 100644 --- a/core/java/android/app/ActivityManagerNative.java +++ b/core/java/android/app/ActivityManagerNative.java @@ -17,6 +17,7 @@ package android.app; import android.app.ActivityManager.StackInfo; +import android.app.ProfilerInfo; import android.content.ComponentName; import android.content.IIntentReceiver; import android.content.IIntentSender; @@ -2208,12 +2209,17 @@ public abstract class ActivityManagerNative extends Binder implements IActivityM return true; } - case GET_ACTIVITY_DISPLAY_ID_TRANSACTION: { + case GET_ACTIVITY_CONTAINER_TRANSACTION: { data.enforceInterface(IActivityManager.descriptor); IBinder activityToken = data.readStrongBinder(); - int displayId = getActivityDisplayId(activityToken); + IActivityContainer activityContainer = getEnclosingActivityContainer(activityToken); reply.writeNoException(); - reply.writeInt(displayId); + if (activityContainer != null) { + reply.writeInt(1); + reply.writeStrongBinder(activityContainer.asBinder()); + } else { + reply.writeInt(0); + } return true; } @@ -5232,21 +5238,26 @@ class ActivityManagerProxy implements IActivityManager reply.recycle(); } - @Override - public int getActivityDisplayId(IBinder activityToken) throws RemoteException { + public IActivityContainer getEnclosingActivityContainer(IBinder activityToken) + throws RemoteException { Parcel data = Parcel.obtain(); Parcel reply = Parcel.obtain(); data.writeInterfaceToken(IActivityManager.descriptor); data.writeStrongBinder(activityToken); - mRemote.transact(GET_ACTIVITY_DISPLAY_ID_TRANSACTION, data, reply, 0); + mRemote.transact(GET_ACTIVITY_CONTAINER_TRANSACTION, data, reply, 0); reply.readException(); - final int displayId = reply.readInt(); + final int result = reply.readInt(); + final IActivityContainer res; + if (result == 1) { + res = IActivityContainer.Stub.asInterface(reply.readStrongBinder()); + } else { + res = null; + } data.recycle(); reply.recycle(); - return displayId; + return res; } - @Override public IBinder getHomeActivityToken() throws RemoteException { Parcel data = Parcel.obtain(); Parcel reply = Parcel.obtain(); diff --git a/core/java/android/app/ActivityThread.java b/core/java/android/app/ActivityThread.java index 8353d5472b8e..f2be45c463a8 100644 --- a/core/java/android/app/ActivityThread.java +++ b/core/java/android/app/ActivityThread.java @@ -2339,7 +2339,10 @@ public final class ActivityThread { final DisplayManagerGlobal dm = DisplayManagerGlobal.getInstance(); try { - final int displayId = ActivityManagerNative.getDefault().getActivityDisplayId(r.token); + IActivityContainer container = + ActivityManagerNative.getDefault().getEnclosingActivityContainer(r.token); + final int displayId = + container == null ? Display.DEFAULT_DISPLAY : container.getDisplayId(); if (displayId > Display.DEFAULT_DISPLAY) { Display display = dm.getRealDisplay(displayId, r.token); baseContext = appContext.createDisplayContext(display); diff --git a/core/java/android/app/IActivityManager.java b/core/java/android/app/IActivityManager.java index dd3a38bf4e60..e505d69078e5 100644 --- a/core/java/android/app/IActivityManager.java +++ b/core/java/android/app/IActivityManager.java @@ -438,7 +438,8 @@ public interface IActivityManager extends IInterface { public void deleteActivityContainer(IActivityContainer container) throws RemoteException; - public int getActivityDisplayId(IBinder activityToken) throws RemoteException; + public IActivityContainer getEnclosingActivityContainer(IBinder activityToken) + throws RemoteException; public IBinder getHomeActivityToken() throws RemoteException; @@ -753,7 +754,7 @@ public interface IActivityManager extends IInterface { int GET_PERSISTED_URI_PERMISSIONS_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+181; int APP_NOT_RESPONDING_VIA_PROVIDER_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+182; int GET_HOME_ACTIVITY_TOKEN_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+183; - int GET_ACTIVITY_DISPLAY_ID_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+184; + int GET_ACTIVITY_CONTAINER_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+184; int DELETE_ACTIVITY_CONTAINER_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+185; diff --git a/core/java/android/net/MobileDataStateTracker.java b/core/java/android/net/MobileDataStateTracker.java index 40b7e066ddee..abbb7b8eeb4e 100644 --- a/core/java/android/net/MobileDataStateTracker.java +++ b/core/java/android/net/MobileDataStateTracker.java @@ -430,6 +430,7 @@ public class MobileDataStateTracker extends BaseNetworkStateTracker { networkTypeStr = "iden"; break; case TelephonyManager.NETWORK_TYPE_LTE: + case TelephonyManager.NETWORK_TYPE_IWLAN: networkTypeStr = "lte"; break; case TelephonyManager.NETWORK_TYPE_EHRPD: diff --git a/core/java/android/os/INetworkManagementService.aidl b/core/java/android/os/INetworkManagementService.aidl index 5d5d2b384e04..154a5a59bf78 100644 --- a/core/java/android/os/INetworkManagementService.aidl +++ b/core/java/android/os/INetworkManagementService.aidl @@ -178,6 +178,18 @@ interface INetworkManagementService String[] getDnsForwarders(); /** + * Enables unidirectional packet forwarding from {@code fromIface} to + * {@code toIface}. + */ + void startInterfaceForwarding(String fromIface, String toIface); + + /** + * Disables unidirectional packet forwarding from {@code fromIface} to + * {@code toIface}. + */ + void stopInterfaceForwarding(String fromIface, String toIface); + + /** * Enables Network Address Translation between two interfaces. * The address and netmask of the external interface is used for * the NAT'ed network. diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java index 838686a53ec2..d773d4aef5c2 100644 --- a/core/java/android/provider/Settings.java +++ b/core/java/android/provider/Settings.java @@ -6630,6 +6630,33 @@ public final class Settings { public static final String ENHANCED_4G_MODE_ENABLED = "volte_vt_enabled"; /** + * Whether WFC is enabled + * <p> + * Type: int (0 for false, 1 for true) + * + * @hide + */ + public static final String WFC_IMS_ENABLED = "wfc_ims_enabled"; + + /** + * WFC Mode. + * <p> + * Type: int - 2=Wi-Fi preferred, 1=Cellular preferred, 0=Wi-Fi only + * + * @hide + */ + public static final String WFC_IMS_MODE = "wfc_ims_mode"; + + /** + * Whether WFC roaming is enabled + * <p> + * Type: int (0 for false, 1 for true) + * + * @hide + */ + public static final String WFC_IMS_ROAMING_ENABLED = "wfc_ims_roaming_enabled"; + + /** * Global override to disable VoLTE (independent of user setting) * <p> * Type: int (1 for disable VoLTE, 0 to use user configuration) diff --git a/core/jni/android/graphics/Graphics.cpp b/core/jni/android/graphics/Graphics.cpp index 3ea9b5831a0a..a51af40542be 100644 --- a/core/jni/android/graphics/Graphics.cpp +++ b/core/jni/android/graphics/Graphics.cpp @@ -536,12 +536,7 @@ jbyteArray GraphicsJNI::allocateJavaPixelRef(JNIEnv* env, SkBitmap* bitmap, return NULL; } - const int64_t size64 = bitmap->computeSize64(); - if (!sk_64_isS32(size64)) { - doThrowIAE(env, "bitmap size exceeds 32 bits"); - return NULL; - } - const size_t size = sk_64_asS32(size64); + const size_t size = bitmap->getSize(); jbyteArray arrayObj = (jbyteArray) env->CallObjectMethod(gVMRuntime, gVMRuntime_newNonMovableArray, gByte_class, size); diff --git a/core/res/res/values-mcc310-mnc160/config.xml b/core/res/res/values-mcc310-mnc160/config.xml index 5a6a84bd06b3..2cae7cc0376b 100644 --- a/core/res/res/values-mcc310-mnc160/config.xml +++ b/core/res/res/values-mcc310-mnc160/config.xml @@ -32,4 +32,9 @@ <!-- Flag specifying whether VoLTE TTY is supported --> <bool name="config_carrier_volte_tty_supported">false</bool> + + <!-- Flag specifying whether WFC over IMS should be available for carrier: independent of + carrier provisioning. If false: hard disabled. If true: then depends on carrier + provisioning, availability etc --> + <bool name="config_carrier_wfc_ims_available">true</bool> </resources> diff --git a/core/res/res/values-mcc310-mnc200/config.xml b/core/res/res/values-mcc310-mnc200/config.xml index 5a6a84bd06b3..2cae7cc0376b 100644 --- a/core/res/res/values-mcc310-mnc200/config.xml +++ b/core/res/res/values-mcc310-mnc200/config.xml @@ -32,4 +32,9 @@ <!-- Flag specifying whether VoLTE TTY is supported --> <bool name="config_carrier_volte_tty_supported">false</bool> + + <!-- Flag specifying whether WFC over IMS should be available for carrier: independent of + carrier provisioning. If false: hard disabled. If true: then depends on carrier + provisioning, availability etc --> + <bool name="config_carrier_wfc_ims_available">true</bool> </resources> diff --git a/core/res/res/values-mcc310-mnc210/config.xml b/core/res/res/values-mcc310-mnc210/config.xml index 5a6a84bd06b3..2cae7cc0376b 100644 --- a/core/res/res/values-mcc310-mnc210/config.xml +++ b/core/res/res/values-mcc310-mnc210/config.xml @@ -32,4 +32,9 @@ <!-- Flag specifying whether VoLTE TTY is supported --> <bool name="config_carrier_volte_tty_supported">false</bool> + + <!-- Flag specifying whether WFC over IMS should be available for carrier: independent of + carrier provisioning. If false: hard disabled. If true: then depends on carrier + provisioning, availability etc --> + <bool name="config_carrier_wfc_ims_available">true</bool> </resources> diff --git a/core/res/res/values-mcc310-mnc220/config.xml b/core/res/res/values-mcc310-mnc220/config.xml index 5a6a84bd06b3..2cae7cc0376b 100644 --- a/core/res/res/values-mcc310-mnc220/config.xml +++ b/core/res/res/values-mcc310-mnc220/config.xml @@ -32,4 +32,9 @@ <!-- Flag specifying whether VoLTE TTY is supported --> <bool name="config_carrier_volte_tty_supported">false</bool> + + <!-- Flag specifying whether WFC over IMS should be available for carrier: independent of + carrier provisioning. If false: hard disabled. If true: then depends on carrier + provisioning, availability etc --> + <bool name="config_carrier_wfc_ims_available">true</bool> </resources> diff --git a/core/res/res/values-mcc310-mnc230/config.xml b/core/res/res/values-mcc310-mnc230/config.xml index 5a6a84bd06b3..2cae7cc0376b 100644 --- a/core/res/res/values-mcc310-mnc230/config.xml +++ b/core/res/res/values-mcc310-mnc230/config.xml @@ -32,4 +32,9 @@ <!-- Flag specifying whether VoLTE TTY is supported --> <bool name="config_carrier_volte_tty_supported">false</bool> + + <!-- Flag specifying whether WFC over IMS should be available for carrier: independent of + carrier provisioning. If false: hard disabled. If true: then depends on carrier + provisioning, availability etc --> + <bool name="config_carrier_wfc_ims_available">true</bool> </resources> diff --git a/core/res/res/values-mcc310-mnc240/config.xml b/core/res/res/values-mcc310-mnc240/config.xml index 5a6a84bd06b3..2cae7cc0376b 100644 --- a/core/res/res/values-mcc310-mnc240/config.xml +++ b/core/res/res/values-mcc310-mnc240/config.xml @@ -32,4 +32,9 @@ <!-- Flag specifying whether VoLTE TTY is supported --> <bool name="config_carrier_volte_tty_supported">false</bool> + + <!-- Flag specifying whether WFC over IMS should be available for carrier: independent of + carrier provisioning. If false: hard disabled. If true: then depends on carrier + provisioning, availability etc --> + <bool name="config_carrier_wfc_ims_available">true</bool> </resources> diff --git a/core/res/res/values-mcc310-mnc250/config.xml b/core/res/res/values-mcc310-mnc250/config.xml index 5a6a84bd06b3..2cae7cc0376b 100644 --- a/core/res/res/values-mcc310-mnc250/config.xml +++ b/core/res/res/values-mcc310-mnc250/config.xml @@ -32,4 +32,9 @@ <!-- Flag specifying whether VoLTE TTY is supported --> <bool name="config_carrier_volte_tty_supported">false</bool> + + <!-- Flag specifying whether WFC over IMS should be available for carrier: independent of + carrier provisioning. If false: hard disabled. If true: then depends on carrier + provisioning, availability etc --> + <bool name="config_carrier_wfc_ims_available">true</bool> </resources> diff --git a/core/res/res/values-mcc310-mnc260/config.xml b/core/res/res/values-mcc310-mnc260/config.xml index 5a6a84bd06b3..2cae7cc0376b 100644 --- a/core/res/res/values-mcc310-mnc260/config.xml +++ b/core/res/res/values-mcc310-mnc260/config.xml @@ -32,4 +32,9 @@ <!-- Flag specifying whether VoLTE TTY is supported --> <bool name="config_carrier_volte_tty_supported">false</bool> + + <!-- Flag specifying whether WFC over IMS should be available for carrier: independent of + carrier provisioning. If false: hard disabled. If true: then depends on carrier + provisioning, availability etc --> + <bool name="config_carrier_wfc_ims_available">true</bool> </resources> diff --git a/core/res/res/values-mcc310-mnc260/strings.xml b/core/res/res/values-mcc310-mnc260/strings.xml new file mode 100644 index 000000000000..dc798775c70f --- /dev/null +++ b/core/res/res/values-mcc310-mnc260/strings.xml @@ -0,0 +1,38 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* +** Copyright 2015, The Android Open Source Project +** +** Licensed under the Apache License, Version 2.0 (the "License"); +** you may not use this file except in compliance with the License. +** You my obtain a copy of the License at +** +** http://www.apache.org/licenses/LICENSE-2.0 +** +** Unless required by applicable law or agreed to in writing, software +** distributed under the License is distributed on an "AS IS" BASIS, +** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +** See the License for the specific language governing permissions and +** limitations under the License. +*/ +--> + +<!-- These resources are around just to allow their values to be customized + for different hardware and product builds. --> +<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + + <!-- WFC Operator Error Codes --> + <string-array name="wfcOperatorErrorCodes" translatable="false"> + <item>REG09</item> + </string-array> + <!-- WFC Operator Error Messages showed as alerts --> + <string-array name="wfcOperatorErrorAlertMessages"> + <item>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.</item> + </string-array> + <!-- WFC Operator Error Messages showed as notifications --> + <string-array name="wfcOperatorErrorNotificationMessages"> + <item>Register with your carrier</item> + </string-array> + <!-- Template for showing cellular network operator name while WFC is active --> + <string name="wfcSpnFormat">%s Wi-Fi Calling</string> +</resources> diff --git a/core/res/res/values-mcc310-mnc270/config.xml b/core/res/res/values-mcc310-mnc270/config.xml index 5a6a84bd06b3..2cae7cc0376b 100644 --- a/core/res/res/values-mcc310-mnc270/config.xml +++ b/core/res/res/values-mcc310-mnc270/config.xml @@ -32,4 +32,9 @@ <!-- Flag specifying whether VoLTE TTY is supported --> <bool name="config_carrier_volte_tty_supported">false</bool> + + <!-- Flag specifying whether WFC over IMS should be available for carrier: independent of + carrier provisioning. If false: hard disabled. If true: then depends on carrier + provisioning, availability etc --> + <bool name="config_carrier_wfc_ims_available">true</bool> </resources> diff --git a/core/res/res/values-mcc310-mnc300/config.xml b/core/res/res/values-mcc310-mnc300/config.xml index 5a6a84bd06b3..2cae7cc0376b 100644 --- a/core/res/res/values-mcc310-mnc300/config.xml +++ b/core/res/res/values-mcc310-mnc300/config.xml @@ -32,4 +32,9 @@ <!-- Flag specifying whether VoLTE TTY is supported --> <bool name="config_carrier_volte_tty_supported">false</bool> + + <!-- Flag specifying whether WFC over IMS should be available for carrier: independent of + carrier provisioning. If false: hard disabled. If true: then depends on carrier + provisioning, availability etc --> + <bool name="config_carrier_wfc_ims_available">true</bool> </resources> diff --git a/core/res/res/values-mcc310-mnc310/config.xml b/core/res/res/values-mcc310-mnc310/config.xml index 5a6a84bd06b3..2cae7cc0376b 100644 --- a/core/res/res/values-mcc310-mnc310/config.xml +++ b/core/res/res/values-mcc310-mnc310/config.xml @@ -32,4 +32,9 @@ <!-- Flag specifying whether VoLTE TTY is supported --> <bool name="config_carrier_volte_tty_supported">false</bool> + + <!-- Flag specifying whether WFC over IMS should be available for carrier: independent of + carrier provisioning. If false: hard disabled. If true: then depends on carrier + provisioning, availability etc --> + <bool name="config_carrier_wfc_ims_available">true</bool> </resources> diff --git a/core/res/res/values-mcc310-mnc490/config.xml b/core/res/res/values-mcc310-mnc490/config.xml index 5a6a84bd06b3..2cae7cc0376b 100644 --- a/core/res/res/values-mcc310-mnc490/config.xml +++ b/core/res/res/values-mcc310-mnc490/config.xml @@ -32,4 +32,9 @@ <!-- Flag specifying whether VoLTE TTY is supported --> <bool name="config_carrier_volte_tty_supported">false</bool> + + <!-- Flag specifying whether WFC over IMS should be available for carrier: independent of + carrier provisioning. If false: hard disabled. If true: then depends on carrier + provisioning, availability etc --> + <bool name="config_carrier_wfc_ims_available">true</bool> </resources> diff --git a/core/res/res/values-mcc310-mnc530/config.xml b/core/res/res/values-mcc310-mnc530/config.xml index 5a6a84bd06b3..2cae7cc0376b 100644 --- a/core/res/res/values-mcc310-mnc530/config.xml +++ b/core/res/res/values-mcc310-mnc530/config.xml @@ -32,4 +32,9 @@ <!-- Flag specifying whether VoLTE TTY is supported --> <bool name="config_carrier_volte_tty_supported">false</bool> + + <!-- Flag specifying whether WFC over IMS should be available for carrier: independent of + carrier provisioning. If false: hard disabled. If true: then depends on carrier + provisioning, availability etc --> + <bool name="config_carrier_wfc_ims_available">true</bool> </resources> diff --git a/core/res/res/values-mcc310-mnc580/config.xml b/core/res/res/values-mcc310-mnc580/config.xml index 5a6a84bd06b3..2cae7cc0376b 100644 --- a/core/res/res/values-mcc310-mnc580/config.xml +++ b/core/res/res/values-mcc310-mnc580/config.xml @@ -32,4 +32,9 @@ <!-- Flag specifying whether VoLTE TTY is supported --> <bool name="config_carrier_volte_tty_supported">false</bool> + + <!-- Flag specifying whether WFC over IMS should be available for carrier: independent of + carrier provisioning. If false: hard disabled. If true: then depends on carrier + provisioning, availability etc --> + <bool name="config_carrier_wfc_ims_available">true</bool> </resources> diff --git a/core/res/res/values-mcc310-mnc590/config.xml b/core/res/res/values-mcc310-mnc590/config.xml index 5a6a84bd06b3..2cae7cc0376b 100644 --- a/core/res/res/values-mcc310-mnc590/config.xml +++ b/core/res/res/values-mcc310-mnc590/config.xml @@ -32,4 +32,9 @@ <!-- Flag specifying whether VoLTE TTY is supported --> <bool name="config_carrier_volte_tty_supported">false</bool> + + <!-- Flag specifying whether WFC over IMS should be available for carrier: independent of + carrier provisioning. If false: hard disabled. If true: then depends on carrier + provisioning, availability etc --> + <bool name="config_carrier_wfc_ims_available">true</bool> </resources> diff --git a/core/res/res/values-mcc310-mnc640/config.xml b/core/res/res/values-mcc310-mnc640/config.xml index 5a6a84bd06b3..2cae7cc0376b 100644 --- a/core/res/res/values-mcc310-mnc640/config.xml +++ b/core/res/res/values-mcc310-mnc640/config.xml @@ -32,4 +32,9 @@ <!-- Flag specifying whether VoLTE TTY is supported --> <bool name="config_carrier_volte_tty_supported">false</bool> + + <!-- Flag specifying whether WFC over IMS should be available for carrier: independent of + carrier provisioning. If false: hard disabled. If true: then depends on carrier + provisioning, availability etc --> + <bool name="config_carrier_wfc_ims_available">true</bool> </resources> diff --git a/core/res/res/values-mcc310-mnc660/config.xml b/core/res/res/values-mcc310-mnc660/config.xml index 5a6a84bd06b3..2cae7cc0376b 100644 --- a/core/res/res/values-mcc310-mnc660/config.xml +++ b/core/res/res/values-mcc310-mnc660/config.xml @@ -32,4 +32,9 @@ <!-- Flag specifying whether VoLTE TTY is supported --> <bool name="config_carrier_volte_tty_supported">false</bool> + + <!-- Flag specifying whether WFC over IMS should be available for carrier: independent of + carrier provisioning. If false: hard disabled. If true: then depends on carrier + provisioning, availability etc --> + <bool name="config_carrier_wfc_ims_available">true</bool> </resources> diff --git a/core/res/res/values-mcc310-mnc800/config.xml b/core/res/res/values-mcc310-mnc800/config.xml index 5a6a84bd06b3..2cae7cc0376b 100644 --- a/core/res/res/values-mcc310-mnc800/config.xml +++ b/core/res/res/values-mcc310-mnc800/config.xml @@ -32,4 +32,9 @@ <!-- Flag specifying whether VoLTE TTY is supported --> <bool name="config_carrier_volte_tty_supported">false</bool> + + <!-- Flag specifying whether WFC over IMS should be available for carrier: independent of + carrier provisioning. If false: hard disabled. If true: then depends on carrier + provisioning, availability etc --> + <bool name="config_carrier_wfc_ims_available">true</bool> </resources> diff --git a/core/res/res/values-pl/strings.xml b/core/res/res/values-pl/strings.xml index ebe0f87b83e1..7a42f3e6bf72 100644 --- a/core/res/res/values-pl/strings.xml +++ b/core/res/res/values-pl/strings.xml @@ -1198,7 +1198,7 @@ <item quantity="other" msgid="2973062968038355991">"za <xliff:g id="COUNT">%d</xliff:g> dni"</item> </plurals> <string name="preposition_for_date" msgid="9093949757757445117">"w dniu <xliff:g id="DATE">%s</xliff:g>"</string> - <string name="preposition_for_time" msgid="5506831244263083793">"o godzinie <xliff:g id="TIME">%s</xliff:g>"</string> + <string name="preposition_for_time" msgid="5506831244263083793">"o godzinie <xliff:g id="TIME">%s</xliff:g>"</string> <string name="preposition_for_year" msgid="5040395640711867177">"w <xliff:g id="YEAR">%s</xliff:g> r."</string> <string name="day" msgid="8144195776058119424">"dzień"</string> <string name="days" msgid="4774547661021344602">"dni"</string> diff --git a/core/res/res/values-ru/strings.xml b/core/res/res/values-ru/strings.xml index 30f27db7d262..2f9cd1031c10 100644 --- a/core/res/res/values-ru/strings.xml +++ b/core/res/res/values-ru/strings.xml @@ -1841,7 +1841,7 @@ <string name="lock_to_app_unlock_pin" msgid="2552556656504331634">"Запрашивать PIN-код для отключения блокировки"</string> <string name="lock_to_app_unlock_pattern" msgid="4182192144797225137">"Запрашивать графический ключ для отключения блокировки"</string> <string name="lock_to_app_unlock_password" msgid="6380979775916974414">"Запрашивать пароль для отключения блокировки"</string> - <string name="battery_saver_description" msgid="1960431123816253034">"Чтобы продлить время работы устройства от батареи, в режиме энергосбережения снижается производительность, а также ограничивается использование вибрации, геолокации и фоновой передачи данных. Данные, требующие синхронизации, могут обновляться только когда вы откроете приложение.\n\nРежим энергосбережения автоматически отключается во время зарядки устройства."</string> + <string name="battery_saver_description" msgid="1960431123816253034">"Чтобы заряд батареи расходовался медленнее, режим энергосбережения уменьшает быстродействие устройства и ограничивает количество ресурсов, затрачиваемых на вибрацию, Геолокацию и большинство процессов обработки данных в фоновом режиме. Приложения, которые используют синхронизацию (например, для электронной почты и обмена SMS), могут не обновляться, пока вы их не откроете.\n\nКогда устройство заряжается, режим энергосбережения отключается автоматически."</string> <string name="downtime_condition_summary" msgid="8761776337475705749">"До отключения режима (в <xliff:g id="FORMATTEDTIME">%1$s</xliff:g>)"</string> <string name="downtime_condition_line_one" msgid="8762708714645352010">"До отключения режима"</string> <plurals name="zen_mode_duration_minutes_summary"> diff --git a/core/res/res/values-zh-rCN/strings.xml b/core/res/res/values-zh-rCN/strings.xml index fd30ce9937ac..24ec7ce94916 100644 --- a/core/res/res/values-zh-rCN/strings.xml +++ b/core/res/res/values-zh-rCN/strings.xml @@ -968,7 +968,7 @@ <string name="lockscreen_pattern_wrong" msgid="4317955014948108794">"重试"</string> <string name="lockscreen_password_wrong" msgid="5737815393253165301">"重试"</string> <string name="faceunlock_multiple_failures" msgid="754137583022792429">"已超过“人脸解锁”尝试次数上限"</string> - <string name="lockscreen_missing_sim_message_short" msgid="5099439277819215399">"没有 SIM 卡"</string> + <string name="lockscreen_missing_sim_message_short" msgid="5099439277819215399">"没有SIM卡"</string> <string name="lockscreen_missing_sim_message" product="tablet" msgid="151659196095791474">"平板电脑中没有SIM卡。"</string> <string name="lockscreen_missing_sim_message" product="tv" msgid="1943633865476989599">"电视中没有 SIM 卡。"</string> <string name="lockscreen_missing_sim_message" product="default" msgid="2186920585695169078">"手机中无SIM卡"</string> @@ -1460,9 +1460,9 @@ <string name="permdesc_copyProtectedData" msgid="4390697124288317831">"允许应用调用默认的容器服务,以便复制内容。普通应用不应使用此权限。"</string> <string name="permlab_route_media_output" msgid="1642024455750414694">"更改媒体输出线路"</string> <string name="permdesc_route_media_output" msgid="4932818749547244346">"允许该应用将媒体输出线路更改到其他外部设备。"</string> - <string name="permlab_access_keyguard_secure_storage" msgid="7565552237977815047">"访问锁屏安全存储空间"</string> + <string name="permlab_access_keyguard_secure_storage" msgid="7565552237977815047">"访问密钥保护安全存储空间"</string> <string name="permdesc_access_keyguard_secure_storage" msgid="5866245484303285762">"允许应用访问密钥保护安全存储空间。"</string> - <string name="permlab_control_keyguard" msgid="172195184207828387">"控制锁屏界面的显示和隐藏状态"</string> + <string name="permlab_control_keyguard" msgid="172195184207828387">"控制是显示还是隐藏锁屏"</string> <string name="permdesc_control_keyguard" msgid="3043732290518629061">"允许应用控制锁屏。"</string> <string name="permlab_trust_listener" msgid="1765718054003704476">"检测信任状态的变化。"</string> <string name="permdesc_trust_listener" msgid="8233895334214716864">"允许应用检测信任状态的变化。"</string> diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml index 68df6f1a3010..3de2268f2302 100755 --- a/core/res/res/values/config.xml +++ b/core/res/res/values/config.xml @@ -1889,6 +1889,14 @@ provisioning, availability etc --> <bool name="config_carrier_vt_available">false</bool> + <!-- Flag specifying whether WFC over IMS is available on device --> + <bool name="config_device_wfc_ims_available">false</bool> + + <!-- Flag specifying whether WFC over IMS should be available for carrier: independent of + carrier provisioning. If false: hard disabled. If true: then depends on carrier + provisioning, availability etc --> + <bool name="config_carrier_wfc_ims_available">false</bool> + <bool name="config_networkSamplingWakesDevice">true</bool> <string-array translatable="false" name="config_cdma_home_system" /> diff --git a/core/res/res/values/strings.xml b/core/res/res/values/strings.xml index 20b4b62f3e80..9711f9392211 100644 --- a/core/res/res/values/strings.xml +++ b/core/res/res/values/strings.xml @@ -245,6 +245,26 @@ <string name="roamingText12">Roaming Banner Off</string> <string name="roamingTextSearching">Searching for Service</string> + <!-- Displayed when WFC registration fails --> + <string name="wfcRegErrorTitle">Wi-Fi Calling</string> + <!-- WFC Operator Error Codes --> + <string-array name="wfcOperatorErrorCodes" translatable="false" /> + <!-- WFC Operator Error Messages showed as alerts --> + <string-array name="wfcOperatorErrorAlertMessages" /> + <!-- WFC Operator Error Messages showed as notifications --> + <string-array name="wfcOperatorErrorNotificationMessages" /> + <!-- Template for showing cellular network operator name while WFC is active --> + <string name="wfcSpnFormat">%s</string> + <!-- Template for showing operator name for data connection while WFC is active --> + <string name="wfcDataSpnFormat">%s</string> + <!-- WFC, summary for Disabled --> + <string name="wifi_calling_off_summary">Off</string> + <!-- WFC, summary for Wi-Fi Preferred --> + <string name="wfc_mode_wifi_preferred_summary">Wi-Fi preferred</string> + <!-- WFC, summary for Cellular Preferred --> + <string name="wfc_mode_cellular_preferred_summary">Cellular preferred</string> + <!-- WFC, summary for Wi-Fi Only --> + <string name="wfc_mode_wifi_only_summary">Wi-Fi only</string> <!-- {0} is one of "bearerServiceCode*" diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml index 105554794f53..816d203255c8 100755 --- a/core/res/res/values/symbols.xml +++ b/core/res/res/values/symbols.xml @@ -745,6 +745,16 @@ <java-symbol type="string" name="phoneTypeWork" /> <java-symbol type="string" name="phoneTypeWorkMobile" /> <java-symbol type="string" name="phoneTypeWorkPager" /> + <java-symbol type="string" name="wfcRegErrorTitle" /> + <java-symbol type="array" name="wfcOperatorErrorCodes" /> + <java-symbol type="array" name="wfcOperatorErrorAlertMessages" /> + <java-symbol type="array" name="wfcOperatorErrorNotificationMessages" /> + <java-symbol type="string" name="wfcSpnFormat" /> + <java-symbol type="string" name="wfcDataSpnFormat" /> + <java-symbol type="string" name="wifi_calling_off_summary" /> + <java-symbol type="string" name="wfc_mode_wifi_preferred_summary" /> + <java-symbol type="string" name="wfc_mode_cellular_preferred_summary" /> + <java-symbol type="string" name="wfc_mode_wifi_only_summary" /> <java-symbol type="string" name="policydesc_disableCamera" /> <java-symbol type="string" name="policydesc_encryptedStorage" /> <java-symbol type="string" name="policydesc_expirePassword" /> @@ -2091,6 +2101,8 @@ <java-symbol type="bool" name="config_carrier_volte_tty_supported" /> <java-symbol type="bool" name="config_device_vt_available" /> <java-symbol type="bool" name="config_carrier_vt_available" /> + <java-symbol type="bool" name="config_device_wfc_ims_available" /> + <java-symbol type="bool" name="config_carrier_wfc_ims_available" /> <java-symbol type="bool" name="useImsAlwaysForEmergencyCall" /> <java-symbol type="attr" name="touchscreenBlocksFocus" /> <java-symbol type="layout" name="resolver_list_with_default" /> diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/MobileDataControllerImpl.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/MobileDataControllerImpl.java index f2b2f6650b45..a7fdadc52822 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/MobileDataControllerImpl.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/MobileDataControllerImpl.java @@ -162,7 +162,7 @@ public class MobileDataControllerImpl implements NetworkController.MobileDataCon usage.warningLevel = DEFAULT_WARNING_LEVEL; } if (usage != null) { - usage.carrier = mNetworkController.getMobileNetworkName(); + usage.carrier = mNetworkController.getMobileDataNetworkName(); } return usage; } catch (RemoteException e) { diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkControllerImpl.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkControllerImpl.java index 9a7f21ea130b..07ba04ee8b31 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkControllerImpl.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkControllerImpl.java @@ -277,9 +277,9 @@ public class NetworkControllerImpl extends BroadcastReceiver return mDefaultSignalController; } - public String getMobileNetworkName() { + public String getMobileDataNetworkName() { MobileSignalController controller = getDataController(); - return controller != null ? controller.getState().networkName : ""; + return controller != null ? controller.getState().networkNameData : ""; } public boolean isEmergencyOnly() { @@ -1039,6 +1039,7 @@ public class NetworkControllerImpl extends BroadcastReceiver mapIconSets(); mLastState.networkName = mCurrentState.networkName = mNetworkNameDefault; + mLastState.networkNameData = mCurrentState.networkNameData = mNetworkNameDefault; mLastState.enabled = mCurrentState.enabled = hasMobileData; mLastState.iconGroup = mCurrentState.iconGroup = mDefaultIcons; // Get initial data sim state. @@ -1274,6 +1275,7 @@ public class NetworkControllerImpl extends BroadcastReceiver if (action.equals(TelephonyIntents.SPN_STRINGS_UPDATED_ACTION)) { updateNetworkName(intent.getBooleanExtra(TelephonyIntents.EXTRA_SHOW_SPN, false), intent.getStringExtra(TelephonyIntents.EXTRA_SPN), + intent.getStringExtra(TelephonyIntents.EXTRA_DATA_SPN), intent.getBooleanExtra(TelephonyIntents.EXTRA_SHOW_PLMN, false), intent.getStringExtra(TelephonyIntents.EXTRA_PLMN)); notifyListenersIfNecessary(); @@ -1302,14 +1304,18 @@ public class NetworkControllerImpl extends BroadcastReceiver /** * Updates the network's name based on incoming spn and plmn. */ - void updateNetworkName(boolean showSpn, String spn, boolean showPlmn, String plmn) { + void updateNetworkName(boolean showSpn, String spn, String dataSpn, + boolean showPlmn, String plmn) { if (CHATTY) { - Log.d("CarrierLabel", "updateNetworkName showSpn=" + showSpn + " spn=" + spn + Log.d("CarrierLabel", "updateNetworkName showSpn=" + showSpn + + " spn=" + spn + " dataSpn=" + dataSpn + " showPlmn=" + showPlmn + " plmn=" + plmn); } StringBuilder str = new StringBuilder(); + StringBuilder strData = new StringBuilder(); if (showPlmn && plmn != null) { str.append(plmn); + strData.append(plmn); } if (showSpn && spn != null) { if (str.length() != 0) { @@ -1322,6 +1328,17 @@ public class NetworkControllerImpl extends BroadcastReceiver } else { mCurrentState.networkName = mNetworkNameDefault; } + if (showSpn && dataSpn != null) { + if (strData.length() != 0) { + strData.append(mNetworkNameSeparator); + } + strData.append(dataSpn); + } + if (strData.length() != 0) { + mCurrentState.networkNameData = strData.toString(); + } else { + mCurrentState.networkNameData = mNetworkNameDefault; + } } /** @@ -1450,6 +1467,7 @@ public class NetworkControllerImpl extends BroadcastReceiver static class MobileState extends SignalController.State { String networkName; + String networkNameData; boolean dataSim; boolean dataConnected; boolean isEmergency; @@ -1462,6 +1480,7 @@ public class NetworkControllerImpl extends BroadcastReceiver MobileState state = (MobileState) s; dataSim = state.dataSim; networkName = state.networkName; + networkNameData = state.networkNameData; dataConnected = state.dataConnected; inetForNetwork = state.inetForNetwork; isEmergency = state.isEmergency; @@ -1474,6 +1493,7 @@ public class NetworkControllerImpl extends BroadcastReceiver builder.append(','); builder.append("dataSim=").append(dataSim).append(','); builder.append("networkName=").append(networkName).append(','); + builder.append("networkNameData=").append(networkNameData).append(','); builder.append("dataConnected=").append(dataConnected).append(','); builder.append("inetForNetwork=").append(inetForNetwork).append(','); builder.append("isEmergency=").append(isEmergency).append(','); @@ -1484,6 +1504,7 @@ public class NetworkControllerImpl extends BroadcastReceiver public boolean equals(Object o) { return super.equals(o) && Objects.equals(((MobileState) o).networkName, networkName) + && Objects.equals(((MobileState) o).networkNameData, networkNameData) && ((MobileState) o).dataSim == dataSim && ((MobileState) o).dataConnected == dataConnected && ((MobileState) o).isEmergency == isEmergency diff --git a/services/core/java/com/android/server/NetworkManagementService.java b/services/core/java/com/android/server/NetworkManagementService.java index 748018dd1568..8c56c8c5f057 100644 --- a/services/core/java/com/android/server/NetworkManagementService.java +++ b/services/core/java/com/android/server/NetworkManagementService.java @@ -1133,7 +1133,7 @@ public class NetworkManagementService extends INetworkManagementService.Stub public void setIpForwardingEnabled(boolean enable) { mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL, TAG); try { - mConnector.execute("ipfwd", enable ? "enable" : "disable"); + mConnector.execute("ipfwd", enable ? "enable" : "disable", "tethering"); } catch (NativeDaemonConnectorException e) { throw e.rethrowAsParcelableException(); } @@ -1259,6 +1259,27 @@ public class NetworkManagementService extends INetworkManagementService.Stub return filtered; } + private void modifyInterfaceForward(boolean add, String fromIface, String toIface) { + final Command cmd = new Command("ipfwd", add ? "add" : "remove", fromIface, toIface); + try { + mConnector.execute(cmd); + } catch (NativeDaemonConnectorException e) { + throw e.rethrowAsParcelableException(); + } + } + + @Override + public void startInterfaceForwarding(String fromIface, String toIface) { + mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL, TAG); + modifyInterfaceForward(true, fromIface, toIface); + } + + @Override + public void stopInterfaceForwarding(String fromIface, String toIface) { + mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL, TAG); + modifyInterfaceForward(false, fromIface, toIface); + } + private void modifyNat(String action, String internalInterface, String externalInterface) throws SocketException { final Command cmd = new Command("nat", action, internalInterface, externalInterface); diff --git a/services/core/java/com/android/server/am/ActivityManagerService.java b/services/core/java/com/android/server/am/ActivityManagerService.java index 2ab447ab4ec7..e8f37572b079 100755 --- a/services/core/java/com/android/server/am/ActivityManagerService.java +++ b/services/core/java/com/android/server/am/ActivityManagerService.java @@ -57,7 +57,6 @@ import android.util.ArrayMap; import android.util.ArraySet; import android.util.SparseIntArray; -import android.view.Display; import com.android.internal.R; import com.android.internal.annotations.GuardedBy; import com.android.internal.app.IAppOpsService; @@ -8664,13 +8663,14 @@ public final class ActivityManagerService extends ActivityManagerNative } @Override - public int getActivityDisplayId(IBinder activityToken) throws RemoteException { + public IActivityContainer getEnclosingActivityContainer(IBinder activityToken) + throws RemoteException { synchronized (this) { ActivityStack stack = ActivityRecord.getStackLocked(activityToken); - if (stack != null && stack.mActivityContainer.isAttachedLocked()) { - return stack.mActivityContainer.getDisplayId(); + if (stack != null) { + return stack.mActivityContainer; } - return Display.DEFAULT_DISPLAY; + return null; } } diff --git a/services/core/java/com/android/server/am/ActivityStack.java b/services/core/java/com/android/server/am/ActivityStack.java index 6497cd7dae6c..7908da06b0a2 100755 --- a/services/core/java/com/android/server/am/ActivityStack.java +++ b/services/core/java/com/android/server/am/ActivityStack.java @@ -1525,14 +1525,14 @@ final class ActivityStack { // Now the task above it has to return to the home task instead. final int taskNdx = mTaskHistory.indexOf(prevTask) + 1; mTaskHistory.get(taskNdx).setTaskToReturnTo(HOME_ACTIVITY_TYPE); - } else if (!isOnHomeDisplay()) { - return false; - } else if (!isHomeStack()){ - if (DEBUG_STATES) Slog.d(TAG, + } else { + if (DEBUG_STATES && isOnHomeDisplay()) Slog.d(TAG, "resumeTopActivityLocked: Launching home next"); + // Only resume home if on home display final int returnTaskType = prevTask == null || !prevTask.isOverHomeStack() ? HOME_ACTIVITY_TYPE : prevTask.getTaskToReturnTo(); - return mStackSupervisor.resumeHomeStackTask(returnTaskType, prev, "prevFinished"); + return isOnHomeDisplay() && + mStackSupervisor.resumeHomeStackTask(returnTaskType, prev, "prevFinished"); } } diff --git a/services/core/java/com/android/server/connectivity/Tethering.java b/services/core/java/com/android/server/connectivity/Tethering.java index 9566f9396d18..5ff7022647fc 100644 --- a/services/core/java/com/android/server/connectivity/Tethering.java +++ b/services/core/java/com/android/server/connectivity/Tethering.java @@ -981,6 +981,12 @@ public class Tethering extends BaseNetworkObserver { if (VDBG) Log.e(TAG, "Exception in forceUpdate: " + e.toString()); } try { + mNMService.stopInterfaceForwarding(mIfaceName, mMyUpstreamIfaceName); + } catch (Exception e) { + if (VDBG) Log.e( + TAG, "Exception in removeInterfaceForward: " + e.toString()); + } + try { mNMService.disableNat(mIfaceName, mMyUpstreamIfaceName); } catch (Exception e) { if (VDBG) Log.e(TAG, "Exception in disableNat: " + e.toString()); @@ -1033,9 +1039,14 @@ public class Tethering extends BaseNetworkObserver { if (newUpstreamIfaceName != null) { try { mNMService.enableNat(mIfaceName, newUpstreamIfaceName); + mNMService.startInterfaceForwarding(mIfaceName, + newUpstreamIfaceName); } catch (Exception e) { Log.e(TAG, "Exception enabling Nat: " + e.toString()); try { + mNMService.disableNat(mIfaceName, newUpstreamIfaceName); + } catch (Exception ee) {} + try { mNMService.untetherInterface(mIfaceName); } catch (Exception ee) {} diff --git a/telecomm/java/android/telecom/Call.java b/telecomm/java/android/telecom/Call.java index d8a14efcd8ab..c1d2f9b3d618 100644 --- a/telecomm/java/android/telecom/Call.java +++ b/telecomm/java/android/telecom/Call.java @@ -159,10 +159,10 @@ public final class Call { public static final int CAPABILITY_HIGH_DEF_AUDIO = 0x00000400; /** - * Call is using voice over WIFI. + * Call is using WIFI. * @hide */ - public static final int CAPABILITY_VoWIFI = 0x00000800; + public static final int CAPABILITY_WIFI = 0x00000800; /** * Call is able to be separated from its parent {@code Conference}, if any. @@ -264,8 +264,8 @@ public final class Call { if (can(capabilities, CAPABILITY_HIGH_DEF_AUDIO)) { builder.append(" CAPABILITY_HIGH_DEF_AUDIO"); } - if (can(capabilities, CAPABILITY_VoWIFI)) { - builder.append(" CAPABILITY_VoWIFI"); + if (can(capabilities, CAPABILITY_WIFI)) { + builder.append(" CAPABILITY_WIFI"); } if (can(capabilities, CAPABILITY_GENERIC_CONFERENCE)) { builder.append(" CAPABILITY_GENERIC_CONFERENCE"); diff --git a/telecomm/java/android/telecom/Conference.java b/telecomm/java/android/telecom/Conference.java index 33bbb295ab24..8c3b0668f9ef 100644 --- a/telecomm/java/android/telecom/Conference.java +++ b/telecomm/java/android/telecom/Conference.java @@ -49,6 +49,7 @@ public abstract class Conference implements IConferenceable { public void onDestroyed(Conference conference) {} public void onConnectionCapabilitiesChanged( Conference conference, int connectionCapabilities) {} + public void onStatusHintsChanged(Conference conference, StatusHints statusHints) {} } private final Set<Listener> mListeners = new CopyOnWriteArraySet<>(); @@ -66,6 +67,7 @@ public abstract class Conference implements IConferenceable { private int mConnectionCapabilities; private String mDisconnectMessage; private long mConnectTimeMillis = CONNECT_TIME_NOT_SPECIFIED; + private StatusHints mStatusHints; private final Connection.Listener mConnectionDeathListener = new Connection.Listener() { @Override @@ -484,4 +486,23 @@ public abstract class Conference implements IConferenceable { } mConferenceableConnections.clear(); } + + /** + * Sets the label and icon status to display in the InCall UI. + * + * @param statusHints The status label and icon to set. + */ + public final void setStatusHints(StatusHints statusHints) { + mStatusHints = statusHints; + for (Listener l : mListeners) { + l.onStatusHintsChanged(this, statusHints); + } + } + + /** + * @return The status hints for this conference. + */ + public final StatusHints getStatusHints() { + return mStatusHints; + } } diff --git a/telecomm/java/android/telecom/Connection.java b/telecomm/java/android/telecom/Connection.java index 00a4136da01c..569163a8f9ee 100644 --- a/telecomm/java/android/telecom/Connection.java +++ b/telecomm/java/android/telecom/Connection.java @@ -124,10 +124,10 @@ public abstract class Connection implements IConferenceable { public static final int CAPABILITY_HIGH_DEF_AUDIO = 0x00000400; /** - * Connection is using voice over WIFI. + * Connection is using WIFI. * @hide */ - public static final int CAPABILITY_VoWIFI = 0x00000800; + public static final int CAPABILITY_WIFI = 0x00000800; /** * Connection is able to be separated from its parent {@code Conference}, if any. @@ -233,8 +233,8 @@ public abstract class Connection implements IConferenceable { if (can(capabilities, CAPABILITY_HIGH_DEF_AUDIO)) { builder.append(" CAPABILITY_HIGH_DEF_AUDIO"); } - if (can(capabilities, CAPABILITY_VoWIFI)) { - builder.append(" CAPABILITY_VoWIFI"); + if (can(capabilities, CAPABILITY_WIFI)) { + builder.append(" CAPABILITY_WIFI"); } if (can(capabilities, CAPABILITY_GENERIC_CONFERENCE)) { builder.append(" CAPABILITY_GENERIC_CONFERENCE"); diff --git a/telecomm/java/android/telecom/ConnectionService.java b/telecomm/java/android/telecom/ConnectionService.java index dfdc3e12f7b0..6ec3fa356d73 100644 --- a/telecomm/java/android/telecom/ConnectionService.java +++ b/telecomm/java/android/telecom/ConnectionService.java @@ -415,6 +415,12 @@ public abstract class ConnectionService extends Service { Connection.capabilitiesToString(connectionCapabilities)); mAdapter.setConnectionCapabilities(id, connectionCapabilities); } + + @Override + public void onStatusHintsChanged(Conference conference, StatusHints statusHints) { + String id = mIdByConference.get(conference); + mAdapter.setStatusHints(id, statusHints); + } }; private final Connection.Listener mConnectionListener = new Connection.Listener() { @@ -884,7 +890,8 @@ public abstract class ConnectionService extends Service { conference.getState(), conference.getConnectionCapabilities(), connectionIds, - conference.getConnectTimeMillis()); + conference.getConnectTimeMillis(), + conference.getStatusHints()); mAdapter.addConferenceCall(id, parcelableConference); // Go through any child calls and set the parent. diff --git a/telecomm/java/android/telecom/ParcelableConference.java b/telecomm/java/android/telecom/ParcelableConference.java index dcc2713ec96b..d1278559f4a7 100644 --- a/telecomm/java/android/telecom/ParcelableConference.java +++ b/telecomm/java/android/telecom/ParcelableConference.java @@ -32,28 +32,22 @@ public final class ParcelableConference implements Parcelable { private int mState; private int mConnectionCapabilities; private List<String> mConnectionIds; - private long mConnectTimeMillis; + private long mConnectTimeMillis = Conference.CONNECT_TIME_NOT_SPECIFIED; + private StatusHints mStatusHints; public ParcelableConference( PhoneAccountHandle phoneAccount, int state, int connectionCapabilities, - List<String> connectionIds) { + List<String> connectionIds, + long connectTimeMillis, + StatusHints statusHints) { mPhoneAccount = phoneAccount; mState = state; mConnectionCapabilities = connectionCapabilities; mConnectionIds = connectionIds; - mConnectTimeMillis = Conference.CONNECT_TIME_NOT_SPECIFIED; - } - - public ParcelableConference( - PhoneAccountHandle phoneAccount, - int state, - int connectionCapabilities, - List<String> connectionIds, - long connectTimeMillis) { - this(phoneAccount, state, connectionCapabilities, connectionIds); mConnectTimeMillis = connectTimeMillis; + mStatusHints = statusHints; } @Override @@ -92,6 +86,10 @@ public final class ParcelableConference implements Parcelable { return mConnectTimeMillis; } + public StatusHints getStatusHints() { + return mStatusHints; + } + public static final Parcelable.Creator<ParcelableConference> CREATOR = new Parcelable.Creator<ParcelableConference> () { @Override @@ -103,9 +101,10 @@ public final class ParcelableConference implements Parcelable { List<String> connectionIds = new ArrayList<>(2); source.readList(connectionIds, classLoader); long connectTimeMillis = source.readLong(); + StatusHints statusHints = source.readParcelable(classLoader); return new ParcelableConference(phoneAccount, state, capabilities, connectionIds, - connectTimeMillis); + connectTimeMillis, statusHints); } @Override @@ -128,5 +127,6 @@ public final class ParcelableConference implements Parcelable { destination.writeInt(mConnectionCapabilities); destination.writeList(mConnectionIds); destination.writeLong(mConnectTimeMillis); + destination.writeParcelable(mStatusHints, 0); } } diff --git a/telephony/java/android/telephony/ServiceState.java b/telephony/java/android/telephony/ServiceState.java index 559a58c74f80..cdecb3383379 100644 --- a/telephony/java/android/telephony/ServiceState.java +++ b/telephony/java/android/telephony/ServiceState.java @@ -148,7 +148,11 @@ public class ServiceState implements Parcelable { public static final int RIL_RADIO_TECHNOLOGY_GSM = 16; /** @hide */ public static final int RIL_RADIO_TECHNOLOGY_TD_SCDMA = 17; - + /** + * IWLAN + * @hide + */ + public static final int RIL_RADIO_TECHNOLOGY_IWLAN = 18; /** * Available registration states for GSM, UMTS and CDMA. */ @@ -697,6 +701,9 @@ public class ServiceState implements Parcelable { case RIL_RADIO_TECHNOLOGY_GSM: rtString = "GSM"; break; + case RIL_RADIO_TECHNOLOGY_IWLAN: + rtString = "IWLAN"; + break; default: rtString = "Unexpected"; Rlog.w(LOG_TAG, "Unexpected radioTechnology=" + rt); @@ -1030,6 +1037,8 @@ public class ServiceState implements Parcelable { return TelephonyManager.NETWORK_TYPE_HSPAP; case ServiceState.RIL_RADIO_TECHNOLOGY_GSM: return TelephonyManager.NETWORK_TYPE_GSM; + case ServiceState.RIL_RADIO_TECHNOLOGY_IWLAN: + return TelephonyManager.NETWORK_TYPE_IWLAN; default: return TelephonyManager.NETWORK_TYPE_UNKNOWN; } @@ -1080,7 +1089,8 @@ public class ServiceState implements Parcelable { || radioTechnology == RIL_RADIO_TECHNOLOGY_LTE || radioTechnology == RIL_RADIO_TECHNOLOGY_HSPAP || radioTechnology == RIL_RADIO_TECHNOLOGY_GSM - || radioTechnology == RIL_RADIO_TECHNOLOGY_TD_SCDMA; + || radioTechnology == RIL_RADIO_TECHNOLOGY_TD_SCDMA + || radioTechnology == RIL_RADIO_TECHNOLOGY_IWLAN; } /** @hide */ diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java index db0da61c23c0..b8de1447053a 100644 --- a/telephony/java/android/telephony/TelephonyManager.java +++ b/telephony/java/android/telephony/TelephonyManager.java @@ -1213,6 +1213,10 @@ public class TelephonyManager { public static final int NETWORK_TYPE_HSPAP = 15; /** Current network is GSM {@hide} */ public static final int NETWORK_TYPE_GSM = 16; + /** Current network is TD_SCDMA {@hide} */ + public static final int NETWORK_TYPE_TD_SCDMA = 17; + /** Current network is IWLAN {@hide} */ + public static final int NETWORK_TYPE_IWLAN = 18; /** * @return the NETWORK_TYPE_xxxx for current data connection. @@ -1383,8 +1387,10 @@ public class TelephonyManager { case NETWORK_TYPE_EVDO_B: case NETWORK_TYPE_EHRPD: case NETWORK_TYPE_HSPAP: + case NETWORK_TYPE_TD_SCDMA: return NETWORK_CLASS_3_G; case NETWORK_TYPE_LTE: + case NETWORK_TYPE_IWLAN: return NETWORK_CLASS_4_G; default: return NETWORK_CLASS_UNKNOWN; @@ -1444,6 +1450,10 @@ public class TelephonyManager { return "HSPA+"; case NETWORK_TYPE_GSM: return "GSM"; + case NETWORK_TYPE_TD_SCDMA: + return "TD_SCDMA"; + case NETWORK_TYPE_IWLAN: + return "IWLAN"; default: return "UNKNOWN"; } @@ -3782,6 +3792,34 @@ public class TelephonyManager { } /** + * Returns the Status of Volte + *@hide + */ + public boolean isVolteEnabled() { + try { + return getITelephony().isVolteEnabled(); + } catch (RemoteException ex) { + return false; + } catch (NullPointerException ex) { + return false; + } + } + + /** + * Returns the Status of Wi-Fi Calling + *@hide + */ + public boolean isWifiCallingEnabled() { + try { + return getITelephony().isWifiCallingEnabled(); + } catch (RemoteException ex) { + return false; + } catch (NullPointerException ex) { + return false; + } + } + + /** * Set TelephonyProperties.PROPERTY_ICC_OPERATOR_NUMERIC for the default phone. * * @hide diff --git a/telephony/java/com/android/ims/ImsCallProfile.java b/telephony/java/com/android/ims/ImsCallProfile.java index 8740e19fb782..239c16a223d1 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() + " }"; } diff --git a/telephony/java/com/android/ims/ImsReasonInfo.java b/telephony/java/com/android/ims/ImsReasonInfo.java index 0b1246bfcff8..96289158cc05 100644 --- a/telephony/java/com/android/ims/ImsReasonInfo.java +++ b/telephony/java/com/android/ims/ImsReasonInfo.java @@ -25,26 +25,6 @@ import android.os.Parcelable; * @hide */ public class ImsReasonInfo implements Parcelable { - - /** - * Reason types, defines the error category. - * UNSPECIFIED - unknown error reason - * LOCAL - indicates the local/device error reason - * LOCAL_TIMEOUT - indicates the local error reason when a specific timer is expired - * STATUSCODE - indicates the interworking error reason by SIP status code received - * from the network - * MEDIA - indicates the media error reason (local resource, SDP parameter, etc.) - * USER - indicates the error reason by the local or remote user - * UT - indicates the error reason for the supplementary service configuration - */ - public static final int TYPE_UNSPECIFIED = 0; - public static final int TYPE_LOCAL = 1; - public static final int TYPE_TIMEOUT = 2; - public static final int TYPE_STATUSCODE = 3; - public static final int TYPE_MEDIA = 4; - public static final int TYPE_USER = 5; - public static final int TYPE_UT = 8; - /** * Specific code of each types */ @@ -229,23 +209,37 @@ public class ImsReasonInfo implements Parcelable { public static final int CODE_ECBM_NOT_SUPPORTED = 901; /** + * Ims Registration error code + */ + public static final int CODE_REGISTRATION_ERROR = 1000; + + /** + * CALL DROP error codes (Call could drop because of many reasons like Network not available, + * handover, failed, etc) + */ + + /** + * CALL DROP error code for the case when a device is ePDG capable and when the user is on an + * active wifi call and at the edge of coverage and there is no qualified LTE network available + * to handover the call to. We get a handover NOT_TRIGERRED message from the modem. This error + * code is received as part of the handover message. + */ + public static final int CODE_CALL_DROP_IWLAN_TO_LTE_UNAVAILABLE = 1100; + + /** * Network string error messages. * mExtraMessage may have these values. */ public static final String EXTRA_MSG_SERVICE_NOT_AUTHORIZED = "Forbidden. Not Authorized for Service"; - // For reason type - public int mReasonType; // For main reason code public int mCode; // For the extra code value; it depends on the code value. public int mExtraCode; // For the additional message of the reason info. public String mExtraMessage; - public ImsReasonInfo() { - mReasonType = TYPE_UNSPECIFIED; mCode = CODE_UNSPECIFIED; mExtraCode = CODE_UNSPECIFIED; mExtraMessage = null; @@ -256,14 +250,12 @@ public class ImsReasonInfo implements Parcelable { } public ImsReasonInfo(int code, int extraCode) { - mReasonType = (int) (code / 100); mCode = code; mExtraCode = extraCode; mExtraMessage = null; } public ImsReasonInfo(int code, int extraCode, String extraMessage) { - mReasonType = (int) (code / 100); mCode = code; mExtraCode = extraCode; mExtraMessage = extraMessage; @@ -291,20 +283,12 @@ public class ImsReasonInfo implements Parcelable { } /** - * - */ - public int getReasonType() { - return mReasonType; - } - - /** * Returns the string format of {@link ImsReasonInfo} * * @return the string format of {@link ImsReasonInfo} */ public String toString() { - return "ImsReasonInfo :: {" + mReasonType + ", " - + mCode + ", " + mExtraCode + ", " + mExtraMessage + "}"; + return "ImsReasonInfo :: {" + mCode + ", " + mExtraCode + ", " + mExtraMessage + "}"; } @Override @@ -314,14 +298,12 @@ public class ImsReasonInfo implements Parcelable { @Override public void writeToParcel(Parcel out, int flags) { - out.writeInt(mReasonType); out.writeInt(mCode); out.writeInt(mExtraCode); out.writeString(mExtraMessage); } private void readFromParcel(Parcel in) { - mReasonType = in.readInt(); mCode = in.readInt(); mExtraCode = in.readInt(); mExtraMessage = in.readString(); diff --git a/telephony/java/com/android/ims/internal/IImsCallSessionListener.aidl b/telephony/java/com/android/ims/internal/IImsCallSessionListener.aidl index 84d1c54575f8..0443c3edb974 100644 --- a/telephony/java/com/android/ims/internal/IImsCallSessionListener.aidl +++ b/telephony/java/com/android/ims/internal/IImsCallSessionListener.aidl @@ -115,4 +115,12 @@ interface IImsCallSessionListener { * - {@link com.android.internal.telephony.Phone#TTY_MODE_VCO} */ void callSessionTtyModeReceived(in IImsCallSession session, in int mode); + + /** + * Notifies of a change to the multiparty state for this {@code ImsCallSession}. + * + * @param session The call session. + * @param isMultiParty {@code true} if the session became multiparty, {@code false} otherwise. + */ + void callSessionMultipartyStateChanged(in IImsCallSession session, in boolean isMultiParty); } diff --git a/telephony/java/com/android/ims/internal/IImsConfig.aidl b/telephony/java/com/android/ims/internal/IImsConfig.aidl index c17637cc4ec8..441e03e2050f 100644 --- a/telephony/java/com/android/ims/internal/IImsConfig.aidl +++ b/telephony/java/com/android/ims/internal/IImsConfig.aidl @@ -20,31 +20,11 @@ package com.android.ims.internal; import com.android.ims.ImsConfigListener; /** - * Provides APIs to get/set the IMS service capability/parameters. - * The parameters can be configured by operator and/or user. - * We define 4 storage locations for the IMS config items: - * 1) Default config:For factory out device or device after factory data reset, - * the default config is used to build the initial state of the master config value. - * 2) Provisioned value: as the parameters provisioned by operator need to be preserved - * across FDR(factory data reset)/BOTA(over the air software upgrade), the operator - * provisioned items should be stored in memory location preserved across FDR/BOTA. - * 3) Master value: as the provisioned value can override the user setting, - * and the master config are used by IMS stack. They should be stored in the - * storage based on IMS vendor implementations. - * 4) User setting: For items can be changed by both user/operator, the user - * setting should take effect in some cases. So the user setting should be stored in - * database like setting.db. + * Provides APIs to get/set the IMS service feature/capability/parameters. + * The config items include: + * 1) Items provisioned by the operator. + * 2) Items configured by user. Mainly service feature class. * - * Priority consideration if both operator/user can config the same item: - * 1) For feature config items, the master value is obtained from the provisioned value - * masks with the user setting. Specifically the provisioned values overrides - * the user setting if feature is provisioned off. Otherwise, user setting takes - * effect. - * 2) For non-feature config item: to be implemented based on cases. - * Special cases considered as below: - * 1) Factory out device, the master configuration is built from default config. - * 2) For Factory data reset/SW upgrade device, the master config is built by - * taking provisioned value overriding default config. * {@hide} */ interface IImsConfig { diff --git a/telephony/java/com/android/ims/internal/IImsRegistrationListener.aidl b/telephony/java/com/android/ims/internal/IImsRegistrationListener.aidl index 1413e58d87a4..c91060019c60 100644 --- a/telephony/java/com/android/ims/internal/IImsRegistrationListener.aidl +++ b/telephony/java/com/android/ims/internal/IImsRegistrationListener.aidl @@ -16,6 +16,7 @@ package com.android.ims.internal; +import com.android.ims.ImsReasonInfo; /** * A listener type for receiving notifications about the changes to * the IMS connection(registration). @@ -29,9 +30,14 @@ interface IImsRegistrationListener { void registrationConnected(); /** + * Notifies the application when the device is trying to connect the IMS network. + */ + void registrationProgressing(); + + /** * Notifies the application when the device is disconnected from the IMS network. */ - void registrationDisconnected(); + void registrationDisconnected(in ImsReasonInfo imsReasonInfo); /** * Notifies the application when its suspended IMS connection is resumed, diff --git a/telephony/java/com/android/ims/internal/IImsUt.aidl b/telephony/java/com/android/ims/internal/IImsUt.aidl index 50a016973fcf..c531ea59ce45 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. diff --git a/telephony/java/com/android/internal/telephony/ITelephony.aidl b/telephony/java/com/android/internal/telephony/ITelephony.aidl index bf3ee09daa97..bb0bd04d7775 100644 --- a/telephony/java/com/android/internal/telephony/ITelephony.aidl +++ b/telephony/java/com/android/internal/telephony/ITelephony.aidl @@ -872,6 +872,18 @@ interface ITelephony { boolean isImsRegistered(); /** + * Returns the Status of Wi-Fi Calling + *@hide + */ + boolean isWifiCallingEnabled(); + + /** + * Returns the Status of Volte + *@hide + */ + boolean isVolteEnabled(); + + /** * Returns the unique device ID of phone, for example, the IMEI for * GSM and the MEID for CDMA phones. Return null if device ID is not available. * diff --git a/telephony/java/com/android/internal/telephony/TelephonyIntents.java b/telephony/java/com/android/internal/telephony/TelephonyIntents.java index 92cd4682ec02..26faaba90e1c 100644 --- a/telephony/java/com/android/internal/telephony/TelephonyIntents.java +++ b/telephony/java/com/android/internal/telephony/TelephonyIntents.java @@ -319,6 +319,7 @@ public class TelephonyIntents { public static final String EXTRA_PLMN = "plmn"; public static final String EXTRA_SHOW_SPN = "showSpn"; public static final String EXTRA_SPN = "spn"; + public static final String EXTRA_DATA_SPN = "spnData"; /** * <p>Broadcast Action: It indicates one column of a subinfo record has been changed diff --git a/wifi/java/android/net/wifi/IWifiManager.aidl b/wifi/java/android/net/wifi/IWifiManager.aidl index b87a1e94c6c8..ca95ec1f7358 100644 --- a/wifi/java/android/net/wifi/IWifiManager.aidl +++ b/wifi/java/android/net/wifi/IWifiManager.aidl @@ -153,6 +153,10 @@ interface IWifiManager void setAllowScansWithTraffic(int enabled); + boolean getAllowScansWhileAssociated(); + + void setAllowScansWhileAssociated(boolean enabled); + WifiConnectionStatistics getConnectionStatistics(); void disableEphemeralNetwork(String SSID); diff --git a/wifi/java/android/net/wifi/WifiManager.java b/wifi/java/android/net/wifi/WifiManager.java index b001bb8ce13c..97e10dcc1f82 100644 --- a/wifi/java/android/net/wifi/WifiManager.java +++ b/wifi/java/android/net/wifi/WifiManager.java @@ -2561,6 +2561,27 @@ public class WifiManager { } } + /** + * Set setting for allowing Scans when infrastructure is associated + * @hide + */ + public void setAllowScansWhileAssociated(boolean enabled) { + try { + mService.setAllowScansWhileAssociated(enabled); + } catch (RemoteException e) { + } + } + /** + * Get setting for allowing Scans when infrastructure is associated + * @hide + */ + public boolean getAllowScansWhileAssociated() { + try { + return mService.getAllowScansWhileAssociated(); + } catch (RemoteException e) { + } + return false; + } } |