From 58862de6b8207e78939c84c4c3adbbcb7dd2866e Mon Sep 17 00:00:00 2001 From: calderwoodra Date: Wed, 28 Feb 2018 19:21:52 -0800 Subject: Preload call log fragment on app start. Default is set to true but if we see issues with startup latency we can disable this server side. Test: n/a PiperOrigin-RevId: 187419851 Change-Id: I6d1debfed86dbcaf3ee73ec0906e514a2687e2c0 --- java/com/android/dialer/main/impl/OldMainActivityPeer.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'java') diff --git a/java/com/android/dialer/main/impl/OldMainActivityPeer.java b/java/com/android/dialer/main/impl/OldMainActivityPeer.java index ee0dad5b8..293ec9563 100644 --- a/java/com/android/dialer/main/impl/OldMainActivityPeer.java +++ b/java/com/android/dialer/main/impl/OldMainActivityPeer.java @@ -1077,6 +1077,18 @@ public class OldMainActivityPeer implements MainActivityPeer, FragmentUtilListen this.context = context; this.fragmentManager = fragmentManager; this.fab = fab; + preloadCallLogFragment(); + } + + private void preloadCallLogFragment() { + if (ConfigProviderBindings.get(context).getBoolean("nui_preload_call_log", true)) { + CallLogFragment fragment = new CallLogFragment(); + fragmentManager + .beginTransaction() + .add(R.id.fragment_container, fragment, CALL_LOG_TAG) + .hide(fragment) + .commit(); + } } @Override -- cgit v1.2.3