Loading services/java/com/android/server/MountService.java +15 −3 Original line number Original line Diff line number Diff line Loading @@ -29,6 +29,8 @@ import android.os.storage.IMountServiceListener; import android.os.storage.IMountShutdownObserver; import android.os.storage.IMountShutdownObserver; import android.os.storage.StorageResultCode; import android.os.storage.StorageResultCode; import android.os.Handler; import android.os.Handler; import android.os.HandlerThread; import android.os.Looper; import android.os.Message; import android.os.Message; import android.os.RemoteException; import android.os.RemoteException; import android.os.IBinder; import android.os.IBinder; Loading Loading @@ -193,10 +195,14 @@ class MountService extends IMountService.Stub } } } } final private Handler mHandler = new Handler() { class MountServiceHandler extends Handler { ArrayList<UnmountCallBack> mForceUnmounts = new ArrayList<UnmountCallBack>(); ArrayList<UnmountCallBack> mForceUnmounts = new ArrayList<UnmountCallBack>(); boolean mRegistered = false; boolean mRegistered = false; MountServiceHandler(Looper l) { super(l); } void registerReceiver() { void registerReceiver() { mRegistered = true; mRegistered = true; mContext.registerReceiver(mPmReceiver, mPmFilter); mContext.registerReceiver(mPmReceiver, mPmFilter); Loading Loading @@ -287,6 +293,8 @@ class MountService extends IMountService.Stub } } } } }; }; final private HandlerThread mHandlerThread; final private Handler mHandler; private void waitForReady() { private void waitForReady() { while (mReady == false) { while (mReady == false) { Loading Loading @@ -850,6 +858,10 @@ class MountService extends IMountService.Stub mContext.registerReceiver(mBroadcastReceiver, mContext.registerReceiver(mBroadcastReceiver, new IntentFilter(Intent.ACTION_BOOT_COMPLETED), null, null); new IntentFilter(Intent.ACTION_BOOT_COMPLETED), null, null); mHandlerThread = new HandlerThread("MountService"); mHandlerThread.start(); mHandler = new MountServiceHandler(mHandlerThread.getLooper()); /* /* * Vold does not run in the simulator, so pretend the connector thread * Vold does not run in the simulator, so pretend the connector thread * ran and did its thing. * ran and did its thing. Loading Loading
services/java/com/android/server/MountService.java +15 −3 Original line number Original line Diff line number Diff line Loading @@ -29,6 +29,8 @@ import android.os.storage.IMountServiceListener; import android.os.storage.IMountShutdownObserver; import android.os.storage.IMountShutdownObserver; import android.os.storage.StorageResultCode; import android.os.storage.StorageResultCode; import android.os.Handler; import android.os.Handler; import android.os.HandlerThread; import android.os.Looper; import android.os.Message; import android.os.Message; import android.os.RemoteException; import android.os.RemoteException; import android.os.IBinder; import android.os.IBinder; Loading Loading @@ -193,10 +195,14 @@ class MountService extends IMountService.Stub } } } } final private Handler mHandler = new Handler() { class MountServiceHandler extends Handler { ArrayList<UnmountCallBack> mForceUnmounts = new ArrayList<UnmountCallBack>(); ArrayList<UnmountCallBack> mForceUnmounts = new ArrayList<UnmountCallBack>(); boolean mRegistered = false; boolean mRegistered = false; MountServiceHandler(Looper l) { super(l); } void registerReceiver() { void registerReceiver() { mRegistered = true; mRegistered = true; mContext.registerReceiver(mPmReceiver, mPmFilter); mContext.registerReceiver(mPmReceiver, mPmFilter); Loading Loading @@ -287,6 +293,8 @@ class MountService extends IMountService.Stub } } } } }; }; final private HandlerThread mHandlerThread; final private Handler mHandler; private void waitForReady() { private void waitForReady() { while (mReady == false) { while (mReady == false) { Loading Loading @@ -850,6 +858,10 @@ class MountService extends IMountService.Stub mContext.registerReceiver(mBroadcastReceiver, mContext.registerReceiver(mBroadcastReceiver, new IntentFilter(Intent.ACTION_BOOT_COMPLETED), null, null); new IntentFilter(Intent.ACTION_BOOT_COMPLETED), null, null); mHandlerThread = new HandlerThread("MountService"); mHandlerThread.start(); mHandler = new MountServiceHandler(mHandlerThread.getLooper()); /* /* * Vold does not run in the simulator, so pretend the connector thread * Vold does not run in the simulator, so pretend the connector thread * ran and did its thing. * ran and did its thing. Loading