Jar cross call in android structure

I am changing the structure of the jelly bean to be able to power off when the power button is long pressed.

In frameworks/base/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java

,

I need to call the class: ShutdownThread to open the power off dialog.

PhoneWindowManager.java

is inside android.policy.jar

ShutdownThread.java

is inside services.jar

Services Android.mk

useandroid.policy library

LOCAL_MODULE:= services

LOCAL_JAVA_LIBRARIES := android.policy

      

In the policy, Android.mk

I need to add a service library to be able to use ShutdownThread

LOCAL_MODULE := android.policy

LOCAL_JAVA_LIBRARIES := services (<---I add this)

      

If I only mm the current folder, it compiles fine and works fine.

But when I clear the android assembly, I get an error that cannot find the ShutdownThread symbol.

How to solve this situation?

+3


source to share





All Articles