Android will be causing StrictMode violations in the future for getDefaultSharedPreferences as it's now cached per-context. There is always an initial StrictMode violation that is unavoidable due to the new check for ensurePrivateDirExists.
This change needs to go into M51.
See http://b/26979210 for more context.
Comment 1 by wnwen@chromium.org
, Mar 30 2016