microg / RemoteDroidGuard

Service to run Google's DroidGuard binary in an isolated environment
94 stars 28 forks source link

Unbind service to prevent leak #28

Closed alexandruchircu closed 4 years ago

alexandruchircu commented 4 years ago

See comments in patch please.

ale5000-git commented 4 years ago

I think unbindService doesn't need to be inside the try/catch but probably bindService need a try/catch since:

This method will throw SecurityException if the calling app does not have permission to bind to the given service.

Also in my opinion the b variable isn't needed, this is probably enough:

        if (!context.bindService(intent, c, Context.BIND_AUTO_CREATE))
            return false;
alexandruchircu commented 4 years ago

I think unbindService doesn't... ...

@ale5000-git Something like the latest commits?

ale5000-git commented 4 years ago

It seems fine, now we should wait @mar-v-in