diff options
| author | 2021-11-22 11:33:27 +0900 | |
|---|---|---|
| committer | 2021-12-09 11:22:52 -0800 | |
| commit | 2b97ecdc5a14dd523f6bc1984bc04391f5626c1e (patch) | |
| tree | 920fc67cc80b057fba5c9cd2ebb58a84e0dacbee | |
| parent | 4cbb58587a8d0ae6cc59a37f2251f6a2ec4bc8d2 (diff) | |
Migrate legacy obb only if first api level < 29
Since a device whose first api >= 29 doesn't have legacy obb,
migrate it only if first api level < 29 to reduce unnecessary calls.
Bug: 204097684
Test: compile & verify basic functions working
Change-Id: I6899604717ceb3286402db48455ec5cf43b3500a
| -rw-r--r-- | services/core/java/com/android/server/StorageManagerService.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/services/core/java/com/android/server/StorageManagerService.java b/services/core/java/com/android/server/StorageManagerService.java index c7f4b4d03648..780afd86b373 100644 --- a/services/core/java/com/android/server/StorageManagerService.java +++ b/services/core/java/com/android/server/StorageManagerService.java @@ -80,6 +80,7 @@ import android.content.res.ObbInfo; import android.database.ContentObserver; import android.net.Uri; import android.os.Binder; +import android.os.Build; import android.os.DropBoxManager; import android.os.Environment; import android.os.Handler; @@ -1648,7 +1649,8 @@ class StorageManagerService extends IStorageManager.Stub // obb data to its new location. This may take time depending on the size of // the data to be copied so it's done on the StorageManager worker thread. // This needs to be finished before start mounting obb directories. - if (userId == 0) { + if (userId == 0 + && Build.VERSION.DEVICE_INITIAL_SDK_INT < Build.VERSION_CODES.Q) { mPmInternal.migrateLegacyObbData(); } |