It might cause deadlock sometimes:
The locking order of setEventsMask is:
registerDisplayListener -> <DMG.mLock> -> setEventsMask -> <class lock>;
The Locking order of handleMessage is:
Looper.loop -> Looper.loopOnce -> Handler.dispatchMessage -> handleMessage -> <class lock>;
Therefore, when the registerDisplayListener is called by client,
the DisplayListenerDelegate.handleMessage also called by DMS's callback,
at this time, if the method with DMG.mLock is called in handleMessage(),
it will lead to deadlock.
Test: (For example)
Thread A:
DisplayListenerDelegate.handleMessage() -> <class lock>
DisplayListener.onDisplayChanged() -> DMG.getCompatibleDisplay() ->
DMG.getDisplayInfo() -> <DMS.mLock>
Thead B:
DMG.registerDisplayListener() -> <DMS.mLock> -> DisplayListenerDelegate.setEventsMask() -> <class lock>
Signed-off-by: jiayongqiang <jiayongqiang@xiaomi.com>
Change-Id: Ie1a8728339c16fa8f4c4f5c758821c836fa1c96b
Stop differentiating between the different ways an APEX can contribute
to derive_classpath - it makes no difference for the use cases, and it
doesn't scale if new environment variables are added.
Bug: 210472252
Test: atest ComposTestCase
Change-Id: I9256a6b5cc3689a8d61d51e8eb8d8c3f475172aa
This goal doesn't exist anymore. The build system automatically
translates it to "sdk".
Test: m win_sdk dist && inspect out/dist/apistubs
Change-Id: Ifc4fb07ce32ef21906e8bb8eae0003b1486a525a
Due to aosp/1863058, we need to add the associated permission
Bug: 190422401
Tag: #refactor
Test: None in this CL.
Change-Id: Id1809b85aca57929cba0197ba9d35f926dfeaf1b
This includes:
1. Replace UserHandle.getUid(userId, appId) with public API
2. Remove Preconditions.checkArgument
3. Replace MathUtil.constrain with the one in NetworkStatsUtils
4. Remove Sets
5. Replace NetworkStack.checkNetworkStackPermission with the
one in the PermissionUtils
6. Replace internal CollectionUtils with the one in the module
7. Inline ProtoOutputStream(fd)
8. Replace Intent.EXTRA_USER_HANDLE with Intent.EXTRA_USER
Test: atest NetworkStatsSubscriptionsMonitorTest \
NetworkStatsServiceTest
Bug: 204830222
Change-Id: If06a27b04ad15c29052b670eefc2f6dc0d199420
Newly added UiccPortInfo and UiccSlotMapping classes and introduced
UiccPortInfo as a port list in UiccCardInfo and UiccSlotInfo,
Deprecated some constructors and updated callers.
Test: build
Bug: 159354974
Change-Id: I71e4e1ef649b7301d126dde23d53783761de940f
Merged-In: I71e4e1ef649b7301d126dde23d53783761de940f
1. Used SSID to be a wifi network identity can't separate wifi
data usage when there are two different network with same SSID.
Use a new usage key from WifiInfo to replace wifi SSID to solve
this issue.
2. To support to query wifi usage per configured Wifi network.
Adding matchWifiNetworkKeys in NetworkTemplate to support querying
multi networkKeys wifi data usage since each configured Wifi
network configuration might be used to connect different Wifi
network. (Replace mNetworkId with mMatchWifiNetworkKeys)
3. Updated callers who were using NetworkTemplate constructor.
4. Fixed SortedSet null order case. The null subscriberId is a
valid input for matchSubscriberIds.
5. Replaced ArrayUtils with CollectionUtils.
Bug: 197520752
Bug: 126299427
Test: atest -c NetworkTemplateTest
Test: atest -c NetworkStatsServiceTest
Test: atest -c NetworkPolicyManagerServiceTest
Test: atest -c NetworkPolicyTest
Change-Id: Ie20e7fb56597817901be4ce1d2a7afcbc9ded0c6
This includes:
1. Replace Slog with Log
2. Use android.util.IndentingPrintWriter instead of the
deprecated internal one.
3. Replace usages of ArrayUtils with CollectionUtils.
4. Reimplement DumpUtils#checkDumpPermission in PermissionUtils.
5. Replace MathUtils.constrain with NetworkStatsUtils.constrain
Test: FrameworksNetTests
Bug: 204830222
Change-Id: I2b064fc25497288d66018584e66da98c79bd208d
Enable device group based on CAP
Bug: 150670922
Bug: 178981521
Test: pair with the LE audio coordinated set, and make sure it works
Change-Id: Ia3d0dbe496dec822fee8ae6465b81688b9e9440c
Merged-In: Ia3d0dbe496dec822fee8ae6465b81688b9e9440c