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

Commit 75962baf authored by Alexander Dorokhine's avatar Alexander Dorokhine
Browse files

Move from getDataUserCePackageDirectory to getDataSystemCeDirectory.

The other folder doesn't seem to work for non-primary users.

Bug: 177685938
Test: Presubmit
Change-Id: I31cd3a9b98d3205bb06c3339404a176b8c2fe6c5
parent 89ff2a8a
Loading
Loading
Loading
Loading
+1 −6
Original line number Diff line number Diff line
@@ -25,7 +25,6 @@ import android.content.Context;
import android.content.pm.PackageManager;
import android.os.Environment;
import android.os.UserHandle;
import android.os.storage.StorageManager;
import android.util.SparseArray;

import com.android.internal.R;
@@ -130,11 +129,7 @@ public final class ImplInstanceManager {

    private static File getAppSearchDir(@NonNull Context context, @UserIdInt int userId) {
        // See com.android.internal.app.ChooserActivity::getPinnedSharedPrefs
        //TODO(b/177685938):Switch from getDataUserCePackageDirectory to getDataSystemCeDirectory
        File userCeDir =
                Environment.getDataUserCePackageDirectory(
                        StorageManager.UUID_PRIVATE_INTERNAL, userId, context.getPackageName());
        return new File(userCeDir, APP_SEARCH_DIR);
        return new File(Environment.getDataSystemCeDirectory(userId), APP_SEARCH_DIR);
    }

    /**