Commit 028872f
Jeff Brown
Fix GpsLocationProvider wake lock book keeping.
The GpsLocationProvider typically acquires a wake lock
before sending a message to its handler then releases it
after the message has been handled.
There were two cases where messages might be removed from
the handler, resulting in the wake lock being released.
There were also two cases where background tasks were being
started while not holding a wake lock for the duration.
Fixed these issues and marked the GpsLocationProvider handler
as asynchronous too so that it doesn't accidentally get
blocked by traversals if it happens to share a thread with some UI.
Bug: 7057752
Change-Id: I8e12fc91ae943e84db068c08ec809879537503c61 parent a2910d0 commit 028872f
File tree
1 file changed
+20
-8
lines changed- services/java/com/android/server/location
1 file changed
+20
-8
lines changedLines changed: 20 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
598 | 598 | | |
599 | 599 | | |
600 | 600 | | |
| 601 | + | |
| 602 | + | |
601 | 603 | | |
602 | 604 | | |
603 | 605 | | |
| |||
628 | 630 | | |
629 | 631 | | |
630 | 632 | | |
631 | | - | |
| 633 | + | |
632 | 634 | | |
633 | 635 | | |
634 | 636 | | |
635 | 637 | | |
636 | | - | |
637 | | - | |
| 638 | + | |
638 | 639 | | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
639 | 643 | | |
640 | 644 | | |
641 | 645 | | |
| |||
652 | 656 | | |
653 | 657 | | |
654 | 658 | | |
| 659 | + | |
| 660 | + | |
655 | 661 | | |
656 | 662 | | |
657 | 663 | | |
| |||
664 | 670 | | |
665 | 671 | | |
666 | 672 | | |
667 | | - | |
| 673 | + | |
668 | 674 | | |
669 | 675 | | |
670 | 676 | | |
671 | 677 | | |
672 | | - | |
673 | | - | |
674 | | - | |
| 678 | + | |
675 | 679 | | |
676 | | - | |
677 | 680 | | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
678 | 684 | | |
679 | 685 | | |
680 | 686 | | |
| |||
1475 | 1481 | | |
1476 | 1482 | | |
1477 | 1483 | | |
| 1484 | + | |
| 1485 | + | |
1478 | 1486 | | |
1479 | 1487 | | |
1480 | 1488 | | |
1481 | 1489 | | |
1482 | 1490 | | |
| 1491 | + | |
| 1492 | + | |
| 1493 | + | |
| 1494 | + | |
1483 | 1495 | | |
1484 | 1496 | | |
1485 | 1497 | | |
| |||
0 commit comments