• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2008 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 package com.android.internal.telephony;
18 
19 import android.app.PendingIntent;
20 import android.os.ServiceManager;
21 
22 import java.util.List;
23 
24 public class IccSmsInterfaceManagerProxy extends ISms.Stub {
25     private IccSmsInterfaceManager mIccSmsInterfaceManager;
26 
IccSmsInterfaceManagerProxy(IccSmsInterfaceManager iccSmsInterfaceManager)27     public IccSmsInterfaceManagerProxy(IccSmsInterfaceManager
28             iccSmsInterfaceManager) {
29         this.mIccSmsInterfaceManager = iccSmsInterfaceManager;
30         if(ServiceManager.getService("isms") == null) {
31             ServiceManager.addService("isms", this);
32         }
33     }
34 
setmIccSmsInterfaceManager(IccSmsInterfaceManager iccSmsInterfaceManager)35     public void setmIccSmsInterfaceManager(IccSmsInterfaceManager iccSmsInterfaceManager) {
36         this.mIccSmsInterfaceManager = iccSmsInterfaceManager;
37     }
38 
39     public boolean
updateMessageOnIccEf(int index, int status, byte[] pdu)40     updateMessageOnIccEf(int index, int status, byte[] pdu) throws android.os.RemoteException {
41          return mIccSmsInterfaceManager.updateMessageOnIccEf(index, status, pdu);
42     }
43 
copyMessageToIccEf(int status, byte[] pdu, byte[] smsc)44     public boolean copyMessageToIccEf(int status, byte[] pdu,
45             byte[] smsc) throws android.os.RemoteException {
46         return mIccSmsInterfaceManager.copyMessageToIccEf(status, pdu, smsc);
47     }
48 
getAllMessagesFromIccEf()49     public List<SmsRawData> getAllMessagesFromIccEf() throws android.os.RemoteException {
50         return mIccSmsInterfaceManager.getAllMessagesFromIccEf();
51     }
52 
sendData(String destAddr, String scAddr, int destPort, byte[] data, PendingIntent sentIntent, PendingIntent deliveryIntent)53     public void sendData(String destAddr, String scAddr, int destPort,
54             byte[] data, PendingIntent sentIntent, PendingIntent deliveryIntent) {
55         mIccSmsInterfaceManager.sendData(destAddr, scAddr, destPort, data,
56                 sentIntent, deliveryIntent);
57     }
58 
sendText(String destAddr, String scAddr, String text, PendingIntent sentIntent, PendingIntent deliveryIntent)59     public void sendText(String destAddr, String scAddr,
60             String text, PendingIntent sentIntent, PendingIntent deliveryIntent) {
61         mIccSmsInterfaceManager.sendText(destAddr, scAddr, text, sentIntent, deliveryIntent);
62     }
63 
sendMultipartText(String destAddr, String scAddr, List<String> parts, List<PendingIntent> sentIntents, List<PendingIntent> deliveryIntents)64     public void sendMultipartText(String destAddr, String scAddr,
65             List<String> parts, List<PendingIntent> sentIntents,
66             List<PendingIntent> deliveryIntents) throws android.os.RemoteException {
67         mIccSmsInterfaceManager.sendMultipartText(destAddr, scAddr,
68                 parts, sentIntents, deliveryIntents);
69     }
70 
enableCellBroadcast(int messageIdentifier)71     public boolean enableCellBroadcast(int messageIdentifier) throws android.os.RemoteException {
72         return mIccSmsInterfaceManager.enableCellBroadcast(messageIdentifier);
73     }
74 
disableCellBroadcast(int messageIdentifier)75     public boolean disableCellBroadcast(int messageIdentifier) throws android.os.RemoteException {
76         return mIccSmsInterfaceManager.disableCellBroadcast(messageIdentifier);
77     }
78 
enableCellBroadcastRange(int startMessageId, int endMessageId)79     public boolean enableCellBroadcastRange(int startMessageId, int endMessageId)
80             throws android.os.RemoteException {
81         return mIccSmsInterfaceManager.enableCellBroadcastRange(startMessageId, endMessageId);
82     }
83 
disableCellBroadcastRange(int startMessageId, int endMessageId)84     public boolean disableCellBroadcastRange(int startMessageId, int endMessageId)
85             throws android.os.RemoteException {
86         return mIccSmsInterfaceManager.disableCellBroadcastRange(startMessageId, endMessageId);
87     }
88 }
89