Home | History | Annotate | Download | only in chromium_linker_test_apk
      1 // Copyright 2014 The Chromium Authors. All rights reserved.
      2 // Use of this source code is governed by a BSD-style license that can be
      3 // found in the LICENSE file.
      4 
      5 package org.chromium.chromium_linker_test_apk;
      6 
      7 import android.app.Application;
      8 
      9 import org.chromium.base.PathUtils;
     10 import org.chromium.base.ResourceExtractor;
     11 
     12 /**
     13  * Application for testing the Chromium Linker
     14  */
     15 public class ChromiumLinkerTestApplication extends Application {
     16 
     17     /**
     18      * icudtl.dat provides ICU (i18n library) with all the data for its
     19      * operation. We use to link it statically to our binary, but not any more
     20      * so that we have to install it along with other mandatory pak files.
     21      * See src/third_party/icu/README.chromium.
     22      */
     23     private static final String[] MANDATORY_PAK_FILES = new String[] {
     24         "content_shell.pak",
     25         "icudtl.dat"
     26     };
     27     private static final String PRIVATE_DATA_DIRECTORY_SUFFIX = "chromium_linker_test";
     28 
     29     @Override
     30     public void onCreate() {
     31         super.onCreate();
     32         initializeApplicationParameters();
     33     }
     34 
     35     public static void initializeApplicationParameters() {
     36         ResourceExtractor.setMandatoryPaksToExtract(MANDATORY_PAK_FILES);
     37         PathUtils.setPrivateDataDirectorySuffix(PRIVATE_DATA_DIRECTORY_SUFFIX);
     38     }
     39 
     40 }
     41