MCPcopy Create free account
hub / github.com/M66B/FairEmail / getExecutor

Method getExecutor

app/src/main/java/eu/faircode/email/SimpleTask.java:130–141  ·  view source on GitHub ↗
(Context context)

Source from the content-addressed store, hash-verified

128 }
129
130 @NonNull
131 private ExecutorService getExecutor(Context context) {
132 if (wl == null) {
133 PowerManager pm = Helper.getSystemService(context, PowerManager.class);
134 wl = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, BuildConfig.APPLICATION_ID + ":task");
135 }
136
137 if (localExecutor != null)
138 return localExecutor;
139
140 return globalExecutor;
141 }
142
143 @NonNull
144 private Handler getHandler() {

Callers 2

runMethod · 0.95
cancelMethod · 0.95

Calls 1

getSystemServiceMethod · 0.95

Tested by

no test coverage detected