File tree Expand file tree Collapse file tree 1 file changed +9
-9
lines changed
services/java/com/android/server Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -1595,15 +1595,15 @@ static File getSettingsFile(int userId) {
15951595 AtomicFile savedStateFile () {
15961596 File dir = new File ("/data/system/users/" + mUserId );
15971597 File settingsFile = getSettingsFile (mUserId );
1598- if (!dir .exists ()) {
1599- dir .mkdirs ();
1600- if ( mUserId == 0 ) {
1601- // Migrate old data
1602- File oldFile = new File ( "/data/system/" + SETTINGS_FILENAME );
1603- // Method doesn't throw an exception on failure. Ignore any errors
1604- // in moving the file (like non-existence)
1605- oldFile . renameTo ( settingsFile );
1606- }
1598+ if (!settingsFile .exists () && mUserId == 0 ) {
1599+ if (! dir .exists ()) {
1600+ dir . mkdirs ();
1601+ }
1602+ // Migrate old data
1603+ File oldFile = new File ( "/data/system/" + SETTINGS_FILENAME );
1604+ // Method doesn't throw an exception on failure. Ignore any errors
1605+ // in moving the file (like non-existence)
1606+ oldFile . renameTo ( settingsFile );
16071607 }
16081608 return new AtomicFile (settingsFile );
16091609 }
You can’t perform that action at this time.
0 commit comments