Merge commit 'aefcdde4bdf2be74bdf9620359830faeed5419e6'
* commit 'aefcdde4bdf2be74bdf9620359830faeed5419e6':
Periodically scan wifi when wifi is not connected and wifi lock is
(watch out auto-merge conflict for SipAudioCall).
Bug: 3113033, related CL: https://android-git/g/#change,75185
Change-Id: Ib48d3b990e229e0b341e47e10e76934e1a50d10f
Remember, the system and main logs are
- Shared resources
- Primarily for recording problems
- To be used only for large grained events during normal operation
Bug: 3104855
Change-Id: I136fbd101917dcbc8ebc3f96f276426b48bde7b7
Merge commit 'cd6fe63fdc2e99da11b19a233afd81e2448d0db2'
* commit 'cd6fe63fdc2e99da11b19a233afd81e2448d0db2':
Fix the incorrect environment variable name for the thread pool size.
Merge commit '3e9bcb98c4190b18d113e79ead071a86cd7ca480'
* commit '3e9bcb98c4190b18d113e79ead071a86cd7ca480':
Set the thread pool size of NIST sip stack to one.
Set the thread pool size to one to fix the out-of-order packets
seen in sip service when the device is waken up from sleep.
bug:http://b/3099715
Change-Id: Ia169e3fde77488068c369e3345ecf6a6d8ddf792
Merge commit 'f3a935f6aa421110c7b6f36f922223c195f751bc'
* commit 'f3a935f6aa421110c7b6f36f922223c195f751bc':
Make SipService listen to WIFI state change events.
+ Keep the wake lock for 500ms. (Some measurements on N1 indicate 160~180ms
needed to bring up InCallScreen but since INVITE doesn't come in frequently
we can be more generous just to be safe.)
+ Move MyWakeupLock out of SipService so SipSessionGroup can use it without
awkward inter-dependency with SipService.
+ Add acquire(int timeout) to be used to create the "timed" wake lock.
http://b/issue?id=3081828
Change-Id: Iffd1d78d1a5cae9f795252ada75310917095204d
+ Add MyWakeLock to maintain a global wake lock for multiple components.
+ Use a Set to store components that want to hold the lock.
+ When the first component enters the set, we grab the global wake lock.
+ When the set becomes empty, we release the global lock.
+ In places like no account being opened to receive calls, we reset the
wake lock just to be safe from possible leakage.
+ Make MyExecutor aware of the wake lock. It will grab the wake lock on
behalf of the task so that tasks don't need to worry about the lock.
+ Connectivity receiver is modified to be executed in MyExecutor.
+ WakeupTimer handler is already protected by AlarmManager's wake lock but
all the timeout handlers that register themselves to the WakeupTimer are
to be executed in MyExecutor to be protected by the wake lock.
+ Remove unnecessary code in the Keepalive and registration processes. Since
both processes are executed in MyExecutor submitted by the WakeupTimer (as
they are timeout handlers registered to the WakeupTimer), they don't need
to add themselves to MyExecutor explicitly in their run() callbacks.
+ Make the keepalive process wait for at most 3 seconds instead of forever for
server response. It could cause the wake lock to be held longer than necessary
and is a potential cause for ANR.
http://b/issue?id=3081828
Related bug:
http://b/issue?id=3087153
Change-Id: Idee0ddb837e67daa0d5092c012bb242bd7c18431
+ Grab a WIFI lock if any account is opened to receive calls and WIFI is enabled
+ Release the WIFI lock if no account is opened to receive calls or WIFI is
disabled
+ Remove screen on/off event receiver
http://b/issue?id=3077454
Change-Id: Ifdf60a850bcf4106c75ec1e7563b26d8b33d7e92
Merge commit '833db40866ebf27be33aa387d08a2cb0b9a4246d'
* commit '833db40866ebf27be33aa387d08a2cb0b9a4246d':
Do not release the wifi lock if the screen is off.
Merge commit '77880ae4187d92506848249585687fc9d0c0dd25'
* commit '77880ae4187d92506848249585687fc9d0c0dd25':
SipService: add permission check for using API
Merge commit '4b7ff734611666a68471c97fabb6f516efab25cd'
* commit '4b7ff734611666a68471c97fabb6f516efab25cd':
Suppress harder for echo without affecting the volume of real voice.
Merge commit '3cb2d3be6cb501c77c7a5765d954363125857cca'
* commit '3cb2d3be6cb501c77c7a5765d954363125857cca':
SipService: supply PendingIntent when open a profile.
Add a retry count and give up after two attempts.
Also stop auto registration when server is unreachable.
And rename onError() to restartLater() for better readability.
http://b/issue?id=3066573
Change-Id: Icfa65c58546a1e2bf8e59e29584a3926c53c479b