when MsgTask::destroy() happens, msg_q_unblock() triggers
the running thread to come out from blocking state. A race
condition may happen such that that thread may complete
first, causing msgTask obj to be already deleted. A next
allocation may change the value at MsgTask::mThread. Then
when control comes back to destroy(), it may try to check
mThread and call delete on it to crash the program.
mThread is a heap obj, so it is possible to delete it after
the hosting msgTask obj is deleted. We just have to keep
its value on the stack before calling msg_q_unblock().
Change-Id: If15884815eea05fbfa523ec92aa300ed21ef897c
CR-Fixed: 1091530
need to remove get_process_name as it is removed
from libcutil. Call getprogname is available in
libc but not LE glibc. Implementing a simple call
wrapper.
Change-Id: I68244b9f7fcbc290222b074f80da03330315ea29
CRs-Fixed: 1080605
Overwrites the default hidl gnss hal implementation
to interface directly to LocationAPI
CRs-fixed: 1112712
Change-Id: I3385911956c0c6c457202a8584b108046c587b36
Implementation of LocationAPI into gps hal
to be a common API that is called into by platform
specific APIs.
Change-Id: Ie5a7bd217d4ae2175ad49e6aca2fb6ecd4702f3b
CRs-fixed: 1112712
Remove all usage of gps.h and fused_location.h
from all gnss models except gps/fpl hal librarys
Change-Id: I90ba233c6bbe5c31a4cacceeb981833719c871f2
CRs-Fixed: 1067953
Adding handling for new ro.baseband value provided by target team
If the target does not have WGR (GPS Receiver), we return NULL
GPS and FLP interfaces.
CRs-Fixed: 1033674
Change-Id: I1561518c4f4b0c52ab934feb2fa43e9078c91d86
merge automotive specific changes from LA.AF.1.2.1 into
location development branch
Change-Id: I90a5e60c46bb5b1aafaf4cd9aaf2dcb79449f288
CRs-Fixed: 1017254
Removing LOCAL_CLANG := false from makefiles.
Couple of instances got added back as part of
LE merge.
Change-Id: I7d18d573c1d12597914124e35cb024df3343f0db
CRs-Fixed: 1021759
automotive platform introduced a new android property called
ro.hardware.type to detect automotive platform for the
purpose of having automotive specific features.
Added changes in loc_target to detect auto platform.
Change-Id: Ib886b96b2e95dafc151bead041e5fc3d6740c468
CRs-Fixed: 992647
missing include of a head file. A late check in for Android introduced
this. This blocks LE mainline switching to component model.
Change-Id: Idc93f1ec9b1ccb548d3119e72ce0e3e797f2039f
CRs-Fixed: 1004488
This project implemented XTRA "Enhancements" grouped as XTRA Client 2.0.
1. Added NTP_SERVER config into gps.conf
2. Removed XTRA Client 2.0 Phase 1 code changes
3. Disabled public api to delete aiding data in user build
CRs-fixed: 917950
Change-Id: I18b31da74c9fe0c24d0ced3770f099197ad32d9a
Fix for buffer overflow possibility for the thread name passed in to
pthread_setname_np() method.
Change-Id: Id323dd058eddcf50d6fd9ec8908e9997b30c561b
CRs-Fixed: 999457
Fixed compilation issues for LA after merging
oe_master with location.lnx.1.0-dev.1.0.
Change-Id: I7940429c369249ab9aa636fe9850c1281cf2dc01
CRs-Fixed: 995520
automotive platform introduced a new android property called
ro.hardware.type to detect automotive platform for the
purpose of having automotive specific features.
Added changes in loc_target to detect auto platform.
Change-Id: Ib886b96b2e95dafc151bead041e5fc3d6740c468
CRs-Fixed: 992647
Removing statement to set LOCAL_CLANG flag explicity to
true. It will be true by default.
Change-Id: I2eaba5a89e64088e3383b962dceaaa7e975e997a
CRs-Fixed: 989476
The current share() and drop() calls are not thread
safe, which can cause memory heap correuption. This
changes the read / write ops to be atomic.
Change-Id: Ic241d4573bdf2e58c4e264e97bd41b56f882c791
CRs-Fixed: 975372
The current share() and drop() calls are not thread
safe, which can cause memory heap correuption. This
changes the read / write ops to be atomic.
Change-Id: Ic241d4573bdf2e58c4e264e97bd41b56f882c791
CRs-Fixed: 975372
The current share() and drop() calls are not thread
safe, which can cause memory heap correuption. This
changes the read / write ops to be atomic.
Change-Id: Ic241d4573bdf2e58c4e264e97bd41b56f882c791
CRs-Fixed: 975372
LocTimer on timeout would currently delete timer delegate.
This meddles into the management of LocTimer::stop() call,
and the order of obj delete needs to be synchronized in a
few different places as a result.
This change lets the delete of the timer delegate obj fold
into the stop() handling, which would be easier to synch.
Change-Id: Ic3e0b3d183dceb9e6e2db4c47ec9d6e296b0c3f6
CRs-Fixed: 916590
Removed tCreate and tAssociate from MsgTask. LocThread
now can optionally take a tCreate method. Associator is
replaced with *firstMsg* option to MsgTask, which is a
more generic option, that can associate or do other set
up job at the create of a MsgTask.
The current MsgTask doesn't use tCreate, which exposes
a slight time window for Location HAL when its MsgTask
is NOT associated to DVM heap but a message delivery to
DVM could be attempted during this time.
Change-Id: Iafd5b91b693baacb9b7064463f8c44f74026f54c
CRs-Fixed: 902350
when a ticking timer is stopped, currently kernel doesn't
get updated with the next immediate timer's interval. As a
result, kernel timer will expire sooner (with the stopped
timer's interval), and the next timer's client is notified
for this expiration.
Change-Id: I0d67d1418cb9bfe7f70ae71252901d4c6bb699b3
CRs-Fixed: 909776
LocTimer::stop() can be called from different threads, which must
be protected. Currently there is a race condition between back to
back stop()'s or expire() + stop() events.
Change-Id: Iae80b78f049a32da87639f813c6f5126b4ccd072
CRs-Fixed: 904627
BOOTTIME_ALARM and BOOTTIME were added to timerfd_create
in kernel version 3.11 and 3.15 respectively.
But for targets still on older kernel version we fallback on MONOTONIC.
CRs-Fixed: 897805
Change-Id: I47d9780d69ce5ee8c183c84baa93ea3c1a00db57
LocTimerWrapper implements loc_timer_start/stop calls for backward
compatibility. There is a race condtiion where the wrapper object
could be deleted by the client thread and expireation handling at
rough the same time, which would have the memory freed twice. Now
they are mutext protected.
Change-Id: I25d7466db88a840a8a09e7a476cface48c91d22e
Timer must be removed from epoll as soon as it expires,
otherwise it continuously expire. Current timer removes
from a different thread, this triggers repeated expire
events until the maintain thread gets to remove it.
Change-Id: Ie523bce5069416521d49bc0178d2cad2dd1f04da
CRs-Fixed: 870568
LocHeap, LocThread, LocTimer, and moved MsgTask to
utils. Also added are LocRankable and LocRunnable
abstract classes.
Change-Id: I76975455d24f2c84a95dcc1b04f79fea562ea5ba
CRs-Fixed: 855222
Reduce memory footprint by moving data sets into const
data segments. Update function parameters to accept const
parameters when appropriate.
CRs-fixed: 928770
Change-Id: I42955cf18de2b0541cfaed89359cdcf9ae6fea8a
While it is important to continue to log events
at debug level logs, logging all data may not be
as important. Moving such logs to verbose level
CRs-Fixed: 936031
Change-Id: I634d173b645180d55d620a24cce2c31aee966b8f
LocTimer on timeout would currently delete timer delegate.
This meddles into the management of LocTimer::stop() call,
and the order of obj delete needs to be synchronized in a
few different places as a result.
This change lets the delete of the timer delegate obj fold
into the stop() handling, which would be easier to synch.
Change-Id: Ic3e0b3d183dceb9e6e2db4c47ec9d6e296b0c3f6
CRs-Fixed: 916590
Removed tCreate and tAssociate from MsgTask. LocThread
now can optionally take a tCreate method. Associator is
replaced with *firstMsg* option to MsgTask, which is a
more generic option, that can associate or do other set
up job at the create of a MsgTask.
The current MsgTask doesn't use tCreate, which exposes
a slight time window for Location HAL when its MsgTask
is NOT associated to DVM heap but a message delivery to
DVM could be attempted during this time.
Change-Id: Iafd5b91b693baacb9b7064463f8c44f74026f54c
CRs-Fixed: 902350
when a ticking timer is stopped, currently kernel doesn't
get updated with the next immediate timer's interval. As a
result, kernel timer will expire sooner (with the stopped
timer's interval), and the next timer's client is notified
for this expiration.
Change-Id: I0d67d1418cb9bfe7f70ae71252901d4c6bb699b3
CRs-Fixed: 909776
LocTimer::stop() can be called from different threads, which must
be protected. Currently there is a race condition between back to
back stop()'s or expire() + stop() events.
Change-Id: Iae80b78f049a32da87639f813c6f5126b4ccd072
CRs-Fixed: 904627
BOOTTIME_ALARM and BOOTTIME were added to timerfd_create
in kernel version 3.11 and 3.15 respectively.
But for targets still on older kernel version we fallback on MONOTONIC.
CRs-Fixed: 897805
Change-Id: I47d9780d69ce5ee8c183c84baa93ea3c1a00db57
byte long each, but the loc_set_config_entry() util call
writes an int at a time, causing buffer overflow. #2, in
loc_xtra-init(), a data structure wrap happened without
iniializing the unused data fields.
Change-Id: I96b40a330316927d276840a997082fe759263699
CRs-Fixed: 866937
LocTimerWrapper implements loc_timer_start/stop calls for backward
compatibility. There is a race condtiion where the wrapper object
could be deleted by the client thread and expireation handling at
rough the same time, which would have the memory freed twice. Now
they are mutext protected.
Change-Id: I25d7466db88a840a8a09e7a476cface48c91d22e
Timer must be removed from epoll as soon as it expires,
otherwise it continuously expire. Current timer removes
from a different thread, this triggers repeated expire
events until the maintain thread gets to remove it.
Change-Id: Ie523bce5069416521d49bc0178d2cad2dd1f04da
CRs-Fixed: 870568
All instances of MsgTask were not calling associator
because of a use of a static variable check.
All instance of MsgTask thread must call the associator.
CRs-Fixed: 870450
Change-Id: I18314ec3ca0fe21f4bbd12a505bf552e64e25307
LocHeap, LocThread, LocTimer, and moved MsgTask to
utils. Also added are LocRankable and LocRunnable
abstract classes.
Change-Id: I76975455d24f2c84a95dcc1b04f79fea562ea5ba
CRs-Fixed: 855222
1. Add two new ulp location sources (PIP and NLP)
ULP_LOCATION_IS_FROM_NLP to mark locations from NLP
ULP_LOCATION_IS_FROM_PIP to mark locations from PIP
2. Introduce a macro for printing exit log with error
CRs-Fixed: 694343
Change-Id: Ifa11803df2ed4fc249a5c339acfeeb5d89bf55d5
1. Add two new ulp location sources (PIP and NLP)
ULP_LOCATION_IS_FROM_NLP to mark locations from NLP
ULP_LOCATION_IS_FROM_PIP to mark locations from PIP
2. Introduce a macro for printing exit log with error.
CRs-Fixed: 694343
Change-Id: Ifa11803df2ed4fc249a5c339acfeeb5d89bf55d5
This utility reads ro.lean system property
and returns a 1 if the property is set to true
and returns 0 otherwise.
Change-Id: I52a8396ee085d44b90d8416131f27b0b1a46575e
CRs-fixed: 801990
Removed relative paths and set Absolute paths in Android.mk file
and moved corresponding files to right location
Change-Id: Iacf2ee3dadb3e87c9354c1c4b8003cd8cc65ea97
CRs-Fixed: 714112
Defined PLA functions to enable gps libraries to call
platform-dependent library calls transparantly. Removed
fake files and replaced the fake function with defined
PLA functions.
CRs-fixed: 605817
Change-Id: I677f658001329a10ef9b49bd963631a83fb4c85f
It contains the following changes:
- porting from AU_LINUX_ANDROID_LNX.LA.3.5.1_RB1.04.04.02.048.040
- updated package loc-api files according to the merge
- rename loc-api to loc-hal
- dynamically load liblbs_core.so.1 file for LE platforms
- print a warning message when loading the lbs_core library fails
CRs-fixed: 605821
Change-Id: I54e1a9c742d1734ffa29e6864901119e0ee600c8
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
iEYEABECAAYFAlRGYwkACgkQoUgPZYCpAfF2rwCg5quG/L+pzo5R94uD/QSR1Xs6
mpsAoIxxW/ftz0uMbp67UANrb7EQyVNY
=eKHq
-----END PGP SIGNATURE-----
Merge tag 'AU_LINUX_ANDROID_KK.04.04.04.010.214' into HEAD
AU_LINUX_ANDROID_KK.04.04.04.010.214 based on quic/aosp/kk
Change-Id: Ida51fa96a5a39fcb3bb2f2c6ab9be84a3ec44d41
there is an implicit requirement on the loc_gps_cfg_s_type field
data type, that is they must be 32 bit fields. Otherwise it would
only work with the assistance of padding. When two adjacent 8 bit
fields are defined, the later filled field would overwrite the
previously written neighbor. This is why GPS_LOCK was tested as
broken in the latest build.
This also fixes a theoretic bug that when there are two of the
same fields defined in the config table to be filled, the
accounting of the filled entries was incorrect earlier. This is
not a realistic bug, as there are no idential entries in the
config table HAL fills.
Bug: 16131208
CRs-fixed: 736966
Change-Id: I2e262fb30272f6f334508df17bb640022d7b1ef5
Some of the parameters configured in gps.conf may be
carrier dependent. This provides a mechanism so that
GpsLocationProvider can determine current operator
resolve of the carrier specific configurations and
update HAL with those configurations post init.
Bug: 17110478
CRs-fixed: 736966
Change-Id: I80aa4404da7666824335fee074dae2ffcba40548
Added run time detection of PDS enabled fusion target
to loc_target(), to support fusion platforms that has
PDS service enabled.
Change-Id: Ic53df027540f00eec9259776351b6bbc9afa0521
CRs-Fixed: 699757
Some parameter names are more than 48 char in length.
Accomodate by increasing parameter name buffer size
and increase complete line buffer size.
CRs-Fixed: 700902
Change-Id: If2af7288ed11fdd668dc1cad8e60f2c92e7b3c30
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
iEYEABECAAYFAlPoLFcACgkQoUgPZYCpAfHA3gCgxHO4Ygg/L4/AivXneonD8kls
t80AoOVB7Ts81w7Qea3Ui7jhoq/jbRui
=UdP7
-----END PGP SIGNATURE-----
Merge tag 'AU_LINUX_ANDROID_KK.04.04.04.010.094' into HEAD
AU_LINUX_ANDROID_KK.04.04.04.010.094 based on quic/aosp/kk
Change-Id: I0b9428f15516e1f6b6cd625caa2e4af86b9c1c5e
loc timer util stop() routine may have race condition
with the timer thread, when timer expires at the same
time stop() routine tries to lock mutex. The race
condition can go 2 ways:
* timer thread expires, unlocks mutex, context switch,
stop() thread acquires lock, context switch, timer
thread destroys mutex. Destroy will fail, resulting
mutex leak.
* timer thread expires, unlocks mutex, destroys mutex,
stop() acqures lock, signal, and releases lock. Would
be super rare conditions though.
Fix is that we give 5 seconds for stop() thread to
give up the lock when destroy. After that the timer
thread will release the mutex and go on destroy.
Meanwhile the stop() thread would check the lock
return to move on with signal and unlock.
Change-Id: Iff9e34d08a1faf0828049de2fede2e7a5d15b161
CRs-Fixed: 699856
The logging macro seems to break c++11 toolchain. A change
is make to address that
Change-Id: I5056fe0431ff064ac4805facbb59195fe04b154e
CRs-Fixed: 646028
Changed QCA1530 SoC detection property from persistent to
non-pesistent. New property is 'sys.qca1530'.
CRs-Fixed: 614154
Change-Id: I61ed4191e6413bb6eab71c61d9ed070a5815c178
This change makes modifications
to existing utilities and adds
a couple of new utilites to help
with the launcher
Change-Id: Ib65ffe8e60c7e4a824c5c362765df5dcba872424
CRs-fixed: 600179
Reduced QCA1530 detection timeout as system server activitity
manager gives only 20 seconds for the subsystem initialization.
CRs-Fixed: 613611
Change-Id: Ib095db3f2b35765a4b9d7b0e79132e44c173d6cb
loc_timer util currently can not be stopped. Added stop api so that
clients can make use of.
CRs-Fixed: 579624
Change-Id: I17f80e46ecfbdf1b70eb158f1ee7eb1a92d5e765