Loading core/java/android/app/PropertyInvalidatedCache.java +11 −2 Original line number Diff line number Diff line Loading @@ -29,6 +29,7 @@ import android.text.TextUtils; import android.util.Log; import com.android.internal.annotations.GuardedBy; import com.android.internal.os.BackgroundThread; import com.android.internal.util.FastPrintWriter; import java.lang.annotation.Retention; Loading Loading @@ -1260,7 +1261,7 @@ public class PropertyInvalidatedCache<Query, Result> { } public void autoCork() { if (Looper.getMainLooper() == null) { if (getLooper() == null) { // We're not ready to auto-cork yet, so just invalidate the cache immediately. if (DEBUG) { Log.w(TAG, "invalidating instead of autocorking early in init: " Loading Loading @@ -1322,7 +1323,7 @@ public class PropertyInvalidatedCache<Query, Result> { @GuardedBy("mLock") private Handler getHandlerLocked() { if (mHandler == null) { mHandler = new Handler(Looper.getMainLooper()) { mHandler = new Handler(getLooper()) { @Override public void handleMessage(Message msg) { AutoCorker.this.handleMessage(msg); Loading @@ -1331,6 +1332,14 @@ public class PropertyInvalidatedCache<Query, Result> { } return mHandler; } /** * Return a looper for auto-uncork messages. Messages should be processed on the * background thread, not on the main thread. */ private static Looper getLooper() { return BackgroundThread.getHandler().getLooper(); } } /** Loading Loading
core/java/android/app/PropertyInvalidatedCache.java +11 −2 Original line number Diff line number Diff line Loading @@ -29,6 +29,7 @@ import android.text.TextUtils; import android.util.Log; import com.android.internal.annotations.GuardedBy; import com.android.internal.os.BackgroundThread; import com.android.internal.util.FastPrintWriter; import java.lang.annotation.Retention; Loading Loading @@ -1260,7 +1261,7 @@ public class PropertyInvalidatedCache<Query, Result> { } public void autoCork() { if (Looper.getMainLooper() == null) { if (getLooper() == null) { // We're not ready to auto-cork yet, so just invalidate the cache immediately. if (DEBUG) { Log.w(TAG, "invalidating instead of autocorking early in init: " Loading Loading @@ -1322,7 +1323,7 @@ public class PropertyInvalidatedCache<Query, Result> { @GuardedBy("mLock") private Handler getHandlerLocked() { if (mHandler == null) { mHandler = new Handler(Looper.getMainLooper()) { mHandler = new Handler(getLooper()) { @Override public void handleMessage(Message msg) { AutoCorker.this.handleMessage(msg); Loading @@ -1331,6 +1332,14 @@ public class PropertyInvalidatedCache<Query, Result> { } return mHandler; } /** * Return a looper for auto-uncork messages. Messages should be processed on the * background thread, not on the main thread. */ private static Looper getLooper() { return BackgroundThread.getHandler().getLooper(); } } /** Loading