Skip pulling UwbActivityInfo if UWB service is not available
Bug: 284400250 Test: statsd_testdrive 10188 Change-Id: I55aa6694f9babe764442212039e53dea849d1a82
This commit is contained in:
@@ -1004,7 +1004,8 @@ public class StatsPullAtomService extends SystemService {
|
||||
}
|
||||
|
||||
private void initAndRegisterDeferredPullers() {
|
||||
mUwbManager = mContext.getSystemService(UwbManager.class);
|
||||
mUwbManager = mContext.getPackageManager().hasSystemFeature(PackageManager.FEATURE_UWB)
|
||||
? mContext.getSystemService(UwbManager.class) : null;
|
||||
|
||||
registerUwbActivityInfo();
|
||||
}
|
||||
@@ -2172,6 +2173,9 @@ public class StatsPullAtomService extends SystemService {
|
||||
}
|
||||
|
||||
private void registerUwbActivityInfo() {
|
||||
if (mUwbManager == null) {
|
||||
return;
|
||||
}
|
||||
int tagId = FrameworkStatsLog.UWB_ACTIVITY_INFO;
|
||||
mStatsManager.setPullAtomCallback(
|
||||
tagId,
|
||||
|
||||
Reference in New Issue
Block a user