Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(53)

Side by Side Diff: chromecast/browser/android/apk/src/org/chromium/chromecast/shell/CastApplication.java

Issue 1158053005: Android: Store language .pak files in res/raw rather than assets (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@load-from-apk-v8
Patch Set: yfriedman review comments Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package org.chromium.chromecast.shell; 5 package org.chromium.chromecast.shell;
6 6
7 import android.content.Context; 7 import android.content.Context;
8 import android.os.Build; 8 import android.os.Build;
9 import android.util.Log; 9 import android.util.Log;
10 10
(...skipping 19 matching lines...) Expand all
30 private static final String PRIVATE_DATA_DIRECTORY_SUFFIX = "cast_shell"; 30 private static final String PRIVATE_DATA_DIRECTORY_SUFFIX = "cast_shell";
31 private static final String COMMAND_LINE_FILE = "/data/local/tmp/castshell-c ommand-line"; 31 private static final String COMMAND_LINE_FILE = "/data/local/tmp/castshell-c ommand-line";
32 32
33 @Override 33 @Override
34 public void onCreate() { 34 public void onCreate() {
35 super.onCreate(); 35 super.onCreate();
36 initializeApplicationParameters(this); 36 initializeApplicationParameters(this);
37 } 37 }
38 38
39 public static void initializeApplicationParameters(Context context) { 39 public static void initializeApplicationParameters(Context context) {
40 ResourceExtractor.setMandatoryPaksToExtract(MANDATORY_PAK_FILES); 40 ResourceExtractor.setMandatoryPaksToExtract(0, MANDATORY_PAK_FILES);
41 PathUtils.setPrivateDataDirectorySuffix(PRIVATE_DATA_DIRECTORY_SUFFIX, c ontext); 41 PathUtils.setPrivateDataDirectorySuffix(PRIVATE_DATA_DIRECTORY_SUFFIX, c ontext);
42 } 42 }
43 43
44 @Override 44 @Override
45 public void initCommandLine() { 45 public void initCommandLine() {
46 if (allowCommandLineImport()) { 46 if (allowCommandLineImport()) {
47 Log.d(TAG, "Initializing command line from " + COMMAND_LINE_FILE); 47 Log.d(TAG, "Initializing command line from " + COMMAND_LINE_FILE);
48 CommandLine.initFromFile(COMMAND_LINE_FILE); 48 CommandLine.initFromFile(COMMAND_LINE_FILE);
49 } else { 49 } else {
50 CommandLine.init(null); 50 CommandLine.init(null);
51 } 51 }
52 } 52 }
53 53
54 private static boolean allowCommandLineImport() { 54 private static boolean allowCommandLineImport() {
55 return !Build.TYPE.equals("user"); 55 return !Build.TYPE.equals("user");
56 } 56 }
57 } 57 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698