From c950a9b832540d643e2309df6b9413f0b07444ac Mon Sep 17 00:00:00 2001 From: weijiaxu Date: Mon, 6 Nov 2017 16:39:04 -0800 Subject: Fix previous usage of LoggingBinding with Logger class. Test: In dialer lab. PiperOrigin-RevId: 174781953 Change-Id: I987c0d191a7c5613debb857bab9438d0c1aa20a7 --- java/com/android/dialer/app/DialtactsActivity.java | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'java/com/android/dialer/app/DialtactsActivity.java') diff --git a/java/com/android/dialer/app/DialtactsActivity.java b/java/com/android/dialer/app/DialtactsActivity.java index 5af9b95ac..12c191e53 100644 --- a/java/com/android/dialer/app/DialtactsActivity.java +++ b/java/com/android/dialer/app/DialtactsActivity.java @@ -112,7 +112,6 @@ import com.android.dialer.interactions.PhoneNumberInteraction.InteractionErrorCo import com.android.dialer.logging.DialerImpression; import com.android.dialer.logging.Logger; import com.android.dialer.logging.LoggingBindings; -import com.android.dialer.logging.LoggingBindingsFactory; import com.android.dialer.logging.ScreenEvent; import com.android.dialer.logging.UiAction; import com.android.dialer.main.Main; @@ -593,13 +592,9 @@ public class DialtactsActivity extends TransactionSafeActivity } // add 1 sec delay to get memory snapshot so that dialer wont react slowly on resume. ThreadUtil.postDelayedOnUiThread( - () -> { - if (getApplicationContext() instanceof LoggingBindingsFactory) { - ((LoggingBindingsFactory) getApplicationContext()) - .newLoggingBindings() - .logRecordMemory(LoggingBindings.ACTIVITY_ON_RESUME_MEMORY_EVENT_NAME); - } - }, + () -> + Logger.get(this) + .logRecordMemory(LoggingBindings.ACTIVITY_ON_RESUME_MEMORY_EVENT_NAME), 1000); } -- cgit v1.2.3