• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2012 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.android_webview.shell;
6 
7 import android.content.Context;
8 
9 import org.chromium.android_webview.AwResource;
10 
11 /**
12  * Registers resources for the Android webview shell.
13  */
14 public class AwShellResourceProvider {
15     private static boolean sInitialized;
16 
registerResources(Context context)17     public static void registerResources(Context context) {
18         if (sInitialized) {
19             return;
20         }
21 
22         AwResource.setResources(context.getResources());
23 
24         AwResource.setErrorPageResources(R.raw.error, R.raw.blank_html);
25 
26         AwResource.setDefaultTextEncoding(R.string.default_encoding);
27 
28         AwResource.setConfigKeySystemUuidMapping(R.array.config_key_system_uuid_mapping);
29 
30         sInitialized = true;
31     }
32 }
33