Można chyba zrobić coś takiego
this.getWindow().setFlags(this.getWindow().getFlags() & ~WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON)
Czy przyjrzeć API? Istnieje również ten sposób
http://developer.android.com/reference/android/view/Window.html#clearFlags%28int%29
this.getWindow().clearFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
nie próbowałem to albo jeszcze.
sobie wyobrazić to będzie działać, aby sprawdzić, czy flaga jest ustawiona:
this.getWindow() getFlags() & WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON
. Edycja: Jak na komentarze, najwyraźniej w ten sposób otrzymujesz wartość flagi.
this.getWindow().getAttributes().flags & WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON
Może być na to również metoda, należy zapoznać się z dokumentem API.
można po prostu clearFlags .. getWindow() clearFlags (WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON.); – Nepster