Android: remove code path that's never reached in QtLoader
This check for error code is never reached, the error code is always set to 0 in startApp() and then check for in loadApplication() while the latter method is only called by startApp(). Task-number: QTBUG-114593 Task-number: QTBUG-115016 Change-Id: I762009d76567cc1d090fe29048c35220d433dd1d Reviewed-by: Tinja Paavoseppä <tinja.paavoseppa@qt.io>bb10
parent
ac8c27bb1d
commit
17ef5be087
|
|
@ -4,8 +4,6 @@
|
|||
package org.qtproject.qt.android;
|
||||
|
||||
public class QtConstants {
|
||||
public static final String ERROR_CODE_KEY = "error.code";
|
||||
public static final String ERROR_MESSAGE_KEY = "error.message";
|
||||
public static final String DEX_PATH_KEY = "dex.path";
|
||||
public static final String LIB_PATH_KEY = "lib.path";
|
||||
public static final String LOADER_CLASS_NAME_KEY = "loader.class.name";
|
||||
|
|
|
|||
|
|
@ -109,23 +109,6 @@ public abstract class QtLoader {
|
|||
final Resources resources = m_context.getResources();
|
||||
final String packageName = m_context.getPackageName();
|
||||
try {
|
||||
final int errorCode = loaderParams.getInt(ERROR_CODE_KEY);
|
||||
if (errorCode != 0) {
|
||||
// fatal error, show the error and quit
|
||||
AlertDialog errorDialog = new AlertDialog.Builder(m_context).create();
|
||||
errorDialog.setMessage(loaderParams.getString(ERROR_MESSAGE_KEY));
|
||||
errorDialog.setButton(Dialog.BUTTON_POSITIVE,
|
||||
resources.getString(android.R.string.ok),
|
||||
new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
finish();
|
||||
}
|
||||
});
|
||||
errorDialog.show();
|
||||
return;
|
||||
}
|
||||
|
||||
// add all bundled Qt libs to loader params
|
||||
int id = resources.getIdentifier("bundled_libs", "array", packageName);
|
||||
final String[] bundledLibs = resources.getStringArray(id);
|
||||
|
|
@ -267,7 +250,6 @@ public abstract class QtLoader {
|
|||
}
|
||||
|
||||
Bundle loaderParams = new Bundle();
|
||||
loaderParams.putInt(ERROR_CODE_KEY, 0);
|
||||
loaderParams.putString(DEX_PATH_KEY, new String());
|
||||
|
||||
id = resources.getIdentifier("static_init_classes", "string", packageName);
|
||||
|
|
|
|||
Loading…
Reference in New Issue