Merge "DO NOT MERGE - Disable warning on blocking one-way call from autofill server." into pi-dev

am: 8c55e8c306

Change-Id: Id7dbe84b8b33d94b7d60d2c8ae404e8dc5701e13
This commit is contained in:
Felipe Leme
2018-03-07 21:36:39 +00:00
committed by android-build-merger
2 changed files with 17 additions and 1 deletions

View File

@@ -2237,6 +2237,22 @@ public class AssistStructure implements Parcelable {
return mWindowNodes.get(index);
}
// TODO(b/35708678): temporary method that disable one-way warning flag on binder.
/** @hide */
public void ensureDataForAutofill() {
if (mHaveData) {
return;
}
mHaveData = true;
Binder.allowBlocking(mReceiveChannel);
try {
ParcelTransferReader reader = new ParcelTransferReader(mReceiveChannel);
reader.go();
} finally {
Binder.defaultBlocking(mReceiveChannel);
}
}
/** @hide */
public void ensureData() {
if (mHaveData) {

View File

@@ -254,7 +254,7 @@ final class Session implements RemoteFillService.FillServiceCallbacks, ViewState
// change AssistStructure so it provides a "one-way" writeToParcel() method that
// sends all the data
try {
structure.ensureData();
structure.ensureDataForAutofill();
} catch (RuntimeException e) {
wtf(e, "Exception lazy loading assist structure for %s: %s",
structure.getActivityComponent(), e);