Loading core/java/com/android/internal/app/UsbStorageActivity.java +11 −4 Original line number Diff line number Diff line Loading @@ -24,7 +24,9 @@ import android.content.Intent; import android.content.IntentFilter; import android.os.Bundle; import android.os.Handler; import android.os.Environment; import android.os.IMountService; import android.os.MountServiceResultCode; import android.os.Message; import android.os.RemoteException; import android.os.ServiceManager; Loading Loading @@ -116,7 +118,8 @@ public class UsbStorageActivity extends Activity { IMountService mountService = IMountService.Stub.asInterface(ServiceManager .getService("mount")); if (mountService != null) { umsOn = mountService.getMassStorageEnabled(); umsOn = mountService.getVolumeShared( Environment.getExternalStorageDirectory().getPath(), "ums"); } } catch (android.os.RemoteException exc) { // pass Loading @@ -140,10 +143,13 @@ public class UsbStorageActivity extends Activity { } try { mountService.setMassStorageEnabled(true); if (mountService.shareVolume( Environment.getExternalStorageDirectory().getPath(), "ums") != MountServiceResultCode.OperationSucceeded) { showSharingError(); } } catch (RemoteException e) { showSharingError(); return; } } Loading @@ -156,7 +162,8 @@ public class UsbStorageActivity extends Activity { } try { mountService.setMassStorageEnabled(false); mountService.unshareVolume( Environment.getExternalStorageDirectory().getPath(), "ums"); } catch (RemoteException e) { showStoppingError(); return; Loading Loading
core/java/com/android/internal/app/UsbStorageActivity.java +11 −4 Original line number Diff line number Diff line Loading @@ -24,7 +24,9 @@ import android.content.Intent; import android.content.IntentFilter; import android.os.Bundle; import android.os.Handler; import android.os.Environment; import android.os.IMountService; import android.os.MountServiceResultCode; import android.os.Message; import android.os.RemoteException; import android.os.ServiceManager; Loading Loading @@ -116,7 +118,8 @@ public class UsbStorageActivity extends Activity { IMountService mountService = IMountService.Stub.asInterface(ServiceManager .getService("mount")); if (mountService != null) { umsOn = mountService.getMassStorageEnabled(); umsOn = mountService.getVolumeShared( Environment.getExternalStorageDirectory().getPath(), "ums"); } } catch (android.os.RemoteException exc) { // pass Loading @@ -140,10 +143,13 @@ public class UsbStorageActivity extends Activity { } try { mountService.setMassStorageEnabled(true); if (mountService.shareVolume( Environment.getExternalStorageDirectory().getPath(), "ums") != MountServiceResultCode.OperationSucceeded) { showSharingError(); } } catch (RemoteException e) { showSharingError(); return; } } Loading @@ -156,7 +162,8 @@ public class UsbStorageActivity extends Activity { } try { mountService.setMassStorageEnabled(false); mountService.unshareVolume( Environment.getExternalStorageDirectory().getPath(), "ums"); } catch (RemoteException e) { showStoppingError(); return; Loading