Merge "Add logging when tile cannot be found" into udc-dev

This commit is contained in:
Fabian Kozynski
2023-05-09 14:55:46 +00:00
committed by Android (Google) Code Review

View File

@@ -344,9 +344,26 @@ public class TileServices extends IQSService.Stub {
verifyCaller(customTile);
return customTile.getQsTile();
}
Log.e(TAG, "Tile for token " + token + "not found. "
+ "Tiles in map: " + availableTileComponents());
return null;
}
private String availableTileComponents() {
StringBuilder sb = new StringBuilder("[");
synchronized (mServices) {
mTokenMap.forEach((iBinder, customTile) ->
sb.append(iBinder.toString())
.append(":")
.append(customTile.getComponent().flattenToShortString())
.append(":")
.append(customTile.getUser())
.append(","));
}
sb.append("]");
return sb.toString();
}
@Override
public void startUnlockAndRun(IBinder token) {
CustomTile customTile = getTileForToken(token);