Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 76a40575 authored by Paul Lawrence's avatar Paul Lawrence
Browse files

Change vold cryptkeeper permissions to be more sensible

Bug: 35851488
Test: Check boots with default encryption and password encryption
Change-Id: I4afd07619369ef2b3ec86056e5c154823c73b5fd
parent 402a384a
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -2721,7 +2721,7 @@ class StorageManagerService extends IStorageManager.Stub
     */
    @Override
    public int getPasswordType() {
        mContext.enforceCallingOrSelfPermission(Manifest.permission.STORAGE_INTERNAL,
        mContext.enforceCallingOrSelfPermission(Manifest.permission.CRYPT_KEEPER,
            "no permission to access the crypt keeper");

        waitForReady();
@@ -2747,7 +2747,7 @@ class StorageManagerService extends IStorageManager.Stub
     */
    @Override
    public void setField(String field, String contents) throws RemoteException {
        mContext.enforceCallingOrSelfPermission(Manifest.permission.STORAGE_INTERNAL,
        mContext.enforceCallingOrSelfPermission(Manifest.permission.CRYPT_KEEPER,
            "no permission to access the crypt keeper");

        waitForReady();
@@ -2767,7 +2767,7 @@ class StorageManagerService extends IStorageManager.Stub
     */
    @Override
    public String getField(String field) throws RemoteException {
        mContext.enforceCallingOrSelfPermission(Manifest.permission.STORAGE_INTERNAL,
        mContext.enforceCallingOrSelfPermission(Manifest.permission.CRYPT_KEEPER,
            "no permission to access the crypt keeper");

        waitForReady();
@@ -2793,7 +2793,7 @@ class StorageManagerService extends IStorageManager.Stub
     */
    @Override
    public boolean isConvertibleToFBE() throws RemoteException {
        mContext.enforceCallingOrSelfPermission(Manifest.permission.STORAGE_INTERNAL,
        mContext.enforceCallingOrSelfPermission(Manifest.permission.CRYPT_KEEPER,
            "no permission to access the crypt keeper");

        waitForReady();
@@ -2809,7 +2809,7 @@ class StorageManagerService extends IStorageManager.Stub

    @Override
    public String getPassword() throws RemoteException {
        mContext.enforceCallingOrSelfPermission(Manifest.permission.STORAGE_INTERNAL,
        mContext.enforceCallingOrSelfPermission(Manifest.permission.CRYPT_KEEPER,
                "only keyguard can retrieve password");

        if (!isReady()) {
@@ -2834,7 +2834,7 @@ class StorageManagerService extends IStorageManager.Stub

    @Override
    public void clearPassword() throws RemoteException {
        mContext.enforceCallingOrSelfPermission(Manifest.permission.STORAGE_INTERNAL,
        mContext.enforceCallingOrSelfPermission(Manifest.permission.CRYPT_KEEPER,
                "only keyguard can clear password");

        if (!isReady()) {