blob: 4e61b30011f619c7c8ac68e4977a4ba637018b26 [file] [log] [blame]
// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
package org.chromium.mojo.sensors;
import android.content.Context;
import org.chromium.mojo.system.MojoException;
import org.chromium.mojom.sensors.SensorListener;
import org.chromium.mojom.sensors.SensorService;
/**
* Android implementation of Senors.
*/
public class SensorServiceImpl implements SensorService {
private Context mContext;
public SensorServiceImpl(Context context) {
mContext = context;
}
@Override
public void close() {}
@Override
public void onConnectionError(MojoException e) {}
@Override
public void addListener(int sensorType, SensorListener listener) {
new SensorForwarder(mContext, sensorType, (SensorListener.Proxy) listener);
}
}