Skip to content

patches broke for CM11-M6 #20

Description

@Lanchon

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?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions