Chromium Code Reviews| Index: net/android/cellular_signal_strength.h |
| diff --git a/net/android/cellular_signal_strength.h b/net/android/cellular_signal_strength.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..80d95b6d15ae495aa4c8ec0024e6d46436230c4d |
| --- /dev/null |
| +++ b/net/android/cellular_signal_strength.h |
| @@ -0,0 +1,37 @@ |
| +// Copyright 2016 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. |
| + |
| +#ifndef NET_ANDROID_CELLULAR_SIGNAL_STRENGTH_H_ |
| +#define NET_ANDROID_CELLULAR_SIGNAL_STRENGTH_H_ |
| + |
| +#include <jni.h> |
| +#include <stdint.h> |
| + |
| +#include "base/compiler_specific.h" |
| +#include "net/base/net_export.h" |
| + |
| +namespace net { |
| + |
| +namespace android { |
| + |
| +namespace cellular_signal_strength { |
| + |
| +// Returns true if the RSSI (in dbM) of the currently registered cellular |
| +// connection is available, and sets |rssi| to that value. |
| +NET_EXPORT bool GetRssiDbm(int64_t* rssi) WARN_UNUSED_RESULT; |
|
pauljensen
2016/04/22 11:54:12
why int64_t? why not int32_t?
tbansal1
2016/04/28 20:12:02
Changed to int*. Done.
pauljensen
2016/05/23 12:25:10
can we change to int32_t so it's more defined?
|
| + |
| +// Returns true if the signal level (between 0 and 4, both inclusive) of the |
| +// currently registered cellular connection is available, and sets |
| +// |signal_level| to that value. |
| +NET_EXPORT bool GetSignalLevel(int64_t* signal_level) WARN_UNUSED_RESULT; |
|
pauljensen
2016/04/22 11:54:12
why not just int?
tbansal1
2016/04/28 20:12:02
Done.
|
| + |
| +bool Register(JNIEnv* env); |
| + |
| +} // namespace cellular_signal_strength |
| + |
| +} // namespace android |
| + |
| +} // namespace net |
| + |
| +#endif // NET_ANDROID_CELLULAR_SIGNAL_STRENGTH_H_ |