Wednesday, April 10, 2013

[android-developers] java.lang.SecurityException: Requesting code from

Android4.0.3
Hi all,
         I wrote an android application, and sometimes  i got below issue while i use my application:
         ....
         E/AndroidRuntime(19081): Caused by: java.lang.SecurityException: Requesting code from com.android.local (with uid 10072)
         E/AndroidRuntime(19081):     at android.app.ActivityThread.getPackageInfo(ActivityThread.java:1582)
         E/AndroidRuntime(19081):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1852)
         E/AndroidRuntime(19081):     at android.app.ActivityThread.startActivityNow(ActivityThread.java:1797)
         E/AndroidRuntime(19081):     at android.app.LocalActivityManager.moveToState(LocalActivityManager.java:135)
         E/AndroidRuntime(19081):     at android.app.LocalActivityManager.startActivity(LocalActivityManager.java:347)
         E/AndroidRuntime(19081):     at com.chinamobile.cmi.jego.ui.activity.CallLogHomeActivity.onCreate(CallLogHomeActivity.java:93)
         E/AndroidRuntime(19081):     at android.app.Activity.performCreate(Activity.java:4465)
         E/AndroidRuntime(19081):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049)
         E/AndroidRuntime(19081):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1920)

I checked my codes,  the issue is in CallLogHomeActivity.java (it's an ActivityGroup), and while we try to call activityManager.startActivity("0", intent).getDecorView(); above issue may appear, but the frequency of above exception is too low.
I got this exception 3 times. I just tracked the android SDK codes, and found that in the

performLaunchActivity function(ActivityThread.java), below module
if (r.packageInfo == null)
{

            r.packageInfo = getPackageInfo(aInfo.applicationInfo, r.compatInfo,

                    Context.CONTEXT_INCLUDE_CODE)

}

will active above exception. Anyone got the same issue, could you help me?
(all of activities are in one pacakage, there is no any out-package activities)

--
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
---
You received this message because you are subscribed to the Google Groups "Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

No comments:

Post a Comment