Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
hds
flexin
android-app
Commits
720e79f7
Commit
720e79f7
authored
Nov 16, 2017
by
Nastuzzi Samy
Browse files
Update popup bug
Do not show update popup if no update available
parent
1fe6ad3e
Changes
2
Hide whitespace changes
Inline
Side-by-side
app/src/main/AndroidManifest.xml
View file @
720e79f7
<?xml version="1.0" encoding="utf-8"?>
<manifest
xmlns:android=
"http://schemas.android.com/apk/res/android"
package=
"fr.utc.simde.jessy"
android:versionCode=
"2
4
"
android:versionName=
"0.9"
>
android:versionCode=
"2
5
"
android:versionName=
"0.9
.1
"
>
<uses-permission
android:name=
"android.permission.NFC"
/>
<uses-permission
android:name=
"android.permission.INTERNET"
/>
...
...
app/src/main/java/fr/utc/simde/jessy/BaseActivity.java
View file @
720e79f7
...
...
@@ -614,15 +614,8 @@ public abstract class BaseActivity extends InternetActivity {
}
});
}
else
if
(
popupIfNot
)
throw
new
Exception
(
getString
(
R
.
string
.
no_update
));
else
runOnUiThread
(
new
Runnable
()
{
@Override
public
void
run
()
{
dialog
.
stopLoading
();
}
});
throw
new
Exception
(
getString
(
R
.
string
.
no_update
));
}
else
throw
new
Exception
(
getString
(
R
.
string
.
can_not_detect_update
));
...
...
@@ -633,7 +626,9 @@ public abstract class BaseActivity extends InternetActivity {
@Override
public
void
run
()
{
dialog
.
stopLoading
();
dialog
.
errorDialog
(
BaseActivity
.
this
,
getString
(
R
.
string
.
update
),
e
.
getMessage
()
+
"\n"
+
getString
(
R
.
string
.
actual_version
)
+
": "
+
BuildConfig
.
VERSION_NAME
);
if
(
popupIfNot
)
dialog
.
errorDialog
(
BaseActivity
.
this
,
getString
(
R
.
string
.
update
),
e
.
getMessage
()
+
"\n"
+
getString
(
R
.
string
.
actual_version
)
+
": "
+
BuildConfig
.
VERSION_NAME
);
}
});
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment