| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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.resource_provider; | 5 package org.chromium.resource_provider; |
| 6 | 6 |
| 7 import android.content.Context; | 7 import android.content.Context; |
| 8 | 8 |
| 9 import org.chromium.base.ContextUtils; |
| 9 import org.chromium.base.PathUtils; | 10 import org.chromium.base.PathUtils; |
| 10 import org.chromium.base.annotations.CalledByNative; | 11 import org.chromium.base.annotations.CalledByNative; |
| 11 import org.chromium.base.annotations.JNINamespace; | 12 import org.chromium.base.annotations.JNINamespace; |
| 12 | 13 |
| 13 /** | 14 /** |
| 14 * This class does setup for resource_provider. | 15 * This class does setup for resource_provider. |
| 15 */ | 16 */ |
| 16 @JNINamespace("resource_provider") | 17 @JNINamespace("resource_provider") |
| 17 public final class Main { | 18 public final class Main { |
| 18 private static final String PRIVATE_DATA_DIRECTORY_SUFFIX = "resource_provid
er"; | 19 private static final String PRIVATE_DATA_DIRECTORY_SUFFIX = "resource_provid
er"; |
| 19 | 20 |
| 20 private Main() {} | 21 private Main() {} |
| 21 | 22 |
| 22 @SuppressWarnings("unused") | 23 @SuppressWarnings("unused") |
| 23 @CalledByNative | 24 @CalledByNative |
| 24 private static void init(Context context) { | 25 private static void init(Context context) { |
| 26 ContextUtils.initApplicationContext(context.getApplicationContext()); |
| 25 PathUtils.setPrivateDataDirectorySuffix(PRIVATE_DATA_DIRECTORY_SUFFIX, c
ontext); | 27 PathUtils.setPrivateDataDirectorySuffix(PRIVATE_DATA_DIRECTORY_SUFFIX, c
ontext); |
| 26 } | 28 } |
| 27 } | 29 } |
| OLD | NEW |