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

Commit d72ad2ac authored by Amith Yamasani's avatar Amith Yamasani Committed by Android (Google) Code Review
Browse files

Merge "Fix a bug in appwidget migration to multiuser directory." into jb-dev

parents dd8412d4 e0eb39b5
Loading
Loading
Loading
Loading
+9 −9
Original line number Diff line number Diff line
@@ -1595,16 +1595,16 @@ class AppWidgetServiceImpl {
    AtomicFile savedStateFile() {
        File dir = new File("/data/system/users/" + mUserId);
        File settingsFile = getSettingsFile(mUserId);
        if (!settingsFile.exists() && mUserId == 0) {
            if (!dir.exists()) {
                dir.mkdirs();
            if (mUserId == 0) {
            }
            // Migrate old data
            File oldFile = new File("/data/system/" + SETTINGS_FILENAME);
            // Method doesn't throw an exception on failure. Ignore any errors
            // in moving the file (like non-existence)
            oldFile.renameTo(settingsFile);
        }
        }
        return new AtomicFile(settingsFile);
    }