Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Poll the telephone manager for neighboring cell infos #99

Merged

Conversation

rtreffer
Copy link

This commit makes the getNeighboringCells call more reliable by polling the modem on events and for 10 seconds.

@E3V3A
Copy link
Contributor

E3V3A commented Aug 15, 2014

@rtreffer Hi Rene, and welcome! Thanks for update. We'll have to hear from @xLaMbChOpSx if he agree to merge this. Can you please clarify the 10 second part (and how that agree with the poll time in "Settings") and why this is more reliable?

@rtreffer
Copy link
Author

@E3V3A the call to getNeighboringCells may return an empty result, because it's a "return data if available" call.

This means you can do 2 things

  • Poll the modem in the hope that it becomes available (every second for 10s is just a random guess, more testers needed) (works well on newer devices)
  • Check for modem activity (educated guess: the modem did s.th. - see if it looked for towers) (works well on older devices, I had to use this on my Nexus One)

And that's basically what I've implemented here.

It is unrelated to the refresh rate of the cell info tab.

@SecUpwN
Copy link
Member

SecUpwN commented Aug 19, 2014

@rtreffer, I am EXTREMELY thankful for your pull request! Sadly, our leading developer @xLaMbChOpSx keeps having phases where he is not reachable and/or cannot review code. That is exactly the reason why we are still looking for people like you to help him with the challenges.

I took a glance at your code and I like it. Would it be possible for you to erase as many Issues as possible from this huge list to enable @E3V3A presenting our App at xda:devcon 2014? This is really one of our bigger goals to reach a broader audience. The listed bugs currently prevent it. And if you are capable of making our code awesome, you'll have my vote to be added to our team. Bring it on! 👍

@xLaMbChOpSx
Copy link
Contributor

I can check this out tonight if you like I had a look through on my phone and it looks good but I will merge and build with this and other changes and let you know how it goes.

@rtreffer
Copy link
Author

@xLaMbChOpSx @SecUpwN no need to hurry on this one. It looks like this method is called from the UI thread, twice. I'll have to check / fix that as well.

Regarding the Bug list: I guess this could be mixed with a cell info list cleanup?

@xLaMbChOpSx xLaMbChOpSx merged commit 3f26715 into CellularPrivacy:master Aug 19, 2014
@rtreffer
Copy link
Author

Thank you!

@xLaMbChOpSx
Copy link
Contributor

No problems I also corrected the issue you identified with the method being called on the UI thread, it is now handled through an async task.

@E3V3A
Copy link
Contributor

E3V3A commented Aug 19, 2014

I just tried the "latest" version 0.1.24 from @xLaMbChOpSx post. It FC's on both my testing phones I9100, I9195, when attempting to go to "Cell Information". Can you please post your changes somewhere so that other developers (if any) may also review and test to see what's going on?

@rtreffer The last alpha I had working with Neighboring cells on the S2 was 0.1.21, AFAICR. I also commented on your other post about LAC/CID.

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

Successfully merging this pull request may close these issues.

4 participants