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

Commit b09296db authored by Andrew Stadler's avatar Andrew Stadler
Browse files

Add missing filename remap to RenamingDelegatingContext

This makes ProviderTestCase2 work better by enabling code under test
to make calls to context.getDatabasePath().  Without this fix the call
throws an exception.

It would be reasonable (and useful) to backport this to donut, but I'm
not even building donut these days.
parent afed82bc
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -137,6 +137,11 @@ public class RenamingDelegatingContext extends ContextWrapper {
        }
    }
    
    @Override
    public File getDatabasePath(String name) {
        return mFileContext.getDatabasePath(renamedFileName(name));
    }

    @Override
    public String[] databaseList() {
        return mDatabaseNames.toArray(new String[]{});