Send the tethering entitlement broadcast to manifest receivers

Bug 35661943
Test: manual

Change-Id: I8bf9fcd7634c15b2380e83274db18eb29f993686
This commit is contained in:
Christopher Tate
2017-02-22 11:10:10 -08:00
parent aba2c95ae0
commit 9ea3dcb994
2 changed files with 3 additions and 1 deletions

View File

@@ -252,7 +252,8 @@ public class TetherService extends Service {
Intent intent = new Intent(provisionAction); Intent intent = new Intent(provisionAction);
int type = mCurrentTethers.get(index); int type = mCurrentTethers.get(index);
intent.putExtra(TETHER_CHOICE, type); intent.putExtra(TETHER_CHOICE, type);
intent.setFlags(Intent.FLAG_RECEIVER_FOREGROUND); intent.setFlags(Intent.FLAG_RECEIVER_FOREGROUND
| Intent.FLAG_RECEIVER_INCLUDE_BACKGROUND);
return intent; return intent;
} }

View File

@@ -415,6 +415,7 @@ public class TetherServiceTest extends ServiceTestCase<TetherService> {
private void sendResponse(int response, Context context) { private void sendResponse(int response, Context context) {
Intent responseIntent = new Intent(TEST_RESPONSE_ACTION); Intent responseIntent = new Intent(TEST_RESPONSE_ACTION);
responseIntent.addFlags(Intent.FLAG_RECEIVER_INCLUDE_BACKGROUND);
responseIntent.putExtra(TetherService.EXTRA_RESULT, response); responseIntent.putExtra(TetherService.EXTRA_RESULT, response);
context.sendBroadcast( context.sendBroadcast(
responseIntent, android.Manifest.permission.CONNECTIVITY_INTERNAL); responseIntent, android.Manifest.permission.CONNECTIVITY_INTERNAL);