Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3c2ab1de authored by randypfohl's avatar randypfohl
Browse files

Aligning the intialization process with groupedtaskview to set content description

Test: built locally, tested against tablet with bluetooth keyboard.

Bug: 287287064
Change-Id: I2be667b2a4b0a08f73c3233a05bbaf7eec08c0e4
parent 8dcb89eb
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -280,10 +280,6 @@ public final class DigitalWellBeingToast {
        }
    }

    public String getContentDescription() {
            return getContentDescriptionForTask(mTask, mAppUsageLimitTimeMs, mAppRemainingTimeMs);
    }

    private String getContentDescriptionForTask(
            Task task, long appUsageLimitTimeMs, long appRemainingTimeMs) {
        return appUsageLimitTimeMs >= 0 && appRemainingTimeMs >= 0 ?
+4 −2
Original line number Diff line number Diff line
@@ -1020,7 +1020,10 @@ public class TaskView extends FrameLayout implements Reusable {
            }
            if (needsUpdate(changes, FLAG_UPDATE_ICON)) {
                mIconLoadRequest = iconCache.updateIconInBackground(mTask,
                        (task) -> setIcon(mIconView, task.icon));
                        (task) -> {
                            setIcon(mIconView, task.icon);
                            mDigitalWellBeingToast.initialize(task);
                        });
            }
        } else {
            if (needsUpdate(changes, FLAG_UPDATE_THUMBNAIL)) {
@@ -1342,7 +1345,6 @@ public class TaskView extends FrameLayout implements Reusable {

    protected void refreshTaskThumbnailSplash() {
        mSnapshotView.refreshSplashView();
        setContentDescription(mDigitalWellBeingToast.getContentDescription());
    }

    private void setSplitSelectTranslationX(float x) {