OLD | NEW |
| (Empty) |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #include "chrome/browser/android/app_google_location_settings_helper.h" | |
6 | |
7 #include "base/android/jni_android.h" | |
8 #include "base/android/jni_string.h" | |
9 #include "jni/LocationSettings_jni.h" | |
10 | |
11 using base::android::AttachCurrentThread; | |
12 using base::android::CheckException; | |
13 using base::android::ScopedJavaLocalRef; | |
14 | |
15 AppGoogleLocationSettingsHelper::AppGoogleLocationSettingsHelper() | |
16 : GoogleLocationSettingsHelper() { | |
17 } | |
18 | |
19 AppGoogleLocationSettingsHelper::~AppGoogleLocationSettingsHelper() { | |
20 } | |
21 | |
22 // TODO(finnur): Rename this function IsLocationEnabled. | |
23 bool AppGoogleLocationSettingsHelper::IsSystemLocationEnabled() { | |
24 JNIEnv* env = AttachCurrentThread(); | |
25 return Java_LocationSettings_areAllLocationSettingsEnabled(env); | |
26 } | |
27 | |
28 // Register native methods | |
29 | |
30 bool AppGoogleLocationSettingsHelper::Register(JNIEnv* env) { | |
31 return RegisterNativesImpl(env); | |
32 } | |
OLD | NEW |