Snap for 4963492 from 6334c8adf80e7f02c1e8a72a55c7e44b685e9d5a to pi-qpr1-release
Change-Id: I92a6e716621d56ca94fbfc8780dcd4e8b41538e6
diff --git a/src/com/google/android/traceur/AtraceService.java b/src/com/google/android/traceur/AtraceService.java
index 2c0f15f..bd44117 100644
--- a/src/com/google/android/traceur/AtraceService.java
+++ b/src/com/google/android/traceur/AtraceService.java
@@ -81,6 +81,7 @@
Context context = getApplicationContext();
Intent stopIntent = new Intent(Receiver.STOP_ACTION,
null, context, Receiver.class);
+ stopIntent.addFlags(Intent.FLAG_RECEIVER_FOREGROUND);
String title = context.getString(R.string.trace_is_being_recorded);
String msg = context.getString(R.string.tap_to_stop_tracing);
diff --git a/src/com/google/android/traceur/FileSender.java b/src/com/google/android/traceur/FileSender.java
index d38a1be..630726f 100644
--- a/src/com/google/android/traceur/FileSender.java
+++ b/src/com/google/android/traceur/FileSender.java
@@ -43,7 +43,7 @@
final Uri traceUri = getUriForFile(context, file);
Intent sendIntent = buildSendIntent(context, traceUri);
- sendIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
+ sendIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_RECEIVER_FOREGROUND);
final Notification.Builder builder =
new Notification.Builder(context, Receiver.NOTIFICATION_CHANNEL)