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

Commit a8cac82c authored by Beatrice Marchegiani's avatar Beatrice Marchegiani
Browse files

Fix NPE when reading the allowlist

Bug: 351750747
Test: atest -v TarBackupReaderTest, manual test
Flag: EXEMPT bugfix
Change-Id: Icf4fe058e7d261c197e04ccad940595413bd4a99
parent e1d1b025
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -792,10 +792,11 @@ public class TarBackupReader {
    }

    private String getVToUAllowlist(Context context, int userId) {
        return Settings.Secure.getStringForUser(
         String allowlist = Settings.Secure.getStringForUser(
                context.getContentResolver(),
                Settings.Secure.V_TO_U_RESTORE_ALLOWLIST,
                userId);
         return (allowlist == null) ? "" : allowlist;
    }

    private static long extractRadix(byte[] data, int offset, int maxChars, int radix)