Skip to content

Commit d348a0a

Browse files
committed
Fix some lint items.
1 parent 14dceb3 commit d348a0a

File tree

3 files changed

+14
-4
lines changed

3 files changed

+14
-4
lines changed

CardboardMpo/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ android {
88
defaultConfig {
99
minSdkVersion 16
1010
targetSdkVersion 23
11-
versionCode 9
12-
versionName "1.5"
11+
versionCode 10
12+
versionName "1.6"
1313
}
1414

1515
lintOptions.abortOnError false

CardboardMpo/src/main/java/com/dmitrybrant/android/cardboardmpo/MainActivity.java

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ public MainFindTask() {
225225

226226
@Override
227227
protected void onPostExecute(List<File> results) {
228-
if (isFinishing() || isDestroyed()) {
228+
if (isActivityGone()) {
229229
return;
230230
}
231231
mpoFileList.clear();
@@ -278,7 +278,7 @@ protected void onProgressUpdate(Integer... progress) {
278278

279279
@Override
280280
protected void onPostExecute(List<Long> results) {
281-
if (isFinishing() || isDestroyed()) {
281+
if (isActivityGone()) {
282282
return;
283283
}
284284
if (bmpLeft == null || bmpRight == null) {
@@ -328,4 +328,12 @@ private void cleanupBitmap(Bitmap bmp) {
328328
}
329329
}
330330

331+
private boolean isActivityGone() {
332+
if (Build.VERSION.SDK_INT > Build.VERSION_CODES.JELLY_BEAN) {
333+
if (isDestroyed()) {
334+
return true;
335+
}
336+
}
337+
return isFinishing();
338+
}
331339
}

CardboardMpo/src/main/res/layout/common_ui.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
android:layout_height="wrap_content"
3636
android:padding="8dp"
3737
android:gravity="center_horizontal"
38+
android:textColor="@color/info_text"
3839
android:background="@color/info_background"/>
3940
</LinearLayout>
4041

@@ -55,6 +56,7 @@
5556
android:layout_height="wrap_content"
5657
android:padding="8dp"
5758
android:gravity="center_horizontal"
59+
android:textColor="@color/info_text"
5860
android:background="@color/info_background"/>
5961
</LinearLayout>
6062

0 commit comments

Comments
 (0)