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