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

Commit cff69083 authored by Beatrice Marchegiani's avatar Beatrice Marchegiani Committed by Android Build Coastguard Worker
Browse files

Fix NPE when reading the allowlist

Bug: 351750747
Test: atest -v TarBackupReaderTest, manual test
Flag: EXEMPT bugfix
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:a8cac82ccdd9efdd88a62133e4eec9570d50b7f0)
Merged-In: Icf4fe058e7d261c197e04ccad940595413bd4a99
Change-Id: Icf4fe058e7d261c197e04ccad940595413bd4a99
parent 7fe57d25
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)