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

Commit 2b97ecdc authored by Jeongsik Mun's avatar Jeongsik Mun Committed by Patrick Baumann
Browse files

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
parent 4cbb5858
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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();
                    }