Commit dd995403 authored by Varun Garg's avatar Varun Garg Committed by Gerrit - the friendly Code Review server
Browse files

Performance: Activity Trigger frameworks support

The following functionalities are squashed in this change

1. Introduce Support for Activity Triger framework
   CRs-Fixed: 2061121

2. Fix the potential dead lock risk issue

    This fix is related to IR-207049.
    Issue Diagram:

    Thread 1:
    onReceive {
    ......
      lock mNetworkPoliciesSecondLock; //get the lock.
    ......
      lock AMS; //here obj2 is held by Thread2, wait here.
    }
    Thread 2:
    binderDied {
    ......
      lock AMS; //get the lock.
    ......
      networkOptsCheck {
     ......
        lock mNetworkPoliciesSecondLock; //here obj1 is held by Thread1, wait here.
      ......
      }
    }

    The orignal design has potential dead lock risk.
    Removing the checking codes from networkOptsCheck,  using handle to consume
    NETWORK_OPTS_CHECK_MSG, this can fix the dead lock issue.
    Optimizing the onReceive part, only when network changes, then we trigger getActiveNetworkInfo,
    don't need trigger this in message handler each time.

    CRs-Fixed: 2018540

   Squash of following change-IDs:
      Change-Id: I53aec1b92f7332aaae43ba8609cfc4818da488b0
      Change-Id: Ifa604d12290176ae24b0149a541a7014c4839df2

Change-Id: I53aec1b92f7332aaae43ba8609cfc4818da488b0
parent c1047344
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment