diff options
author | JP Abgrall <jpa@google.com> | 2012-06-21 20:02:12 -0700 |
---|---|---|
committer | JP Abgrall <jpa@google.com> | 2012-06-21 20:02:12 -0700 |
commit | ac5129a60eb420290835e7cb39f7f577a0b83f70 (patch) | |
tree | df17201276fe098c050392d500933656732a1e9c /libsensors_iio/Android.mk | |
parent | 7494581689b0fc1d8addd016b1c92d74d01f5ad4 (diff) | |
download | android_hardware_invensense-ac5129a60eb420290835e7cb39f7f577a0b83f70.tar.gz android_hardware_invensense-ac5129a60eb420290835e7cb39f7f577a0b83f70.tar.bz2 android_hardware_invensense-ac5129a60eb420290835e7cb39f7f577a0b83f70.zip |
libsensors_iio: Don't segfault when constructor fails when device absent
Currently too much work is been done in the constructor.
If a device is not there in the kernel, the constructor will fail
to correctly initialize, and will leave a bunch of uninitialized strings
that when used will cause segfaults.
So now the classes have an isValid() method to be used after construction.
If false, the object should be destroyed.
Added extra checks to locate failed initialization.
Change-Id: I3f767f9dc0b0f19b66d034a683444baed771a5db
Diffstat (limited to 'libsensors_iio/Android.mk')
0 files changed, 0 insertions, 0 deletions