Android Question Has anyone also seen the "Non-SDK interfaces usage" warning?

fredo

Well-Known Member
Licensed User
Longtime User
Our apps are regularly tested for problems in the "Firebase Test Lab".

Today was the first time a warning "Non-SDK interfaces usage" was issued:
31-07-_2018_10-01-56.jpg

B4X:
Non-SDK interfaces usage

Your app uses 16 non-SDK interfaces, which are incompatible with Android P+. Sample of used non-SDK interfaces:

Landroid/graphics/drawable/GradientDrawable$GradientState;->mSolidColors:Landroid/content/res/ColorStateList;

Landroid/hardware/input/InputManager;->INJECT_INPUT_EVENT_MODE_WAIT_FOR_FINISH:I

Landroid/hardware/input/InputManager;->getInstance()Landroid/hardware/input/InputManager;

Landroid/hardware/input/InputManager;->injectInputEvent(Landroid/view/InputEvent;I)Z

Landroid/os/Message;->flags:I

Landroid/os/Message;->recycleUnchecked()V

Landroid/os/Message;->when:J

Landroid/os/MessageQueue;->mMessages:Landroid/os/Message;

Landroid/os/MessageQueue;->next()Landroid/os/Message;

Landroid/view/View;->mAccessibilityDelegate:Landroid/view/View$AccessibilityDelegate;

Landroid/view/ViewConfiguration;->getDoubleTapMinTime()I

Landroid/view/WindowManagerGlobal;->getInstance()Landroid/view/WindowManagerGlobal;

Landroid/view/WindowManagerGlobal;->mParams:Ljava/util/ArrayList;

Landroid/view/WindowManagerGlobal;->mViews:Ljava/util/ArrayList;

Landroid/widget/AbsListView;->mFastScroll:Landroid/widget/FastScroller;

Ljava/nio/Buffer;->address:J

A first search led to this 31-07-_2018_10-21-01.jpg

However, due to a lack of background knowledge, no need for action could be derived from this.


Can anyone with certainty say what the necessary steps will be?





 

Erel

B4X founder
Staff member
Licensed User
Longtime User
The Message and MessageQueue calls are related to DoEvents and Msgbox. They are indeed based on reflection but they do work on Android P.
I'm using an Android P device for several months now. I don't think that this report is accurate.

If you call Msbox on an Android P device then you will see these messages in the unfiltered logs:

Accessing hidden method Landroid/os/MessageQueue;->next()Landroid/os/Message; (light greylist, reflection)
Accessing hidden field Landroid/os/Message;->when:J (light greylist, reflection)
Accessing hidden field Landroid/os/Message;->flags:I (light greylist, reflection)
Accessing hidden method Landroid/os/Message;->recycleUnchecked()V (light greylist, reflection)

light greylist methods will work properly: https://developer.android.com/preview/restrictions-non-sdk-interfaces

With that said, you should avoid using modal dialogs or calling DoEvents: DoEvents deprecated and async dialogs

I think that the other methods from this report are also considered light greylist. The best option is to test it on an Android P device.
 
Upvote 0
Top