Skip to content

Commit 0924de4

Browse files
Kate MontgomeryAndroid Build Coastguard Worker
authored andcommitted
Fix bypass BAL via LocationManager.requestFlush
Bug: 235823542 Test: atest LocationProviderManagerTest and manual tests Change-Id: I2a0fa7b99c3ad5ae839d8018ec70cb5c26e33240 (cherry picked from commit 7d43a5b) Merged-In: I2a0fa7b99c3ad5ae839d8018ec70cb5c26e33240
1 parent 955123a commit 0924de4

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

services/core/java/com/android/server/location/provider/LocationProviderManager.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,7 @@ public void deliverOnLocationChanged(LocationResult locationResult,
300300
public void deliverOnFlushComplete(int requestCode) throws PendingIntent.CanceledException {
301301
BroadcastOptions options = BroadcastOptions.makeBasic();
302302
options.setDontSendToRestrictedApps(true);
303+
options.setPendingIntentBackgroundActivityLaunchAllowed(false);
303304

304305
mPendingIntent.send(mContext, 0, new Intent().putExtra(KEY_FLUSH_COMPLETE, requestCode),
305306
null, null, null, options.toBundle());

0 commit comments

Comments
 (0)