void function ( final Context arg0 ) { new AsyncTask < Void , Void , Void > ( ) { @ Override protected Void doInBackground ( Void ... arg1 ) { arg0 . getSharedPreferences ( PREFERENCES_NAME , 0 ) . edit ( ) ; return null ; } } . executeOnExecutor ( AsyncTask . THREAD_POOL_EXECUTOR ) ; }
loads the sharedpreferences in the background . sharedpreferences #edit blocks until the preferences are loaded from disk . this results in a strictmode violation as this may be called from the ui thread . this loads the preferences in the background to hopefully avoid the violation if the next edit call happens once the preferences are loaded . concode_field_sep String LAST_REQUEST concode_elem_sep long mLastPrerenderRequestMs concode_elem_sep long MAX_DELAY concode_elem_sep SparseArray<RequestThrottler> sUidToThrottler concode_elem_sep float mScore concode_elem_sep String SCORE concode_elem_sep float ALPHA concode_elem_sep String mUrl concode_elem_sep long MIN_DELAY concode_elem_sep long FORGET_AFTER_MS concode_elem_sep long mLastRequestMs concode_elem_sep long mBannedUntilMs concode_elem_sep String PREFERENCES_NAME concode_elem_sep int mUid concode_elem_sep SharedPreferences mSharedPreferences concode_elem_sep long BAN_DURATION_MS concode_elem_sep float MAX_SCORE concode_elem_sep long mDelayMs concode_elem_sep String BANNED_UNTIL concode_field_sep void registerSuccess concode_elem_sep boolean updateStatsAndReturnWhetherAllowed concode_elem_sep void purgeOldEntries concode_elem_sep void updateBan concode_elem_sep void purgeAllEntriesForTesting concode_elem_sep void reset concode_elem_sep boolean isPrerenderingAllowed concode_elem_sep RequestThrottler getForUid concode_elem_sep void registerPrerenderRequest concode_elem_sep void ban