[LG Optimus 2x] mateorod:
Update to 4.1.2 broke our frameworks build patch in ContextImpl. I patched it manually, here is the diff for that file:

--- ContextImpl.java.orig	2012-10-10 09:59:05.810896247 -0500
+++ ContextImpl.java	2012-10-10 10:04:54.936627469 -0500
@@ -93,6 +93,13 @@ import android.os.ServiceManager;
import android.os.UserId;
import android.os.SystemVibrator;
import android.os.storage.StorageManager;
+// BEGIN privacy-added
+import android.privacy.IPrivacySettingsManager;
+import android.privacy.PrivacySettingsManager;
+import android.privacy.surrogate.PrivacyAccountManager;
+import android.privacy.surrogate.PrivacyLocationManager;
+import android.privacy.surrogate.PrivacyTelephonyManager;
+// END privacy-added
import android.telephony.TelephonyManager;
import android.content.ClipboardManager;
import android.util.AndroidRuntimeException;
@@ -163,6 +170,7 @@ class ContextImpl extends Context {
private Resources mResources;
/*package*/ ActivityThread mMainThread;
private Context mOuterContext;
+ private static Context sOuterContext;
private IBinder mActivityToken = null;
private ApplicationContentResolver mContentResolver;
private int mThemeResource = 0;
@@ -276,7 +284,9 @@ class ContextImpl extends Context {
public Object createService(ContextImpl ctx) {
IBinder b = ServiceManager.getService(ACCOUNT_SERVICE);
IAccountManager service = IAccountManager.Stub.asInterface(b);
- return new AccountManager(ctx, service);
+ // BEGIN privacy-modified
+ return new PrivacyAccountManager(ctx, service);
+ // END privacy-modified
}});

registerService(ACTIVITY_SERVICE, new ServiceFetcher() {
@@ -371,7 +381,10 @@ class ContextImpl extends Context {
registerService(LOCATION_SERVICE, new ServiceFetcher() {
public Object createService(ContextImpl ctx) {
IBinder b = ServiceManager.getService(LOCATION_SERVICE);
- return new LocationManager(ctx, ILocationManager.Stub.asInterface(b));
+ // BEGIN privacy-modified
+ ILocationManager service = ILocationManager.Stub.asInterface(b);
+ return new PrivacyLocationManager(service,getStaticOuterContext());
+ // END privacy-modified
}});

registerService(NETWORK_POLICY_SERVICE, new ServiceFetcher() {
@@ -441,7 +454,9 @@ class ContextImpl extends Context {

registerService(TELEPHONY_SERVICE, new ServiceFetcher() {
public Object createService(ContextImpl ctx) {
- return new TelephonyManager(ctx.getOuterContext());
+ // BEGIN privacy-modified
+ return new PrivacyTelephonyManager(ctx.getOuterContext());
+ // END privacy-modified
}});

registerService(THROTTLE_SERVICE, new StaticServiceFetcher() {
@@ -503,6 +518,16 @@ class ContextImpl extends Context {
public Object createService(ContextImpl ctx) {
return WimaxHelper.createWimaxService(ctx, ctx.mMainThread.getHandler());
}});
+
+ // BEGIN privacy-added
+ registerService("privacy", new StaticServiceFetcher() {
+ public Object createStaticService() {
+ IBinder b = ServiceManager.getService("privacy");
+ IPrivacySettingsManager service = IPrivacySettingsManager.Stub.asInterface(b);
+ return new PrivacySettingsManager(getStaticOuterContext(),service);
+ }});
+ // END privacy-added
+
}

static ContextImpl getImpl(Context context) {
@@ -1570,7 +1595,7 @@ class ContextImpl extends Context {
}

ContextImpl() {
- mOuterContext = this;
+ sOuterContext = mOuterContext = this;
}

/**
@@ -1585,7 +1610,7 @@ class ContextImpl extends Context {
mResources = context.mResources;
mMainThread = context.mMainThread;
mContentResolver = context.mContentResolver;
- mOuterContext = this;
+ sOuterContext = mOuterContext = this;
}

final void init(LoadedApk packageInfo,
@@ -1645,13 +1670,17 @@ class ContextImpl extends Context {
}

final void setOuterContext(Context context) {
- mOuterContext = context;
+ sOuterContext = mOuterContext = context;
}

final Context getOuterContext() {
return mOuterContext;
}

+ final static Context getStaticOuterContext() {
+ return sOuterContext;
+ }
+
final IBinder getActivityToken() {
return mActivityToken;
}

The hunk that failed is (from the .rej):

--- core/java/android/app/ContextImpl.java	2012-07-13 09:01:07.581243949 -0700
+++ core/java/android/app/ContextImpl.java	2012-07-13 10:18:29.378676754 -0700
@@ -374,7 +384,10 @@
registerService(LOCATION_SERVICE, new StaticServiceFetcher() {
public Object createStaticService() {
IBinder b = ServiceManager.getService(LOCATION_SERVICE);
- return new LocationManager(ILocationManager.Stub.asInterface(b));
+ // BEGIN privacy-modified
+ ILocationManager service = ILocationManager.Stub.asInterface(b);
+ return new PrivacyLocationManager(service,getStaticOuterContext());
+ // END privacy-modified
}});

registerService(NETWORK_POLICY_SERVICE, new ServiceFetcher() {

However I keep getting build errors (I have deleted the objects itarget Java: framework

(/home/mateor/android/system/CM10b/out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/classes)
frameworks/base/privacy/java/android/privacy/surrogate/PrivacyLocationManager.java:39: cannot find symbol
symbol : constructor LocationManager(android.location.ILocationManager)
location: class android.location.LocationManager
super(service);
^
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 error
make: *** [/home/mateor/android/system/CM10b/out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/classes-full-debug.jar] Error 41
n JAVALIBRARIES) that say:

I will make clean and try it from scratch, but we won't know for awhile. Figured I would go ahead and let you know as I looked at in case you see something I did that might cause the patches to not work.

If you see it let me know.

Edit: Maybe it is as simple as:

public Object create[B]Static[/B]Service() {

Update: Nope. I replaced the entire section with the original patch code, but still couldn't get it to build. I am trying with just the make update-api, but the core and service build okay with that.

I have of course already made clean, so it could be awhile before I find out. Hopefully that wouldn't bite us elsewhere.