Merge "Fix NPE when reading the allowlist" into main
diff --git a/services/backup/java/com/android/server/backup/utils/TarBackupReader.java b/services/backup/java/com/android/server/backup/utils/TarBackupReader.java
index 4860a27..8abbe56 100644
--- a/services/backup/java/com/android/server/backup/utils/TarBackupReader.java
+++ b/services/backup/java/com/android/server/backup/utils/TarBackupReader.java
@@ -792,10 +792,11 @@
}
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)