I am having an Android app and due to Play Store polices which require an app to target Android Oreo to update it I am planning to migrate my TargetSdkVersion to Android Oreo.
I was browsing the changes in Android 7.0 I could not understand a particular part.
If an app posts Runnable tasks to a View, and the View is not attached to a window, the system queues the Runnable task with the View; the Runnable task does not execute until the View is attached to a window. This behavior fixes the following bugs:
If an app posted to a View from a thread other than the intended window’s UI thread, the Runnable may run on the wrong thread as a result.
If the Runnable task was posted from a thread other than a looper thread, the app could expose the Runnable task.
Can any one please help me understand this with an example case scenario as I am using runnable attached to views in various parts of my apps.
Any Help would be grateful.
Comments
Post a Comment