SecurityException: This caller's com.android.settings package is not running in the ProcessRecord process

I am using an ActivityGroup for the TAB UI, and one tab is the Android Settings view. I used this method to inject into:

final Intent settings = new Intent(android.provider.Settings.ACTION_SETTINGS);
settings.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
Window subActivity = getLocalActivityManager().startActivity("SubActivity_Settings", settings);
vSettings = subActivity.getDecorView();

And it works fine in Android 2.3.3, but now I need to upgrade to Android 4.0. Unfortunately, this does not work with an exception, as shown below:

05-13 07: 02: 36.242: E / AndroidRuntime (1118): java.lang.RuntimeException: cannot resume {com.android.settings / com.android.settings.Settings}: java.lang.SecurityException: This package caller com.android.settings not started in ProcessRecord {414674b0 1118: com.gul.desktop / 10040}

Can friends tell me how to solve them, and what is ProcessRecord?

+3
2

ActivityGroup TAB UI

API 11.

Android 2.3.3

. , " ", - , . Android 4.0 .

, ?

, , SDK. "" startActivity(), Intent , android.provider.Settings.

+3

, manifest .

ex:

<activity android:name=".MainActivity" android:label="@string/app_name"> 
                         ^^^^^^^^^^^^
     <intent-filter> 
         <action android:name="android.intent.action.MAIN" />
         <category android:name="android.intent.category.LAUNCHER" />
     </intent-filter>
 </activity>

<activity android:name=".MainActivity"> </activity>
                         ^^^^^^^^^^^^  

.... , ..!

0

All Articles