app/src/main/java/cl/ucn/disc/dsm/thenews/MainApplication.java
@Override
  public void onCreate() {
    super.onCreate();
    log.debug("Initializing ..");

    // Fresco configuration for large images

    ImagePipelineConfig config = ImagePipelineConfig.newBuilder(this)
        .setProgressiveJpegConfig(new SimpleProgressiveJpegConfig())
        .setResizeAndRotateEnabledForNetwork(true)
        .setDownsampleEnabled(true)
        .build();

    // Fresco initialization
    Fresco.initialize(this, config);

    // Day and Night support
    AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_FOLLOW_SYSTEM);

    // AndroidThreeTen initialization
    AndroidThreeTen.init(this);

    if (BuildConfig.DEBUG) {

      StrictMode.setThreadPolicy(new ThreadPolicy.Builder()
          .detectDiskReads()
          .detectDiskWrites()
          .detectNetwork()
          .penaltyLog()
          .penaltyFlashScreen()
          .build());

      StrictMode.setVmPolicy(new VmPolicy.Builder()
          .detectLeakedSqlLiteObjects()
          .detectLeakedClosableObjects()
          .detectLeakedRegistrationObjects()
          .detectActivityLeaks()
          .detectCleartextNetwork()
          .penaltyLog()
          .build());

    }

    log.debug("Initializing: Done.");
  }
/**
   * Called when the application is starting, before any activity, service, or receiver objects
   * (excluding content providers) have been created.
   */
Called when the application is starting, before any activity, service, or receiver objects
(excluding content providers) have been created.
Called when the application is starting before any activity service or receiver objects ( excluding content providers ) have been created .
@Override
  public void onCreate() {
    super.onCreate();
    log.debug("Initializing ..");
    ImagePipelineConfig config = ImagePipelineConfig.newBuilder(this)
        .setProgressiveJpegConfig(new SimpleProgressiveJpegConfig())
        .setResizeAndRotateEnabledForNetwork(true)
        .setDownsampleEnabled(true)
        .build();
    Fresco.initialize(this, config);
    AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_FOLLOW_SYSTEM);
    AndroidThreeTen.init(this);
    if (BuildConfig.DEBUG) {
      StrictMode.setThreadPolicy(new ThreadPolicy.Builder()
          .detectDiskReads()
          .detectDiskWrites()
          .detectNetwork()
          .penaltyLog()
          .penaltyFlashScreen()
          .build());
      StrictMode.setVmPolicy(new VmPolicy.Builder()
          .detectLeakedSqlLiteObjects()
          .detectLeakedClosableObjects()
          .detectLeakedRegistrationObjects()
          .detectActivityLeaks()
          .detectCleartextNetwork()
          .penaltyLog()
          .build());
    }
    log.debug("Initializing: Done.");
  }
@ Override public void onCreate ( ) { super . onCreate ( ) ; log . debug ( "Initializing .." ) ; ImagePipelineConfig config = ImagePipelineConfig . newBuilder ( this ) . setProgressiveJpegConfig ( new SimpleProgressiveJpegConfig ( ) ) . setResizeAndRotateEnabledForNetwork ( true ) . setDownsampleEnabled ( true ) . build ( ) ; Fresco . initialize ( this , config ) ; AppCompatDelegate . setDefaultNightMode ( AppCompatDelegate . MODE_NIGHT_FOLLOW_SYSTEM ) ; AndroidThreeTen . init ( this ) ; if ( BuildConfig . DEBUG ) { StrictMode . setThreadPolicy ( new ThreadPolicy . Builder ( ) . detectDiskReads ( ) . detectDiskWrites ( ) . detectNetwork ( ) . penaltyLog ( ) . penaltyFlashScreen ( ) . build ( ) ) ; StrictMode . setVmPolicy ( new VmPolicy . Builder ( ) . detectLeakedSqlLiteObjects ( ) . detectLeakedClosableObjects ( ) . detectLeakedRegistrationObjects ( ) . detectActivityLeaks ( ) . detectCleartextNetwork ( ) . penaltyLog ( ) . build ( ) ) ; } log . debug ( "Initializing: Done." ) ; }
Called when the application is starting, before any activity, service, or receiver objects
 (excluding content providers) have been created.
Called when the application is starting before any activity service or receiver objects ( excluding content providers ) have been created .
// Fresco configuration for large images // Fresco initialization // Day and Night support // AndroidThreeTen initialization