Merge "SMS service loads MMS config directly instead" am: 250a41a139 am: e93312767b
Change-Id: I654b7a4b46f7f0795c0e39d364392e247edb174f
This commit is contained in:
@@ -45097,7 +45097,7 @@ package android.telephony {
|
||||
method @Nullable public String createAppSpecificSmsTokenWithPackageInfo(@Nullable String, @NonNull android.app.PendingIntent);
|
||||
method public java.util.ArrayList<java.lang.String> divideMessage(String);
|
||||
method public void downloadMultimediaMessage(android.content.Context, String, android.net.Uri, android.os.Bundle, android.app.PendingIntent);
|
||||
method public android.os.Bundle getCarrierConfigValues();
|
||||
method @Nullable public android.os.Bundle getCarrierConfigValues();
|
||||
method public static android.telephony.SmsManager getDefault();
|
||||
method public static int getDefaultSmsSubscriptionId();
|
||||
method public static android.telephony.SmsManager getSmsManagerForSubscriptionId(int);
|
||||
|
||||
@@ -97,22 +97,4 @@ public class MmsManager {
|
||||
// Ignore it
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get carrier-dependent configuration values.
|
||||
*
|
||||
* @param subId the subscription id
|
||||
* @return bundle key/values pairs of configuration values
|
||||
*/
|
||||
public Bundle getCarrierConfigValues(int subId) {
|
||||
try {
|
||||
IMms iMms = IMms.Stub.asInterface(ServiceManager.getService("imms"));
|
||||
if (iMms != null) {
|
||||
return iMms.getCarrierConfigValues(subId);
|
||||
}
|
||||
} catch (RemoteException ex) {
|
||||
// ignore it
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -59,13 +59,6 @@ interface IMms {
|
||||
in Uri contentUri, in Bundle configOverrides,
|
||||
in PendingIntent downloadedIntent);
|
||||
|
||||
/**
|
||||
* Get carrier-dependent configuration values.
|
||||
*
|
||||
* @param subId the SIM id
|
||||
*/
|
||||
Bundle getCarrierConfigValues(int subId);
|
||||
|
||||
/**
|
||||
* Import a text message into system's SMS store
|
||||
*
|
||||
|
||||
@@ -136,11 +136,6 @@ public class MmsServiceBroker extends SystemService {
|
||||
returnPendingIntentWithError(downloadedIntent);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Bundle getCarrierConfigValues(int subId) throws RemoteException {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Uri importTextMessage(String callingPkg, String address, int type, String text,
|
||||
long timestampMillis, boolean seen, boolean read) throws RemoteException {
|
||||
@@ -369,12 +364,6 @@ public class MmsServiceBroker extends SystemService {
|
||||
configOverrides, downloadedIntent);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Bundle getCarrierConfigValues(int subId) throws RemoteException {
|
||||
Slog.d(TAG, "getCarrierConfigValues() by " + getCallingPackageName());
|
||||
return getServiceGuarded().getCarrierConfigValues(subId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Uri importTextMessage(String callingPkg, String address, int type, String text,
|
||||
long timestampMillis, boolean seen, boolean read) throws RemoteException {
|
||||
|
||||
@@ -31,8 +31,6 @@ import android.content.Context;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.database.CursorWindow;
|
||||
import android.net.Uri;
|
||||
import android.os.Binder;
|
||||
import android.os.BaseBundle;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.os.RemoteException;
|
||||
@@ -2420,22 +2418,31 @@ public final class SmsManager {
|
||||
public static final String MESSAGE_STATUS_READ = "read";
|
||||
|
||||
/**
|
||||
* Get carrier-dependent configuration values.
|
||||
* Get carrier-dependent MMS configuration values.
|
||||
*
|
||||
* <p class="note"><strong>Note:</strong> This method is intended for internal use by carrier
|
||||
* applications or the Telephony framework and will never trigger an SMS disambiguation
|
||||
* dialog. If this method is called on a device that has multiple active subscriptions, this
|
||||
* {@link SmsManager} instance has been created with {@link #getDefault()}, and no user-defined
|
||||
* default subscription is defined, the subscription ID associated with this message will be
|
||||
* INVALID, which will result in the operation being completed on the subscription associated
|
||||
* with logical slot 0. Use {@link #getSmsManagerForSubscriptionId(int)} to ensure the
|
||||
* operation is performed on the correct subscription.
|
||||
* applications or the Telephony framework and will never trigger an SMS disambiguation dialog.
|
||||
* If this method is called on a device that has multiple active subscriptions, this {@link
|
||||
* SmsManager} instance has been created with {@link #getDefault()}, and no user-defined default
|
||||
* subscription is defined, the subscription ID associated with this message will be INVALID,
|
||||
* which will result in the operation being completed on the subscription associated with
|
||||
* logical slot 0. Use {@link #getSmsManagerForSubscriptionId(int)} to ensure the operation is
|
||||
* performed on the correct subscription.
|
||||
* </p>
|
||||
*
|
||||
* @return bundle key/values pairs of configuration values
|
||||
* @return the bundle key/values pairs that contains MMS configuration values
|
||||
*/
|
||||
@Nullable
|
||||
public Bundle getCarrierConfigValues() {
|
||||
return MmsManager.getInstance().getCarrierConfigValues(getSubscriptionId());
|
||||
try {
|
||||
ISms iSms = getISmsService();
|
||||
if (iSms != null) {
|
||||
return iSms.getCarrierConfigValuesForSubscriber(getSubscriptionId());
|
||||
}
|
||||
} catch (RemoteException ex) {
|
||||
// ignore it
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
/*
|
||||
** Copyright 2007, 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.
|
||||
*/
|
||||
* Copyright 2007, 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.internal.telephony;
|
||||
|
||||
@@ -22,7 +22,7 @@ import android.os.Bundle;
|
||||
import com.android.internal.telephony.SmsRawData;
|
||||
|
||||
/**
|
||||
* Interface for applications to access the ICC phone book.
|
||||
* Service interface to handle SMS API requests
|
||||
*
|
||||
* See also SmsManager.java.
|
||||
*/
|
||||
@@ -541,6 +541,13 @@ interface ISms {
|
||||
String scAddress, in List<PendingIntent> sentIntents,
|
||||
in List<PendingIntent> deliveryIntents);
|
||||
|
||||
/**
|
||||
* Get carrier-dependent configuration values.
|
||||
*
|
||||
* @param subId the subscription Id
|
||||
*/
|
||||
Bundle getCarrierConfigValuesForSubscriber(int subId);
|
||||
|
||||
/**
|
||||
* Create an app-only incoming SMS request for the calling package.
|
||||
*
|
||||
|
||||
@@ -185,6 +185,11 @@ public class ISmsImplBase extends ISms.Stub {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Bundle getCarrierConfigValuesForSubscriber(int subId) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String createAppSpecificSmsToken(int subId, String callingPkg, PendingIntent intent) {
|
||||
throw new UnsupportedOperationException();
|
||||
|
||||
Reference in New Issue
Block a user