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

Side by Side Diff: services/device/android/register_jni.cc

Issue 2898433002: Revert of Move //device/generic_sensor to be part of the internal implementation of the Device Service. (Closed)
Patch Set: Created 3 years, 7 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
« no previous file with comments | « services/device/BUILD.gn ('k') | services/device/device_service.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2017 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2017 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 #include "services/device/android/register_jni.h" 5 #include "services/device/android/register_jni.h"
6 6
7 #include "base/android/jni_android.h" 7 #include "base/android/jni_android.h"
8 #include "services/device/generic_sensor/android/sensors_jni_registrar.h"
9 #include "services/device/time_zone_monitor/android/time_zone_monitor_jni_regist rar.h" 8 #include "services/device/time_zone_monitor/android/time_zone_monitor_jni_regist rar.h"
10 9
11 namespace device { 10 namespace device {
12 11
13 bool EnsureJniRegistered() { 12 bool EnsureJniRegistered() {
14 static bool g_jni_init_done = false; 13 static bool g_jni_init_done = false;
15 14
16 if (!g_jni_init_done) { 15 if (!g_jni_init_done) {
17 JNIEnv* env = base::android::AttachCurrentThread(); 16 JNIEnv* env = base::android::AttachCurrentThread();
18 17
19 if (!android::RegisterSensorsJni(env))
20 return false;
21
22 if (!android::RegisterTimeZoneMonitorJni(env)) 18 if (!android::RegisterTimeZoneMonitorJni(env))
23 return false; 19 return false;
24 20
25 g_jni_init_done = true; 21 g_jni_init_done = true;
26 } 22 }
27 23
28 return true; 24 return true;
29 } 25 }
30 26
31 } // namespace device 27 } // namespace device
OLDNEW
« no previous file with comments | « services/device/BUILD.gn ('k') | services/device/device_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698