user1384991
user1384991

Reputation: 2629

Adjusting MediaController source issues

I'd like to adjust layout in standard MediaController class.For that I downloaded it's source file from here. It seems to be easy to tweak layouts, however I have problems with the following lines:

127 - Here eclipse says it can't find PolicyManager - doesit mean I have to download it too ? I guess there must another solution for that.

416 - Here it wants to cast like that ((Object) event).isDown(), which is strange and doesn't solve anything.

Any suggestions're welcome. Thanks.

Upvotes: 0

Views: 286

Answers (1)

yorkw
yorkw

Reputation: 41126

127 - Here eclipse says it can't find PolicyManager - doesit mean I have to download it too ? I guess there must another solution for that.

PolicyManager is a class under package com.android.internal in APIs.

416 - Here it wants to cast like that ((Object) event).isDown(), which is strange and doesn't solve anything.

KeyEvent.isDown() is annotated as Hide in APIs.

Generally speaking, the development API (android.jar) that google provides to consumer developer has the internal (com.android.internal) and hidden (@hide) APIs stripped off. However, the runtime API (framework.jar) that installed on the actual device has everything.

If you want to use these internal and hide API in your code, the solution is to use either reflection or the workaround inazaruk explained in his blog here.

Hope this helps.

Upvotes: 1

Related Questions