Skip to content
Commit ccc5fc0e authored by Philip P. Moltmann's avatar Philip P. Moltmann
Browse files

Allow disk writes on main thread in SharedPrefs

waitToFinish is called when the main thread enters the stopped state. At
this time we need to make sure to flush all shared preferences to the disk.

Usually this is not problem as they were asyncronously persisted. In
rare circumstances it can happen that the shared preferences are not
flushed yet.

Disk writes on main thread are quicker then waiting for the background
thread to do the write for this thread. Hence it is ok to write on the
main thread here.

Test: android.content.cts.SharedPreferencesTest
Change-Id: Ice8c0425a60005d1e4b150fa74e55e753dead6b8
parent 4d7094dc
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment