資源簡介
Android 下通過反射調用加載/卸載(mount/unmount) 外置SD卡

代碼片段和文件信息
/*
?*?Copyright?(C)?2010?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.os.storage;
import?android.os.Binder;
import?android.os.IBinder;
import?android.os.IInterface;
import?android.os.Parcel;
import?android.os.Parcelable;
import?android.os.RemoteException;
import?android.os.storage.StorageVolume;
/**
?*?WARNING!?Update?IMountService.h?and?IMountService.cpp?if?you?change?this
?*?file.?In?particular?the?ordering?of?the?methods?below?must?match?the
?*?_TRANSACTION?enum?in?IMountService.cpp
?*
?*?@hide?-?Applications?should?use?android.os.storage.StorageManager?to?access
?*???????storage?functions.
?*/
public?interface?IMountService?extends?IInterface?{
????/**?Local-side?IPC?implementation?stub?class.?*/
????public?static?abstract?class?Stub?extends?Binder?implements?IMountService?{
????????private?static?class?Proxy?implements?IMountService?{
????????????private?final?IBinder?mRemote;
????????????Proxy(IBinder?remote)?{
????????????????mRemote?=?remote;
????????????}
????????????public?IBinder?asBinder()?{
????????????????return?mRemote;
????????????}
????????????public?String?getInterfaceDescriptor()?{
????????????????return?DEscriptOR;
????????????}
????????????/**
?????????????*?Registers?an?IMountServiceListener?for?receiving?async
?????????????*?notifications.
?????????????*/
????????????public?void?registerListener(IMountServiceListener?listener)?throws?RemoteException?{
????????????????Parcel?_data?=?Parcel.obtain();
????????????????Parcel?_reply?=?Parcel.obtain();
????????????????try?{
????????????????????_data.writeInterfaceToken(DEscriptOR);
????????????????????_data.writeStrongBinder((listener?!=?null???listener.asBinder()?:?null));
????????????????????mRemote.transact(Stub.TRANSACTION_registerListener?_data?_reply?0);
????????????????????_reply.readException();
????????????????}?finally?{
????????????????????_reply.recycle();
????????????????????_data.recycle();
????????????????}
????????????}
????????????/**
?????????????*?Unregisters?an?IMountServiceListener
?????????????*/
????????????public?void?unregisterListener(IMountServiceListener?listener)?throws?RemoteException?{
????????????????Parcel?_data?=?Parcel.obtain();
????????????????Parcel?_reply?=?Parcel.obtain();
????????????????try?{
????????????????????_data.writeInterfaceToken(DEscriptOR);
????????????????????_data.writeStrongBinder((listener?!=?null???listener.asBinder()?:?null));
????????????????????mRemote.tr
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件??????54648??2014-12-17?13:56??IMountService.java
?????文件???????6896??2014-12-17?13:58??StorageVolume.java
?????文件???????1441??2014-12-17?12:09??IMountServiceListener.aidl
?????文件???????1023??2014-12-17?12:09??IMountShutdownObserver.aidl
?????文件???????1124??2014-12-17?12:09??IObbActionListener.aidl
-----------?---------??----------?-----??----
????????????????65132????????????????????5
- 上一篇:JAVA五子棋游戲簡單人工智能算法
- 下一篇:java郵件發送Demo(完整)
評論
共有 條評論