Loading core/java/android/os/storage/IMountService.java +27 −0 Original line number Diff line number Diff line Loading @@ -758,6 +758,22 @@ public interface IMountService extends IInterface { return _result; } public boolean isConvertibleToFBE() throws RemoteException { Parcel _data = Parcel.obtain(); Parcel _reply = Parcel.obtain(); boolean _result; try { _data.writeInterfaceToken(DESCRIPTOR); mRemote.transact(Stub.TRANSACTION_isConvertibleToFBE, _data, _reply, 0); _reply.readException(); _result = _reply.readInt() != 0; } finally { _reply.recycle(); _data.recycle(); } return _result; } public StorageVolume[] getVolumeList(int uid, String packageName, int flags) throws RemoteException { Parcel _data = Parcel.obtain(); Loading Loading @@ -1349,6 +1365,8 @@ public interface IMountService extends IInterface { static final int TRANSACTION_isPerUserEncryptionEnabled = IBinder.FIRST_CALL_TRANSACTION + 64; static final int TRANSACTION_isConvertibleToFBE = IBinder.FIRST_CALL_TRANSACTION + 64; /** * Cast an IBinder object into an IMountService interface, generating a * proxy if needed. Loading Loading @@ -1744,6 +1762,13 @@ public interface IMountService extends IInterface { reply.writeString(contents); return true; } case TRANSACTION_isConvertibleToFBE: { data.enforceInterface(DESCRIPTOR); int resultCode = isConvertibleToFBE() ? 1 : 0; reply.writeNoException(); reply.writeInt(resultCode); return true; } case TRANSACTION_resizeSecureContainer: { data.enforceInterface(DESCRIPTOR); String id; Loading Loading @@ -2195,6 +2220,8 @@ public interface IMountService extends IInterface { */ public String getField(String field) throws RemoteException; public boolean isConvertibleToFBE() throws RemoteException; public int resizeSecureContainer(String id, int sizeMb, String key) throws RemoteException; /** Loading services/core/java/com/android/server/MountService.java +18 −0 Original line number Diff line number Diff line Loading @@ -2597,6 +2597,24 @@ class MountService extends IMountService.Stub } } /** * Is userdata convertible to file based encryption? * @return non zero for convertible */ @Override public boolean isConvertibleToFBE() throws RemoteException { waitForReady(); final NativeDaemonEvent event; try { event = mCryptConnector.execute("cryptfs", "isConvertibleToFBE"); return Integer.parseInt(event.getMessage()) != 0; } catch (NativeDaemonConnectorException e) { throw e.rethrowAsParcelableException(); } } @Override public String getPassword() throws RemoteException { mContext.enforceCallingOrSelfPermission(Manifest.permission.ACCESS_KEYGUARD_SECURE_STORAGE, Loading Loading
core/java/android/os/storage/IMountService.java +27 −0 Original line number Diff line number Diff line Loading @@ -758,6 +758,22 @@ public interface IMountService extends IInterface { return _result; } public boolean isConvertibleToFBE() throws RemoteException { Parcel _data = Parcel.obtain(); Parcel _reply = Parcel.obtain(); boolean _result; try { _data.writeInterfaceToken(DESCRIPTOR); mRemote.transact(Stub.TRANSACTION_isConvertibleToFBE, _data, _reply, 0); _reply.readException(); _result = _reply.readInt() != 0; } finally { _reply.recycle(); _data.recycle(); } return _result; } public StorageVolume[] getVolumeList(int uid, String packageName, int flags) throws RemoteException { Parcel _data = Parcel.obtain(); Loading Loading @@ -1349,6 +1365,8 @@ public interface IMountService extends IInterface { static final int TRANSACTION_isPerUserEncryptionEnabled = IBinder.FIRST_CALL_TRANSACTION + 64; static final int TRANSACTION_isConvertibleToFBE = IBinder.FIRST_CALL_TRANSACTION + 64; /** * Cast an IBinder object into an IMountService interface, generating a * proxy if needed. Loading Loading @@ -1744,6 +1762,13 @@ public interface IMountService extends IInterface { reply.writeString(contents); return true; } case TRANSACTION_isConvertibleToFBE: { data.enforceInterface(DESCRIPTOR); int resultCode = isConvertibleToFBE() ? 1 : 0; reply.writeNoException(); reply.writeInt(resultCode); return true; } case TRANSACTION_resizeSecureContainer: { data.enforceInterface(DESCRIPTOR); String id; Loading Loading @@ -2195,6 +2220,8 @@ public interface IMountService extends IInterface { */ public String getField(String field) throws RemoteException; public boolean isConvertibleToFBE() throws RemoteException; public int resizeSecureContainer(String id, int sizeMb, String key) throws RemoteException; /** Loading
services/core/java/com/android/server/MountService.java +18 −0 Original line number Diff line number Diff line Loading @@ -2597,6 +2597,24 @@ class MountService extends IMountService.Stub } } /** * Is userdata convertible to file based encryption? * @return non zero for convertible */ @Override public boolean isConvertibleToFBE() throws RemoteException { waitForReady(); final NativeDaemonEvent event; try { event = mCryptConnector.execute("cryptfs", "isConvertibleToFBE"); return Integer.parseInt(event.getMessage()) != 0; } catch (NativeDaemonConnectorException e) { throw e.rethrowAsParcelableException(); } } @Override public String getPassword() throws RemoteException { mContext.enforceCallingOrSelfPermission(Manifest.permission.ACCESS_KEYGUARD_SECURE_STORAGE, Loading