Skip to content

Commit 71d9491

Browse files
authored
Merge pull request #105 from mngoe/OP-2535
keep screen on in sync process #OP-2535
2 parents f562909 + 9bc89fc commit 71d9491

File tree

5 files changed

+9
-3
lines changed

5 files changed

+9
-3
lines changed

claimManagement/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ android {
2727
minSdkVersion 26
2828
targetSdkVersion 32
2929
versionCode 4
30-
versionName "2.0.5"
30+
versionName "2.0.6"
3131
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
3232
}
3333
buildTypes {

claimManagement/src/main/java/org/openimis/imisclaims/MainActivity.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
import android.view.Menu;
1919
import android.view.MenuItem;
2020
import android.view.View;
21+
import android.view.WindowManager;
2122
import android.widget.EditText;
2223
import android.widget.RelativeLayout;
2324
import android.widget.TextView;
@@ -460,6 +461,7 @@ public boolean checkDataBase() {
460461
}
461462

462463
public boolean getControls() {
464+
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
463465
if (global.isNetworkAvailable()) {
464466
String progress_message = getResources().getString(R.string.getControls);
465467
progressDialog = ProgressDialog.show(this, getResources().getString(R.string.initializing), progress_message);

claimManagement/src/main/java/org/openimis/imisclaims/SynchronizeActivity.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
import android.os.Environment;
1414
import android.view.MenuItem;
1515
import android.view.View;
16+
import android.view.WindowManager;
1617
import android.widget.RelativeLayout;
1718
import android.widget.TextView;
1819
import android.widget.Toast;
@@ -210,6 +211,7 @@ public void onBackPressed() {
210211
}
211212

212213
public void uploadClaims() {
214+
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
213215
pd = ProgressDialog.show(this, "", getResources().getString(R.string.Processing));
214216
SynchronizeService.uploadClaims(this);
215217
}

claimManagement/src/main/res/layout/activity_main.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
android:layout_width="match_parent"
77
android:layout_height="match_parent"
88
android:fitsSystemWindows="true"
9-
tools:openDrawer="start">
9+
tools:openDrawer="start"
10+
android:keepScreenOn="false">
1011

1112
<include
1213
layout="@layout/app_bar_main"

claimManagement/src/main/res/layout/activity_synchronize.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
android:layout_width="match_parent"
66
android:layout_height="match_parent"
77
tools:context="org.openimis.imisclaims.SynchronizeActivity"
8-
android:layout_margin="30dp">
8+
android:layout_margin="30dp"
9+
android:keepScreenOn="false">
910
<LinearLayout
1011
android:layout_width="match_parent"
1112
android:layout_height="match_parent"

0 commit comments

Comments
 (0)