Commit d7c0de6a authored by Karthik Gopalan's avatar Karthik Gopalan
Browse files

Performance: Activity Trigger frameworks support (#2)

The following functionalities were squashed as part of
Performance: Activity Trigger frameworks support 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

This change also refactors the code and brings in changes w.r.t the refactoring
of ActivityManagerService.

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