When system starts up and Homescreen is launched, there is white screen flicker observed. The flicker is only observed on start. We have Navigation widget and it uses TaskView to show the Navigation activity which is from third party provider. I tried to start a different activity, but still observed the flicker. Could you please help to understand how the flicker could be avoided? The flicker is not observed when Navi widget is not configured in homescreen, that means no task view is created.
private final TaskView.Listener listener = new TaskView.Listener() {
@Override
public void onInitialized() {
startNavi();
}
@Override
public void onReleased() {
}
@Override
public void onTaskCreated(int taskId, ComponentName name) {
if (isResumed()) {
startNavi();
}
}
private void startNavi() {
if (navigationViewModel.getTaskView() != null) {
try {
ActivityOptions activityOptions = ActivityOptions.makeCustomAnimation(requireContext(), 0, 0);
Intent intent = getIntent();
if (intent != null) {
navigationViewModel.getTaskView().startActivity(PendingIntent.getActivity(requireContext(), 0, intent, PendingIntent.FLAG_IMMUTABLE | PendingIntent.FLAG_UPDATE_CURRENT),
null, activityOptions, null);
}
} catch (Exception e) {
Log.e("exception", "activity not found", e);
}
}
}