You can see implementation at android source, line 399.
As I see, all changed keys are added into Map, so i can suggest tha it will be in alphabetical order.
Futher, onSharedPreferenceChanged
will be called from end of Map to begin (line 450).
So, in your example first will be called with (key == "int_1")
and second (key == "boolean_1")
.
Also, there is no matter how you put changes - as in first or in the second code, all listeners will be notified after calling apply()
.