Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in IdleTimerManager.java #34

Open
ErYogeshPatil opened this issue Jul 17, 2023 · 0 comments
Open

Error in IdleTimerManager.java #34

ErYogeshPatil opened this issue Jul 17, 2023 · 0 comments

Comments

@ErYogeshPatil
Copy link

public static void deactivate(@NotNull final Activity activity, final String tag) {
^
symbol: class NotNull
location: class IdleTimerManager

error in this code in IdleTimerManager.java

public static void activate(@NotNull final Activity activity, final String tag) {
if (tags.isEmpty()) {
activity.runOnUiThread(() -> {
activity.getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
});
}
tags.add((tag == null ? "" : tag));
}

public static void deactivate(@NotNull final Activity activity, final String tag) {
    if (tags.size() == 1 && tags.contains((tag))) {
        activity.runOnUiThread(() -> {
            activity.getWindow().clearFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
        });
    }
    tags.remove((tag == null ? "" : tag));
}
@ErYogeshPatil ErYogeshPatil changed the title error in IdleTimerManager.java Error in IdleTimerManager.java Jul 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant