diff options
author | 2017-01-26 01:34:04 +0000 | |
---|---|---|
committer | 2017-01-26 01:34:05 +0000 | |
commit | 8e6b13a1c0e969b00d6b6e29fd367082be071ff9 (patch) | |
tree | 76fed2cd27627822c2465d616f4b98fbb67f6b32 | |
parent | 273b886c49c3b8a4b73127fcadc4303e89bfc04a (diff) | |
parent | 024aaf23881c142ba92194a001ac038253ae708e (diff) |
Merge "Adding Dynamic ImsService Binding (1/3)"
-rw-r--r-- | Android.mk | 2 | ||||
-rw-r--r-- | api/current.txt | 1 | ||||
-rw-r--r-- | api/system-current.txt | 11 | ||||
-rw-r--r-- | api/test-current.txt | 1 | ||||
-rw-r--r-- | core/res/AndroidManifest.xml | 10 | ||||
-rw-r--r-- | telephony/java/android/telephony/CarrierConfigManager.java | 7 | ||||
-rw-r--r-- | telephony/java/android/telephony/ims/ImsServiceBase.java | 35 | ||||
-rw-r--r-- | telephony/java/android/telephony/ims/feature/ImsFeature.java | 33 | ||||
-rw-r--r-- | telephony/java/com/android/ims/internal/IImsServiceController.aidl | 25 | ||||
-rw-r--r-- | telephony/java/com/android/ims/internal/IImsServiceFeatureListener.aidl | 25 |
10 files changed, 150 insertions, 0 deletions
diff --git a/Android.mk b/Android.mk index 5dfa58a6ba62..a798a311e041 100644 --- a/Android.mk +++ b/Android.mk @@ -437,6 +437,8 @@ LOCAL_SRC_FILES += \ telephony/java/com/android/ims/internal/IImsExternalCallStateListener.aidl \ telephony/java/com/android/ims/internal/IImsMultiEndpoint.aidl \ telephony/java/com/android/ims/internal/IImsService.aidl \ + telephony/java/com/android/ims/internal/IImsServiceController.aidl \ + telephony/java/com/android/ims/internal/IImsServiceFeatureListener.aidl \ telephony/java/com/android/ims/internal/IImsStreamMediaSession.aidl \ telephony/java/com/android/ims/internal/IImsUt.aidl \ telephony/java/com/android/ims/internal/IImsUtListener.aidl \ diff --git a/api/current.txt b/api/current.txt index 550e0188d522..10a5d9263827 100644 --- a/api/current.txt +++ b/api/current.txt @@ -37090,6 +37090,7 @@ package android.telephony { field public static final java.lang.String KEY_CI_ACTION_ON_SYS_UPDATE_EXTRA_STRING = "ci_action_on_sys_update_extra_string"; field public static final java.lang.String KEY_CI_ACTION_ON_SYS_UPDATE_EXTRA_VAL_STRING = "ci_action_on_sys_update_extra_val_string"; field public static final java.lang.String KEY_CI_ACTION_ON_SYS_UPDATE_INTENT_STRING = "ci_action_on_sys_update_intent_string"; + field public static final java.lang.String KEY_CONFIG_IMS_PACKAGE_OVERRIDE_STRING = "config_ims_package_override_string"; field public static final java.lang.String KEY_CSP_ENABLED_BOOL = "csp_enabled_bool"; field public static final java.lang.String KEY_DEFAULT_SIM_CALL_MANAGER_STRING = "default_sim_call_manager_string"; field public static final java.lang.String KEY_DISABLE_CDMA_ACTIVATION_CODE_BOOL = "disable_cdma_activation_code_bool"; diff --git a/api/system-current.txt b/api/system-current.txt index baf5d51335df..1c04a969c630 100644 --- a/api/system-current.txt +++ b/api/system-current.txt @@ -36,6 +36,7 @@ package android { field public static final java.lang.String BIND_DEVICE_ADMIN = "android.permission.BIND_DEVICE_ADMIN"; field public static final java.lang.String BIND_DIRECTORY_SEARCH = "android.permission.BIND_DIRECTORY_SEARCH"; field public static final java.lang.String BIND_DREAM_SERVICE = "android.permission.BIND_DREAM_SERVICE"; + field public static final java.lang.String BIND_IMS_SERVICE = "android.permission.BIND_IMS_SERVICE"; field public static final java.lang.String BIND_INCALL_SERVICE = "android.permission.BIND_INCALL_SERVICE"; field public static final java.lang.String BIND_INPUT_METHOD = "android.permission.BIND_INPUT_METHOD"; field public static final java.lang.String BIND_KEYGUARD_APPWIDGET = "android.permission.BIND_KEYGUARD_APPWIDGET"; @@ -40259,6 +40260,7 @@ package android.telephony { field public static final java.lang.String KEY_CI_ACTION_ON_SYS_UPDATE_EXTRA_STRING = "ci_action_on_sys_update_extra_string"; field public static final java.lang.String KEY_CI_ACTION_ON_SYS_UPDATE_EXTRA_VAL_STRING = "ci_action_on_sys_update_extra_val_string"; field public static final java.lang.String KEY_CI_ACTION_ON_SYS_UPDATE_INTENT_STRING = "ci_action_on_sys_update_intent_string"; + field public static final java.lang.String KEY_CONFIG_IMS_PACKAGE_OVERRIDE_STRING = "config_ims_package_override_string"; field public static final java.lang.String KEY_CSP_ENABLED_BOOL = "csp_enabled_bool"; field public static final java.lang.String KEY_DEFAULT_SIM_CALL_MANAGER_STRING = "default_sim_call_manager_string"; field public static final java.lang.String KEY_DISABLE_CDMA_ACTIVATION_CODE_BOOL = "disable_cdma_activation_code_bool"; @@ -41136,6 +41138,15 @@ package android.telephony.gsm { } +package android.telephony.ims { + + public class ImsServiceBase extends android.app.Service { + ctor public ImsServiceBase(); + method public android.os.IBinder onBind(android.content.Intent); + } + +} + package android.test { public abstract deprecated class ActivityInstrumentationTestCase<T extends android.app.Activity> extends android.test.ActivityTestCase { diff --git a/api/test-current.txt b/api/test-current.txt index 87ebde59e78b..4b088e10e7e3 100644 --- a/api/test-current.txt +++ b/api/test-current.txt @@ -37172,6 +37172,7 @@ package android.telephony { field public static final java.lang.String KEY_CI_ACTION_ON_SYS_UPDATE_EXTRA_STRING = "ci_action_on_sys_update_extra_string"; field public static final java.lang.String KEY_CI_ACTION_ON_SYS_UPDATE_EXTRA_VAL_STRING = "ci_action_on_sys_update_extra_val_string"; field public static final java.lang.String KEY_CI_ACTION_ON_SYS_UPDATE_INTENT_STRING = "ci_action_on_sys_update_intent_string"; + field public static final java.lang.String KEY_CONFIG_IMS_PACKAGE_OVERRIDE_STRING = "config_ims_package_override_string"; field public static final java.lang.String KEY_CSP_ENABLED_BOOL = "csp_enabled_bool"; field public static final java.lang.String KEY_DEFAULT_SIM_CALL_MANAGER_STRING = "default_sim_call_manager_string"; field public static final java.lang.String KEY_DISABLE_CDMA_ACTIVATION_CODE_BOOL = "disable_cdma_activation_code_bool"; diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml index 790b0f6e817f..7d4f99db56c8 100644 --- a/core/res/AndroidManifest.xml +++ b/core/res/AndroidManifest.xml @@ -1576,6 +1576,16 @@ <permission android:name="android.permission.RECEIVE_STK_COMMANDS" android:protectionLevel="signature|privileged" /> + <!-- Must be required by an ImsService to ensure that only the + system can bind to it. + <p>Protection level: signature|privileged + @SystemApi + @hide + --> + <permission android:name="android.permission.BIND_IMS_SERVICE" + android:protectionLevel="signature|privileged" /> + + <!-- ================================== --> <!-- Permissions for sdcard interaction --> <!-- ================================== --> diff --git a/telephony/java/android/telephony/CarrierConfigManager.java b/telephony/java/android/telephony/CarrierConfigManager.java index 69f91331c31c..d7cd07a3bd32 100644 --- a/telephony/java/android/telephony/CarrierConfigManager.java +++ b/telephony/java/android/telephony/CarrierConfigManager.java @@ -238,6 +238,12 @@ public class CarrierConfigManager { KEY_GSM_NONROAMING_NETWORKS_STRING_ARRAY = "gsm_nonroaming_networks_string_array"; /** + * Override the device's configuration for the ImsService to use for this SIM card. + */ + public static final String KEY_CONFIG_IMS_PACKAGE_OVERRIDE_STRING = + "config_ims_package_override_string"; + + /** * Override the platform's notion of a network operator being considered roaming. * Value is string array of SIDs to be considered roaming for 3GPP2 RATs. */ @@ -1215,6 +1221,7 @@ public class CarrierConfigManager { }); sDefaults.putStringArray(KEY_GSM_ROAMING_NETWORKS_STRING_ARRAY, null); sDefaults.putStringArray(KEY_GSM_NONROAMING_NETWORKS_STRING_ARRAY, null); + sDefaults.putString(KEY_CONFIG_IMS_PACKAGE_OVERRIDE_STRING, null); sDefaults.putStringArray(KEY_CDMA_ROAMING_NETWORKS_STRING_ARRAY, null); sDefaults.putStringArray(KEY_CDMA_NONROAMING_NETWORKS_STRING_ARRAY, null); sDefaults.putStringArray(KEY_DIAL_STRING_REPLACE_STRING_ARRAY, null); diff --git a/telephony/java/android/telephony/ims/ImsServiceBase.java b/telephony/java/android/telephony/ims/ImsServiceBase.java new file mode 100644 index 000000000000..0b50ecaeb1ca --- /dev/null +++ b/telephony/java/android/telephony/ims/ImsServiceBase.java @@ -0,0 +1,35 @@ +/* + * Copyright (C) 2017 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 may 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 + */ + +package android.telephony.ims; + +import android.annotation.SystemApi; +import android.app.Service; +import android.content.Intent; +import android.os.IBinder; + +/** + * Base ImsService Implementation, which is used by the ImsResolver to bind. + * @hide + */ +@SystemApi +public class ImsServiceBase extends Service { + + @Override + public IBinder onBind(Intent intent) { + return null; + } +} diff --git a/telephony/java/android/telephony/ims/feature/ImsFeature.java b/telephony/java/android/telephony/ims/feature/ImsFeature.java new file mode 100644 index 000000000000..0509d604e688 --- /dev/null +++ b/telephony/java/android/telephony/ims/feature/ImsFeature.java @@ -0,0 +1,33 @@ +/* + * Copyright (C) 2017 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 may 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 + */ + +package android.telephony.ims.feature; + +/** + * Base class for all IMS features that are supported by the framework. + * @hide + */ +public class ImsFeature { + + // Invalid feature value + public static final int INVALID = -1; + // ImsFeatures that are defined in the Manifests + public static final int EMERGENCY_MMTEL = 0; + public static final int MMTEL = 1; + public static final int RCS = 2; + // Total number of features defined + public static final int MAX = 3; +} diff --git a/telephony/java/com/android/ims/internal/IImsServiceController.aidl b/telephony/java/com/android/ims/internal/IImsServiceController.aidl new file mode 100644 index 000000000000..fa86a43c79d3 --- /dev/null +++ b/telephony/java/com/android/ims/internal/IImsServiceController.aidl @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2017 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 may 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. + */ + +package com.android.ims.internal; + +/** + * {@hide} + */ +interface IImsServiceController { + void createImsFeature(int slotId, int feature); + void removeImsFeature(int slotId, int feature); +} diff --git a/telephony/java/com/android/ims/internal/IImsServiceFeatureListener.aidl b/telephony/java/com/android/ims/internal/IImsServiceFeatureListener.aidl new file mode 100644 index 000000000000..0a36b6bec6a2 --- /dev/null +++ b/telephony/java/com/android/ims/internal/IImsServiceFeatureListener.aidl @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2017 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 may 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. + */ + +package com.android.ims.internal; + +/** + * {@hide} + */ +oneway interface IImsServiceFeatureListener { + void imsFeatureCreated(int slotId, int feature); + void imsFeatureRemoved(int slotId, int feature); +}
\ No newline at end of file |