在 AppWidgetManager 的 Android 文档中写道:
几乎所有市场上的Android设备都有足够大的屏幕,使得填充它的位图将超过1Mb(例如800 x 600 x 4 = 1,920,000字节)。我查看了Android平台源代码,似乎没有使用管道或任何奇特的ashmem,只是一个normal AIDL file和在RemoteViews中,位图对象以正常方式进行可包含化处理(它确实降级到本地代码但似乎将所有位图像素写入常规Parcel)。那么Android如何可能超过Binder事务限制?是否
The total Bitmap memory used by the RemoteViews object cannot exceed that required
to fill the screen 1.5 times, ie. (screen width x screen height x 4 x 1.5) bytes.
但是TransactionTooLargeException的文档说:
The Binder transaction buffer has a limited fixed size, currently 1Mb, which is
shared by all transactions in progress for the process.
几乎所有市场上的Android设备都有足够大的屏幕,使得填充它的位图将超过1Mb(例如800 x 600 x 4 = 1,920,000字节)。我查看了Android平台源代码,似乎没有使用管道或任何奇特的ashmem,只是一个normal AIDL file和在RemoteViews中,位图对象以正常方式进行可包含化处理(它确实降级到本地代码但似乎将所有位图像素写入常规Parcel)。那么Android如何可能超过Binder事务限制?是否
oneway
允许发送更大的数据?
AppWidgetManager
文档在这一点上的准确性产生了质疑。 - CommonsWare