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

Method launchAdjacent

app/src/main/java/eu/faircode/email/Helper.java:1347–1354  ·  view source on GitHub ↗
(Context context, boolean document)

Source from the content-addressed store, hash-verified

1345 }
1346
1347 private static boolean launchAdjacent(Context context, boolean document) {
1348 // https://developer.android.com/guide/topics/large-screens/multi-window-support#launch_adjacent
1349 Configuration config = context.getResources().getConfiguration();
1350 boolean portrait = (config.orientation == Configuration.ORIENTATION_PORTRAIT);
1351 SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
1352 return (prefs.getBoolean("adjacent_" + (portrait ? "portrait" : "landscape"), false) &&
1353 prefs.getBoolean("adjacent_" + (document ? "documents" : "links"), document));
1354 }
1355
1356 static boolean customTabsWarmup(Context context) {
1357 if (context == null)

Callers 2

_shareMethod · 0.95
viewMethod · 0.95

Calls 2

getBooleanMethod · 0.80
getResourcesMethod · 0.45

Tested by

no test coverage detected