在Android文檔AppWidgetManager它說Android Widget以某種方式被允許超過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×600×4 = 1,920,000字節)。我查看了Android平臺的源代碼,它似乎沒有使用ashmem與管道或任何深奧的東西,只是一個normal AIDL file和裏面的RemoteViews的位圖對象是Parcelable在正常的方式(它does drop down to native code,但它似乎寫入所有的位圖像素到一個普通的包裹)。
那麼Android如何超過Binder交易限制? oneway
是否允許發送更大的數據?
由於我看到過人們在應用程序窗口小部件中發生綁定事務失敗的問題,所以我質疑AppWidgetManager文檔在這一點上的準確性。 – CommonsWare
謝謝,它似乎確實是文檔錯誤。 – satur9nine