-
Notifications
You must be signed in to change notification settings - Fork 24
Description
this commit broke compatibility:
CyanogenMod/android_frameworks_base@fe9b529
by changing CONNECTIVITY_SERVICE from a static service to a context dependent one.
mateor, are you still working on this? would you like to patch this up or should somebody else do it? also, there is code like this:
// BEGIN privacy-modified
//return new LocationManager(ctx, ILocationManager.Stub.asInterface(b));
Log.d(TAG, "PDroid:ContextImpl: returning PrivacyLocationManager");
// SM: I'm not sure whyt this is using getStaticOuterContext rather than getOuterContext.
// Would have thought it should have been the following line:
// return new PrivacyLocationManager(ILocationManager.Stub.asInterface(b), ctx.getOuterContext());
return new PrivacyLocationManager(ILocationManager.Stub.asInterface(b), getStaticOuterContext());
// END privacy-modified
this led me to look a bit into the code. it seems that ContextImpl.getStaticOuterContext() should always be == ctx since there is exactly one ContextImpl instance per process. is this true? and is ctx.getOuterContext() not always == ctx because somebody calls setOuterContext? it would seem so, otherwise what would be the purpose of xxxOuterContext? can you shed some light on this?
getStaticOuterContext is potentially unsafe. is it me or is OPDs codebase kind of dirty?