From 92e9d96e377faf49f0748b161e9a7eb080cd36a7 Mon Sep 17 00:00:00 2001 From: Dmitri Plotnikov Date: Fri, 14 Feb 2020 10:29:03 -0800 Subject: [PATCH] Allow blocking calls to InstrumentationWatcher InstrumentationWatchers are used in tests, therefore we are not concerned about them misbehaving on production devices. Fixes: 147705910 Test: run an instrumentation test and there are no ONEWAY_FLAG warnings from BinderProxy Change-Id: I323d4598a4d8e5e754251d8d4f27c5c6a2faea2f --- .../java/com/android/server/am/InstrumentationReporter.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/services/core/java/com/android/server/am/InstrumentationReporter.java b/services/core/java/com/android/server/am/InstrumentationReporter.java index fdbb73e9fa0eb..7294308602961 100644 --- a/services/core/java/com/android/server/am/InstrumentationReporter.java +++ b/services/core/java/com/android/server/am/InstrumentationReporter.java @@ -18,6 +18,7 @@ package com.android.server.am; import android.app.IInstrumentationWatcher; import android.content.ComponentName; +import android.os.Binder; import android.os.Bundle; import android.os.Process; import android.os.RemoteException; @@ -109,6 +110,8 @@ public class InstrumentationReporter { mName = name; mResultCode = resultCode; mResults = results; + + Binder.allowBlocking(mWatcher.asBinder()); } }