summaryrefslogtreecommitdiff
path: root/legacy
diff options
context:
space:
mode:
author Dipankar Bhardwaj <dipankarb@google.com> 2022-05-12 18:33:33 +0000
committer Dipankar Bhardwaj <dipankarb@google.com> 2022-05-18 07:41:56 +0000
commitffbad7bb6afdd6bc87abf6693176d77486450747 (patch)
tree03ddc54efd3cfbb2087b1ac5d7bb27033f2c71cd /legacy
parent9939c3b7ce28198a17f7edc6d6bf1704d135aed7 (diff)
Fix next row id backup for work profile and adoptable storage
With work profile, Media Provider process did not have the required permission(media_rw) to set xattr on /data/media/<user-id>. In this CL, we are making a change to set xattr on /data/media/0 for all user profiles by adding user id suffix to xattr keys. In case of user id reuse, it should work fine as next row id would not have been used previously. Also for devices with adoptable storage support, opting for adoptable storage will not delete /data/media/0 directory. Test: Manually on multiple user profiles and on adoptable storage Bug: 216743720 Change-Id: I710e95742b41e19822ed7f80a5930b860611b19d
Diffstat (limited to 'legacy')
-rw-r--r--legacy/src/com/android/providers/media/LegacyMediaProvider.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/legacy/src/com/android/providers/media/LegacyMediaProvider.java b/legacy/src/com/android/providers/media/LegacyMediaProvider.java
index d51414b6b..9951bc5ec 100644
--- a/legacy/src/com/android/providers/media/LegacyMediaProvider.java
+++ b/legacy/src/com/android/providers/media/LegacyMediaProvider.java
@@ -80,9 +80,9 @@ public class LegacyMediaProvider extends ContentProvider {
Logging.initPersistent(persistentDir);
mInternalDatabase = new DatabaseHelper(context, INTERNAL_DATABASE_NAME, false, true, null,
- null, null, null, null, null);
+ null, null, null, null, null, false);
mExternalDatabase = new DatabaseHelper(context, EXTERNAL_DATABASE_NAME, false, true, null,
- null, null, null, null, null);
+ null, null, null, null, null, false);
return true;
}