From a3a4ef5dbb6731dbd24fb6383c8d4298434d4422 Mon Sep 17 00:00:00 2001 From: Doug Keen Date: Sat, 9 Feb 2013 13:07:49 -0800 Subject: [PATCH] Screen lock times out after 10 minutes --- .../dougkeen/bart/activities/ViewDeparturesActivity.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/com/dougkeen/bart/activities/ViewDeparturesActivity.java b/src/com/dougkeen/bart/activities/ViewDeparturesActivity.java index 82ff54f..eed5231 100644 --- a/src/com/dougkeen/bart/activities/ViewDeparturesActivity.java +++ b/src/com/dougkeen/bart/activities/ViewDeparturesActivity.java @@ -434,6 +434,15 @@ public class ViewDeparturesActivity extends SActivity implements if (hasFocus) { getWindow() .addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON); + mHandler.postDelayed(new Runnable() { + @Override + public void run() { + if (getWindow() != null) + getWindow().clearFlags( + WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON); + + } + }, 10 * 60 * 1000); Ticker.getInstance().startTicking(this); refreshBoardedDeparture(false); }