use of com.saggitt.omega.predictions.AppTargetIdCompat in project Neo-Launcher by NeoApplications.
the class PredictionAppTracker method onStartApp.
@Override
@UiThread
public void onStartApp(ComponentName cn, UserHandle user, String container) {
if (cn != null) {
AppTargetCompat target = new AppTargetCompat.Builder(new AppTargetIdCompat("app:" + cn), cn.getPackageName(), user).setClassName(cn.getClassName()).build();
sendLaunch(target, container);
// Relay onStartApp to every connected plugin.
mAppLaunchEventsPluginsList.forEach(plugin -> plugin.onStartApp(cn, user, container != null ? container : CONTAINER_DEFAULT));
}
}
use of com.saggitt.omega.predictions.AppTargetIdCompat in project Neo-Launcher by NeoApplications.
the class PredictionAppTracker method onDismissApp.
@Override
@UiThread
public void onDismissApp(ComponentName cn, UserHandle user, String container) {
if (cn == null)
return;
AppTargetCompat target = new AppTargetCompat.Builder(new AppTargetIdCompat("app: " + cn), cn.getPackageName(), user).setClassName(cn.getClassName()).build();
sendDismiss(target, container);
// Relay onDismissApp to every connected plugin.
mAppLaunchEventsPluginsList.forEach(plugin -> plugin.onDismissApp(cn, user, container != null ? container : CONTAINER_DEFAULT));
}
use of com.saggitt.omega.predictions.AppTargetIdCompat in project Neo-Launcher by NeoApplications.
the class PredictionAppTracker method onStartShortcut.
@Override
@UiThread
public void onStartShortcut(String packageName, String shortcutId, UserHandle user, String container) {
// TODO: Use the full shortcut info
AppTargetCompat target = new AppTargetCompat.Builder(new AppTargetIdCompat("shortcut:" + shortcutId), packageName, user).setClassName(shortcutId).build();
sendLaunch(target, container);
// Relay onStartShortcut info to every connected plugin.
mAppLaunchEventsPluginsList.forEach(plugin -> plugin.onStartShortcut(packageName, shortcutId, user, container != null ? container : CONTAINER_DEFAULT));
}
Aggregations