Add attribution tag for bypassing location toggle
Location query in SatelliteAccessController is used for emergency case, therefore it is needed to be added in bypass allowedlist
Howerver the caller com.android.phone is wide, so add the tag 'teltphony' to distinguith whether caller has in allowed list
Bug: 344012058
Test: manual - test using fake emergency call
Change-Id: If9c01a2d649ffd593f5448c80ee1fe69ccf62a21
diff --git a/src/com/android/phone/satellite/accesscontrol/SatelliteAccessController.java b/src/com/android/phone/satellite/accesscontrol/SatelliteAccessController.java
index 5fa73c9..ccef8a9 100644
--- a/src/com/android/phone/satellite/accesscontrol/SatelliteAccessController.java
+++ b/src/com/android/phone/satellite/accesscontrol/SatelliteAccessController.java
@@ -280,8 +280,10 @@
if (sInstance == null) {
HandlerThread handlerThread = new HandlerThread("SatelliteAccessController");
handlerThread.start();
+ LocationManager lm = context.createAttributionContext("telephony")
+ .getSystemService(LocationManager.class);
sInstance = new SatelliteAccessController(context, featureFlags,
- handlerThread.getLooper(), context.getSystemService(LocationManager.class),
+ handlerThread.getLooper(), lm,
context.getSystemService(TelecomManager.class), null, null);
}
return sInstance;