Skip to content

Commit b05a73d

Browse files
committed
count close apps
1 parent bec6af1 commit b05a73d

File tree

3 files changed

+14
-1
lines changed

3 files changed

+14
-1
lines changed

qasdk/src/main/java/co/astrnt/qasdk/constants/PreferenceKey.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,5 @@ PreferenceKey {
3636
const val KEY_IS_LAST_QUESTION = "LastQuestion"
3737
const val KEY_IS_SECTION_SUMMARY = "SECTIONSUMMARY"
3838
const val KEY_IS_COUNTDOWN = "COUNTDOWN"
39+
const val KEY_CLOSE_APPS = "CLOSEAPPS"
3940
}

qasdk/src/main/java/co/astrnt/qasdk/utils/HawkUtils.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import co.astrnt.qasdk.dao.GdprDao;
66
import co.astrnt.qasdk.dao.WelcomeVideoDao;
77

8+
import static co.astrnt.qasdk.constants.PreferenceKey.KEY_CLOSE_APPS;
89
import static co.astrnt.qasdk.constants.PreferenceKey.KEY_CONTINUE;
910
import static co.astrnt.qasdk.constants.PreferenceKey.KEY_CV_START_CALLED;
1011
import static co.astrnt.qasdk.constants.PreferenceKey.KEY_DOWNLOAD_ID;
@@ -276,6 +277,14 @@ public void saveSectionSummary(boolean isLast) {
276277
Hawk.put(KEY_IS_SECTION_SUMMARY, isLast);
277278
}
278279

280+
public int isCountCloseApps() {
281+
return Hawk.get(KEY_CLOSE_APPS, 0);
282+
}
283+
284+
public void setCloseApps(int isLast) {
285+
Hawk.put(KEY_CLOSE_APPS, isLast);
286+
}
287+
279288

280289
protected void removeHawkSaved() {
281290
Hawk.delete(KEY_WATCH_WELCOME_VIDEO);
@@ -298,6 +307,7 @@ protected void removeHawkSaved() {
298307
Hawk.delete(KEY_FINISH_QUESTION);
299308
Hawk.delete(KEY_START_SESSION);
300309
Hawk.delete(KEY_IS_LAST_QUESTION);
310+
Hawk.delete(KEY_CLOSE_APPS);
301311
removeDownloadId();
302312
removeUploadId();
303313
}

qasdk/src/main/java/co/astrnt/qasdk/videocompressor/OutputSurface.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
import javax.microedition.khronos.egl.EGLDisplay;
1414
import javax.microedition.khronos.egl.EGLSurface;
1515

16+
import timber.log.Timber;
17+
1618
public class OutputSurface implements SurfaceTexture.OnFrameAvailableListener {
1719

1820
private static final int EGL_OPENGL_ES2_BIT = 4;
@@ -148,7 +150,7 @@ public void awaitNewImage() {
148150
try {
149151
mFrameSyncObject.wait(TIMEOUT_MS);
150152
if (!mFrameAvailable) {
151-
throw new RuntimeException("Surface frame wait timed out");
153+
Timber.i("urface frame wait timed out");
152154
}
153155
} catch (InterruptedException ie) {
154156
throw new RuntimeException(ie);

0 commit comments

Comments
 (0)