Loading src/com/android/contacts/ContactsApplication.java +8 −3 Original line number Diff line number Diff line Loading @@ -22,6 +22,7 @@ import com.android.contacts.util.Constants; import com.google.common.annotations.VisibleForTesting; import android.app.Application; import android.app.FragmentManager; import android.app.LoaderManager; import android.content.ContentResolver; import android.content.Context; Loading Loading @@ -109,10 +110,14 @@ public final class ContactsApplication extends Application { Context context = getApplicationContext(); PreferenceManager.getDefaultSharedPreferences(context); AccountTypeManager.getInstance(context); LoaderManager.enableDebugLogging(true); LoaderManager.enableDebugLogging(Log.isLoggable(Constants.LOADER_MANAGER_TAG, Log.DEBUG)); FragmentManager.enableDebugLogging( Log.isLoggable(Constants.FRAGMENT_MANAGER_TAG, Log.DEBUG)); if (Log.isLoggable(Constants.STRICT_MODE_TAG, Log.DEBUG)) { StrictMode.setThreadPolicy( new StrictMode.ThreadPolicy.Builder().detectAll().penaltyLog().build()); } if (Log.isLoggable(Constants.PERFORMANCE_TAG, Log.DEBUG)) { Log.d(Constants.PERFORMANCE_TAG, "ContactsApplication.onCreate finish"); Loading src/com/android/contacts/util/Constants.java +22 −2 Original line number Diff line number Diff line Loading @@ -25,7 +25,27 @@ public class Constants { public static final String SCHEME_IMTO = "imto"; public static final String SCHEME_SIP = "sip"; // Log tag for performance measurement. // To enable: adb shell setprop log.tag.ContactsPerf VERBOSE /** * Log tag for performance measurement. * To enable: adb shell setprop log.tag.ContactsPerf VERBOSE */ public static final String PERFORMANCE_TAG = "ContactsPerf"; /** * Log tag for enabling/disabling LoaderManager log. * To enable: adb shell setprop log.tag.ContactsLoaderManager DEBUG */ public static final String LOADER_MANAGER_TAG = "ContactsLoaderManager"; /** * Log tag for enabling/disabling FragmentManager log. * To enable: adb shell setprop log.tag.ContactsFragmentManager DEBUG */ public static final String FRAGMENT_MANAGER_TAG = "ContactsFragmentManager"; /** * Log tag for enabling/disabling StrictMode violation log. * To enable: adb shell setprop log.tag.ContactsStrictMode DEBUG */ public static final String STRICT_MODE_TAG = "ContactsStrictMode"; } Loading
src/com/android/contacts/ContactsApplication.java +8 −3 Original line number Diff line number Diff line Loading @@ -22,6 +22,7 @@ import com.android.contacts.util.Constants; import com.google.common.annotations.VisibleForTesting; import android.app.Application; import android.app.FragmentManager; import android.app.LoaderManager; import android.content.ContentResolver; import android.content.Context; Loading Loading @@ -109,10 +110,14 @@ public final class ContactsApplication extends Application { Context context = getApplicationContext(); PreferenceManager.getDefaultSharedPreferences(context); AccountTypeManager.getInstance(context); LoaderManager.enableDebugLogging(true); LoaderManager.enableDebugLogging(Log.isLoggable(Constants.LOADER_MANAGER_TAG, Log.DEBUG)); FragmentManager.enableDebugLogging( Log.isLoggable(Constants.FRAGMENT_MANAGER_TAG, Log.DEBUG)); if (Log.isLoggable(Constants.STRICT_MODE_TAG, Log.DEBUG)) { StrictMode.setThreadPolicy( new StrictMode.ThreadPolicy.Builder().detectAll().penaltyLog().build()); } if (Log.isLoggable(Constants.PERFORMANCE_TAG, Log.DEBUG)) { Log.d(Constants.PERFORMANCE_TAG, "ContactsApplication.onCreate finish"); Loading
src/com/android/contacts/util/Constants.java +22 −2 Original line number Diff line number Diff line Loading @@ -25,7 +25,27 @@ public class Constants { public static final String SCHEME_IMTO = "imto"; public static final String SCHEME_SIP = "sip"; // Log tag for performance measurement. // To enable: adb shell setprop log.tag.ContactsPerf VERBOSE /** * Log tag for performance measurement. * To enable: adb shell setprop log.tag.ContactsPerf VERBOSE */ public static final String PERFORMANCE_TAG = "ContactsPerf"; /** * Log tag for enabling/disabling LoaderManager log. * To enable: adb shell setprop log.tag.ContactsLoaderManager DEBUG */ public static final String LOADER_MANAGER_TAG = "ContactsLoaderManager"; /** * Log tag for enabling/disabling FragmentManager log. * To enable: adb shell setprop log.tag.ContactsFragmentManager DEBUG */ public static final String FRAGMENT_MANAGER_TAG = "ContactsFragmentManager"; /** * Log tag for enabling/disabling StrictMode violation log. * To enable: adb shell setprop log.tag.ContactsStrictMode DEBUG */ public static final String STRICT_MODE_TAG = "ContactsStrictMode"; }