@@ -191,25 +191,28 @@ private void enforceCarrierPrivilege() {
191191 private final class BinderService extends IMms .Stub {
192192 @ Override
193193 public void sendMessage (long subId , String callingPkg , byte [] pdu , String locationUrl ,
194- PendingIntent sentIntent ) throws RemoteException {
194+ ContentValues configOverrides , PendingIntent sentIntent ) throws RemoteException {
195195 mContext .enforceCallingPermission (Manifest .permission .SEND_SMS , "Send MMS message" );
196196 if (getAppOpsManager ().noteOp (AppOpsManager .OP_SEND_SMS , Binder .getCallingUid (),
197197 callingPkg ) != AppOpsManager .MODE_ALLOWED ) {
198198 return ;
199199 }
200- getServiceGuarded ().sendMessage (subId , callingPkg , pdu , locationUrl , sentIntent );
200+ getServiceGuarded ().sendMessage (subId , callingPkg , pdu , locationUrl , configOverrides ,
201+ sentIntent );
201202 }
202203
203204 @ Override
204205 public void downloadMessage (long subId , String callingPkg , String locationUrl ,
205- PendingIntent downloadedIntent ) throws RemoteException {
206+ ContentValues configOverrides , PendingIntent downloadedIntent )
207+ throws RemoteException {
206208 mContext .enforceCallingPermission (Manifest .permission .RECEIVE_MMS ,
207209 "Download MMS message" );
208210 if (getAppOpsManager ().noteOp (AppOpsManager .OP_RECEIVE_MMS , Binder .getCallingUid (),
209211 callingPkg ) != AppOpsManager .MODE_ALLOWED ) {
210212 return ;
211213 }
212- getServiceGuarded ().downloadMessage (subId , callingPkg , locationUrl , downloadedIntent );
214+ getServiceGuarded ().downloadMessage (subId , callingPkg , locationUrl , configOverrides ,
215+ downloadedIntent );
213216 }
214217
215218 @ Override
@@ -225,53 +228,21 @@ public void updateMmsDownloadStatus(int messageRef, byte[] pdu) throws RemoteExc
225228 }
226229
227230 @ Override
228- public boolean getCarrierConfigBoolean (String name , boolean defaultValue )
229- throws RemoteException {
230- return getServiceGuarded ().getCarrierConfigBoolean (name , defaultValue );
231- }
232-
233- @ Override
234- public int getCarrierConfigInt (String name , int defaultValue ) throws RemoteException {
235- return getServiceGuarded ().getCarrierConfigInt (name , defaultValue );
236- }
237-
238- @ Override
239- public String getCarrierConfigString (String name , String defaultValue )
240- throws RemoteException {
241- return getServiceGuarded ().getCarrierConfigString (name , defaultValue );
242- }
243-
244- @ Override
245- public void setCarrierConfigBoolean (String callingPkg , String name , boolean value )
231+ public boolean getCarrierConfigBoolean (long subId , String name , boolean defaultValue )
246232 throws RemoteException {
247- mContext .enforceCallingPermission (Manifest .permission .SEND_SMS , "Set MMS config" );
248- if (getAppOpsManager ().noteOp (AppOpsManager .OP_SEND_SMS , Binder .getCallingUid (),
249- callingPkg ) != AppOpsManager .MODE_ALLOWED ) {
250- return ;
251- }
252- getServiceGuarded ().setCarrierConfigBoolean (callingPkg , name , value );
233+ return getServiceGuarded ().getCarrierConfigBoolean (subId , name , defaultValue );
253234 }
254235
255236 @ Override
256- public void setCarrierConfigInt ( String callingPkg , String name , int value )
237+ public int getCarrierConfigInt ( long subId , String name , int defaultValue )
257238 throws RemoteException {
258- mContext .enforceCallingPermission (Manifest .permission .SEND_SMS , "Set MMS config" );
259- if (getAppOpsManager ().noteOp (AppOpsManager .OP_SEND_SMS , Binder .getCallingUid (),
260- callingPkg ) != AppOpsManager .MODE_ALLOWED ) {
261- return ;
262- }
263- getServiceGuarded ().setCarrierConfigInt (callingPkg , name , value );
239+ return getServiceGuarded ().getCarrierConfigInt (subId , name , defaultValue );
264240 }
265241
266242 @ Override
267- public void setCarrierConfigString ( String callingPkg , String name , String value )
243+ public String getCarrierConfigString ( long subId , String name , String defaultValue )
268244 throws RemoteException {
269- mContext .enforceCallingPermission (Manifest .permission .SEND_SMS , "Set MMS config" );
270- if (getAppOpsManager ().noteOp (AppOpsManager .OP_SEND_SMS , Binder .getCallingUid (),
271- callingPkg ) != AppOpsManager .MODE_ALLOWED ) {
272- return ;
273- }
274- getServiceGuarded ().setCarrierConfigString (callingPkg , name , value );
245+ return getServiceGuarded ().getCarrierConfigString (subId , name , defaultValue );
275246 }
276247
277248 @ Override
@@ -370,14 +341,15 @@ public Uri addMultimediaMessageDraft(String callingPkg, byte[] pdu) throws Remot
370341
371342 @ Override
372343 public void sendStoredMessage (long subId , String callingPkg , Uri messageUri ,
373- PendingIntent sentIntent ) throws RemoteException {
344+ ContentValues configOverrides , PendingIntent sentIntent ) throws RemoteException {
374345 mContext .enforceCallingPermission (Manifest .permission .SEND_SMS ,
375346 "Send stored MMS message" );
376347 if (getAppOpsManager ().noteOp (AppOpsManager .OP_SEND_SMS , Binder .getCallingUid (),
377348 callingPkg ) != AppOpsManager .MODE_ALLOWED ) {
378349 return ;
379350 }
380- getServiceGuarded ().sendStoredMessage (subId , callingPkg , messageUri , sentIntent );
351+ getServiceGuarded ().sendStoredMessage (subId , callingPkg , messageUri , configOverrides ,
352+ sentIntent );
381353 }
382354
383355 @ Override
0 commit comments