Commit 0148a589 by Kim Jinsung

画面スリーブさせないように処理追加

parent 0fef32e3
...@@ -9,6 +9,7 @@ import android.os.Bundle; ...@@ -9,6 +9,7 @@ import android.os.Bundle;
import android.support.v7.app.AppCompatActivity; import android.support.v7.app.AppCompatActivity;
import android.view.View; import android.view.View;
import android.view.Window; import android.view.Window;
import android.view.WindowManager;
import jp.odakyu.toiletsignage.application.ToiletApplication; import jp.odakyu.toiletsignage.application.ToiletApplication;
import jp.odakyu.toiletsignage.constants.ToiletConstants; import jp.odakyu.toiletsignage.constants.ToiletConstants;
...@@ -51,11 +52,15 @@ public class ParentActivity extends AppCompatActivity { ...@@ -51,11 +52,15 @@ public class ParentActivity extends AppCompatActivity {
if (isRunning) { if (isRunning) {
boolean isNetworkConnect = intent.getBooleanExtra(ToiletConstants.KEY_NETWORK_CONNECT,false); boolean isNetworkConnect = intent.getBooleanExtra(ToiletConstants.KEY_NETWORK_CONNECT,false);
int errorCount = intent.getIntExtra(ToiletConstants.KEY_ERROR_COUNT, -1); int errorCount = intent.getIntExtra(ToiletConstants.KEY_ERROR_COUNT, -1);
Logger.i(TAG, "isNetworkConnect = " + isNetworkConnect + ", errorCount = " + errorCount);
reloadDisplayView(errorCount, isNetworkConnect); reloadDisplayView(errorCount, isNetworkConnect);
} }
} }
}; };
registerReceiver(broadcastReceiver, filter); registerReceiver(broadcastReceiver, filter);
//強制的にスリーブさせない処理追加
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
} }
@Override @Override
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment