| 1776 | } |
| 1777 | |
| 1778 | private class Idler implements MessageQueue.IdleHandler { |
| 1779 | @Override |
| 1780 | public final boolean queueIdle() { |
| 1781 | ActivityClientRecord a = mNewActivities; |
| 1782 | boolean stopProfiling = false; |
| 1783 | if (mBoundApplication != null && mProfiler.profileFd != null |
| 1784 | && mProfiler.autoStopProfiler) { |
| 1785 | stopProfiling = true; |
| 1786 | } |
| 1787 | if (a != null) { |
| 1788 | mNewActivities = null; |
| 1789 | IActivityManager am = ActivityManagerNative.getDefault(); |
| 1790 | ActivityClientRecord prev; |
| 1791 | do { |
| 1792 | if (localLOGV) Slog.v( |
| 1793 | TAG, "Reporting idle of " + a + |
| 1794 | " finished=" + |
| 1795 | (a.activity != null && a.activity.mFinished)); |
| 1796 | if (a.activity != null && !a.activity.mFinished) { |
| 1797 | try { |
| 1798 | am.activityIdle(a.token, a.createdConfig, stopProfiling); |
| 1799 | a.createdConfig = null; |
| 1800 | } catch (RemoteException ex) { |
| 1801 | throw ex.rethrowFromSystemServer(); |
| 1802 | } |
| 1803 | } |
| 1804 | prev = a; |
| 1805 | a = a.nextIdle; |
| 1806 | prev.nextIdle = null; |
| 1807 | } while (a != null); |
| 1808 | } |
| 1809 | if (stopProfiling) { |
| 1810 | mProfiler.stopProfiling(); |
| 1811 | } |
| 1812 | ensureJitEnabled(); |
| 1813 | return false; |
| 1814 | } |
| 1815 | } |
| 1816 | |
| 1817 | final class GcIdler implements MessageQueue.IdleHandler { |
| 1818 | @Override |
nothing calls this directly
no outgoing calls
no test coverage detected