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

Commit 75aa2493 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Add more explicit exceptions in FakeSettingsProvider." into main

parents 30349e41 7ad20c22
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -153,6 +153,14 @@ public class FakeSettingsProvider extends MockContentProvider {
        String value;
        final int userId = getUserId(table, extras);

        if (!mDb.containsKey(table)) {
            throw new UnsupportedOperationException("Unknown settings table, method=" + method);
        }

        if (arg == null) {
            throw new UnsupportedOperationException("Null settings key, method=" + method);
        }

        switch (op) {
            case "GET":
                value = mDb.get(table).getOrDefault(userId, EMPTY_MAP).get(arg);