diff options
Diffstat (limited to 'java/com/android/dialer/binary')
-rw-r--r-- | java/com/android/dialer/binary/common/DialerApplication.java | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/java/com/android/dialer/binary/common/DialerApplication.java b/java/com/android/dialer/binary/common/DialerApplication.java index 08666a21c..0d38541e5 100644 --- a/java/com/android/dialer/binary/common/DialerApplication.java +++ b/java/com/android/dialer/binary/common/DialerApplication.java @@ -17,18 +17,17 @@ package com.android.dialer.binary.common; import android.app.Application; -import android.os.StrictMode; import android.os.Trace; import android.support.annotation.NonNull; import android.support.v4.os.BuildCompat; import com.android.dialer.blocking.BlockedNumbersAutoMigrator; import com.android.dialer.blocking.FilteredNumberAsyncQueryHandler; -import com.android.dialer.buildtype.BuildType; import com.android.dialer.calllog.CallLogComponent; import com.android.dialer.common.concurrent.DefaultDialerExecutorFactory; import com.android.dialer.inject.HasRootComponent; import com.android.dialer.notification.NotificationChannelManager; import com.android.dialer.persistentlog.PersistentLogger; +import com.android.dialer.strictmode.DialerStrictMode; /** A common application subclass for all Dialer build variants. */ public abstract class DialerApplication extends Application implements HasRootComponent { @@ -38,9 +37,8 @@ public abstract class DialerApplication extends Application implements HasRootCo @Override public void onCreate() { Trace.beginSection("DialerApplication.onCreate"); - if (BuildType.get() == BuildType.BUGFOOD) { - enableStrictMode(); - } + DialerStrictMode.onApplicationCreate(); + super.onCreate(); new BlockedNumbersAutoMigrator( this.getApplicationContext(), @@ -56,13 +54,6 @@ public abstract class DialerApplication extends Application implements HasRootCo Trace.endSection(); } - private void enableStrictMode() { - StrictMode.setThreadPolicy( - new StrictMode.ThreadPolicy.Builder().detectAll().penaltyLog().penaltyDeath().build()); - StrictMode.setVmPolicy( - new StrictMode.VmPolicy.Builder().detectAll().penaltyLog().penaltyDeath().build()); - } - /** * Returns a new instance of the root component for the application. Sub classes should define a * root component that extends all the sub components "HasComponent" intefaces. The component |