class Alarms {

    public static void cancelAlarm(
            @NonNull Context context,
            @NonNull WorkManagerImpl workManager,
            @NonNull String workSpecId) {

        WorkDatabase workDatabase = workManager.getWorkDatabase();
        SystemIdInfoDao systemIdInfoDao = workDatabase.systemIdInfoDao();
        SystemIdInfo systemIdInfo = systemIdInfoDao.getSystemIdInfo(workSpecId);
        if (systemIdInfo != null) {
            cancelExactAlarm(context, workSpecId, systemIdInfo.systemId);
            Log.d(TAG, String.format("Removing SystemIdInfo for workSpecId (%s)", workSpecId));
            systemIdInfoDao.removeSystemIdInfo(workSpecId);
        }
    }

    private  Alarms();

}