这是indexloc提供的服务,不要输入任何密码
Skip to content

Bug: Incorrect await usage in TimerRingController causes build failure & possible crash #854

@rohitarer

Description

@rohitarer

Description

The TimerRingController misused await and accessed properties on a Future, leading to compile-time errors and a potential null crash.

  • Problematic lines:
    AudioUtils.playTimer(alarmRecord: await getFakeTimerModel().value); // .value on a Future
    AudioUtils.stopTimer(ringtoneName: await getFakeTimerModel().ringtoneName); // property access before await
    vibrationTimer!.cancel(); // potential null crash

  • Impact:
    Build fails with type/property errors.
    Possible runtime crash if vibrationTimer is null.

What I tried
Reproduced by launching a timer ring; build failed due to the incorrect .value and property access on a Future. Verified crash risk by inspecting vibrationTimer.

Screenshots

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions