MIP2.0提供了一套安全机制以限制应用程序(Midlet)访问敏感函数,这套机制的基础是将Java API分级。motorola将提供的安全API分成受保护的API(protected API)和 限制访问的API(Restricted API)两大类。而Midlet又分成非信任应用(untrusted)和信任应用(trusted)两类,信任域又分成生产商域,运营商域和第三方域。对于受保护的API,所有应用都可以访问,但对于部分域的应用,会有警告弹出,只有用户同意继续了才可以使用。对于限制访问的API,则只有trusted应用才可以访问。具体参考下表: 生产商域 运营商域 第三方域 非信任域保护API 完全访问 完全访问 要求用户允许 要求用户允许限制的API 完全访问 完全访问 完全访问 不允许 下面是详细的API分类:
Table 1. API Access Matrix Restricted/Sensitive API/Function Untrusted Access Trusted Access Network: javax.microedition.io.Connector.http javax.microedition.io.Connector.https javax.microedition.io.Connector.datagram javax.microedition.io.Connector.datagramreceiver javax.microedition.io.Connector.socket javax.microedition.io.Connector.serversocket javax.microedition.io.Connector.ssl Yes (with consumer confirmation prompt) Yes Messaging: javax.microedition.io.Connector.sms javax.wireless.messaging.sms.send javax.wireless.messaging.sms.receive javax.microedition.io.Connector.cbs javax.wireless.messaging.cbs.receive javax.microedition.io.Connector.mms javax.wireless.messaging.mms.send javax.wireless.messaging.mms.receive Yes (with consumer confirmation prompt) Yes Push Registry: javax.microedition.io.PushRegistry Yes (with consumer confirmation prompt) Yes Connectivity: javax.microedition.io.Connector.comm javax.microedition.io.Connector.bluetooth.client javax.microedition.io.Connector.bluetooth.server javax.microedition.io.Connector.obex.client javax.microedition.io.Connector.obex.server Yes (with consumer confirmation prompt) Yes Multimedia Recording: javax.microedition.media.control.RecordControl javax.microedition.media.control.VideoControl.getSnapshot Yes (with consumer confirmation prompt) Yes User Data Read: javax.microedition.io.Connector.file.read javax.microedition.pim.ContactList.read javax.microedition.pim.EventList.read javax.microedition.pim.ToDoList.read No Yes User Data Write: javax.microedition.io.Connector.file.write javax.microedition.pim.ContactList.write javax.microedition.pim.EventList.write javax.microedition.pim.ToDoList.write No Yes Data Sharing: com.jblend.rms.share No Yes Location: javax.microedition.io.Connector.location javax.microedition.location.LandmarkStore.read javax.microedition.location.LandmarkStore.write javax.microedition.location.LandmarkStore.category javax.microedition.location.LandmarkStore.management javax.microedition.location.Location javax.microedition.location.ProximityListener javax.microedition.location.Orientation No Yes