MCPcopy Create free account
hub / github.com/FeJQ/AUPK / Idler

Class Idler

frameworks/base/core/java/android/app/ActivityThread.java:1778–1815  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected