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

Class ActivityThread

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

This manages the execution of the main thread in an application process, scheduling and executing activities, broadcasts, and other operations on it as the activity manager requests. {@hide}

Source from the content-addressed store, hash-verified

187 * {@hide}
188 */
189public final class ActivityThread {
190 /** @hide */
191 public static final String TAG = "ActivityThread";
192 private static final android.graphics.Bitmap.Config THUMBNAIL_FORMAT = Bitmap.Config.RGB_565;
193 static final boolean localLOGV = false;
194 static final boolean DEBUG_MESSAGES = false;
195 /** @hide */
196 public static final boolean DEBUG_BROADCAST = false;
197 private static final boolean DEBUG_RESULTS = false;
198 private static final boolean DEBUG_BACKUP = false;
199 public static final boolean DEBUG_CONFIGURATION = false;
200 private static final boolean DEBUG_SERVICE = false;
201 private static final boolean DEBUG_MEMORY_TRIM = false;
202 private static final boolean DEBUG_PROVIDER = false;
203 private static final boolean DEBUG_ORDER = false;
204 private static final long MIN_TIME_BETWEEN_GCS = 5*1000;
205 private static final int SQLITE_MEM_RELEASED_EVENT_LOG_TAG = 75003;
206 private static final int LOG_AM_ON_PAUSE_CALLED = 30021;
207 private static final int LOG_AM_ON_RESUME_CALLED = 30022;
208 private static final int LOG_AM_ON_STOP_CALLED = 30049;
209
210 /** Type for IActivityManager.serviceDoneExecuting: anonymous operation */
211 public static final int SERVICE_DONE_EXECUTING_ANON = 0;
212 /** Type for IActivityManager.serviceDoneExecuting: done with an onStart call */
213 public static final int SERVICE_DONE_EXECUTING_START = 1;
214 /** Type for IActivityManager.serviceDoneExecuting: done stopping (destroying) service */
215 public static final int SERVICE_DONE_EXECUTING_STOP = 2;
216
217 // Details for pausing activity.
218 private static final int USER_LEAVING = 1;
219 private static final int DONT_REPORT = 2;
220
221 // Whether to invoke an activity callback after delivering new configuration.
222 private static final boolean REPORT_TO_ACTIVITY = true;
223
224 private ContextImpl mSystemContext;
225
226 static volatile IPackageManager sPackageManager;
227
228 final ApplicationThread mAppThread = new ApplicationThread();
229 final Looper mLooper = Looper.myLooper();
230 final H mH = new H();
231 final ArrayMap<IBinder, ActivityClientRecord> mActivities = new ArrayMap<>();
232 // List of new activities (via ActivityRecord.nextIdle) that should
233 // be reported when next we idle.
234 ActivityClientRecord mNewActivities = null;
235 // Number of activities that are currently visible on-screen.
236 int mNumVisibleActivities = 0;
237 ArrayList<WeakReference<AssistStructure>> mLastAssistStructures = new ArrayList<>();
238 private int mLastSessionId;
239 final ArrayMap<IBinder, Service> mServices = new ArrayMap<>();
240 AppBindData mBoundApplication;
241 Profiler mProfiler;
242 int mCurDefaultDisplayDpi;
243 boolean mDensityCompatMode;
244 Configuration mConfiguration;
245 Configuration mCompatConfiguration;
246 Application mInitialApplication;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected