Developer Preview 3 came out today and I've noticed some changes related to non-SDK interfaces:
Accessing the following API produces different logs on DP2 and DP3
Class<?> androidIdClass = Class.forName("com.android.internal.R$id");
Integer search_close_btn = getFieldValue(androidIdClass, null, "search_close_btn");
DP2:
Accessing hidden field Lcom/android/internal/R$id;->search_close_btn:I (blacklist, reflection)
Result: NoSuchFieldException, unable to access the field
DP3: Accessing hidden field Lcom/android/internal/R$id;->search_close_btn:I (dark greylist, reflection)
Result: the field is accessible
Can please someone explain why this field become available in DP3 and what is difference between dark greylist and blacklist ?
Can please someone explain why this field become available in DP3?
what is the difference between dark greylist and blacklist?
Blacklist are calls which are not going to work irrespective of what API level your application is going to target.
Dark greylist are calls which won't work if and only if your application is targeting API level 28 else they would work normally.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With