mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-02 17:06:49 +00:00
[Launcher Jank] Avoid lock contention on AssetManager in all apps preinflate thread
Create a separate context with a separate AssetManager obj. Bug: 337056120 Flag: NONE Test: presubmit Change-Id: Ic6765f7f19b649605aec6a889f8382ee10f929b0
This commit is contained in:
@@ -412,6 +412,8 @@ public abstract class BaseActivity extends Activity implements ActivityContext {
|
||||
public static <T extends BaseActivity> T fromContext(Context context) {
|
||||
if (context instanceof BaseActivity) {
|
||||
return (T) context;
|
||||
} else if (context instanceof ActivityContextDelegate) {
|
||||
return (T) ((ActivityContextDelegate) context).mDelegate;
|
||||
} else if (context instanceof ContextWrapper) {
|
||||
return fromContext(((ContextWrapper) context).getBaseContext());
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user