From be538c26d5ae907095fbeaeba1a9f8f3626a9129 Mon Sep 17 00:00:00 2001 From: "Philip P. Moltmann" Date: Tue, 14 May 2019 13:50:48 -0700 Subject: [PATCH] Bind print svcs as "in foreground" for location Test: Interacted with wifi-direct printers Fixes: 132715500 Change-Id: Icead54500bf1557e88139a3b37085d3579d526fc --- .../java/com/android/server/print/RemotePrintService.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/services/print/java/com/android/server/print/RemotePrintService.java b/services/print/java/com/android/server/print/RemotePrintService.java index 4f0d6f1d55357..502cd2c60f4aa 100644 --- a/services/print/java/com/android/server/print/RemotePrintService.java +++ b/services/print/java/com/android/server/print/RemotePrintService.java @@ -572,7 +572,8 @@ private void ensureBound() { boolean wasBound = mContext.bindServiceAsUser(mIntent, mServiceConnection, Context.BIND_AUTO_CREATE | Context.BIND_FOREGROUND_SERVICE - | Context.BIND_ALLOW_INSTANT, new UserHandle(mUserId)); + | Context.BIND_INCLUDE_CAPABILITIES | Context.BIND_ALLOW_INSTANT, + new UserHandle(mUserId)); if (!wasBound) { if (DEBUG) {