Modified the fix for IllegalArgumentException exception. Removed

configChanges parameters from activity declarations in Manifest.
Implemented the deprecated onRetainNonConfigurationInstance() method
until the new GUI is ready. The new GUI will use retained Fragments
instead.
This commit is contained in:
Juan Miguel Boyero Corral 2013-03-28 19:13:15 +01:00
parent a8e46cfb8a
commit 17b1860e5a
16 changed files with 611 additions and 544 deletions

View File

@ -39,23 +39,19 @@
android:label="@string/app_name" >
<activity
android:name=".SWADMain"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
android:icon="@drawable/ic_launcher_swadroid"
android:label="@string/app_name" android:theme="@android:style/Theme.NoTitleBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".Preferences"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
android:name=".Preferences"
android:label="@string/set_preferences" >
</activity>
<activity
android:name=".modules.Login"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
android:name=".modules.Login"
android:label="@string/loginModuleLabel"
android:theme="@android:style/Theme.Translucent.NoTitleBar" >
</activity>
@ -63,141 +59,140 @@
android:name=".modules.rollcall.Rollcall"
android:label="@string/rollcallModuleLabel"
android:screenOrientation="portrait"
android:theme="@android:style/Theme.Translucent.NoTitleBar" android:configChanges="keyboard|keyboardHidden|orientation|screenSize">
android:theme="@android:style/Theme.Translucent.NoTitleBar" >
</activity>
<activity
android:name=".modules.rollcall.RollcallConfigDownload"
android:label="@string/rollcallModuleLabel"
android:theme="@android:style/Theme.Translucent.NoTitleBar" android:configChanges="keyboard|keyboardHidden|orientation|screenSize">
android:theme="@android:style/Theme.Translucent.NoTitleBar" >
</activity>
<activity
android:name=".modules.rollcall.sessions.NewPracticeSession"
android:label="@string/sessionModuleLabel"
android:theme="@android:style/Theme.Translucent.NoTitleBar" android:configChanges="keyboard|keyboardHidden|orientation|screenSize">
android:theme="@android:style/Theme.Translucent.NoTitleBar" >
</activity>
<activity
android:name=".modules.rollcall.sessions.SessionsHistory"
android:label="@string/rollcallHistoryModuleLabel"
android:theme="@android:style/Theme.Translucent.NoTitleBar" android:configChanges="keyboard|keyboardHidden|orientation|screenSize">
android:theme="@android:style/Theme.Translucent.NoTitleBar" >
</activity>
<activity
android:name=".modules.rollcall.sessions.SessionsList"
android:label="@string/sessionModuleLabel"
android:theme="@android:style/Theme.Translucent.NoTitleBar" android:configChanges="keyboard|keyboardHidden|orientation|screenSize">
android:theme="@android:style/Theme.Translucent.NoTitleBar" >
</activity>
<activity
android:name=".modules.rollcall.students.StudentsHistory"
android:label="@string/studentsHistoryModuleLabel"
android:theme="@android:style/Theme.Translucent.NoTitleBar" android:configChanges="keyboard|keyboardHidden|orientation|screenSize">
android:theme="@android:style/Theme.Translucent.NoTitleBar" >
</activity>
<activity
android:name=".modules.rollcall.students.StudentsList"
android:label="@string/sessionModuleLabel"
android:theme="@android:style/Theme.Translucent.NoTitleBar" android:configChanges="keyboard|keyboardHidden|orientation|screenSize">
android:theme="@android:style/Theme.Translucent.NoTitleBar" >
</activity>
<activity
android:name=".modules.Groups"
android:label="@string/rollcallModuleLabel"
android:theme="@android:style/Theme.Translucent.NoTitleBar" android:configChanges="keyboard|keyboardHidden|orientation|screenSize">
android:theme="@android:style/Theme.Translucent.NoTitleBar" >
</activity>
<activity
android:name="com.google.zxing.client.android.CaptureActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
android:screenOrientation="landscape"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
android:windowSoftInputMode="stateAlwaysHidden" >
<intent-filter>
<action android:name="es.ugr.swad.swadroid.android.SCAN" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name=".modules.Courses"
android:label="@string/coursesModuleLabel"
android:theme="@android:style/Theme.Translucent.NoTitleBar" android:configChanges="keyboard|keyboardHidden|orientation|screenSize">
android:theme="@android:style/Theme.Translucent.NoTitleBar" >
</activity>
<activity
android:name=".modules.notifications.Notifications"
android:label="@string/notificationsModuleLabel"
android:theme="@android:style/Theme.NoTitleBar" android:configChanges="keyboard|keyboardHidden|orientation|screenSize">
android:theme="@android:style/Theme.NoTitleBar" >
</activity>
<activity
android:name=".modules.tests.Tests"
android:label="@string/testsModuleLabel"
android:theme="@android:style/Theme.NoTitleBar" android:configChanges="keyboard|keyboardHidden|orientation|screenSize">
android:theme="@android:style/Theme.NoTitleBar" >
</activity>
<activity
android:name=".modules.tests.TestsQuestionsDownload"
android:label="@string/testsModuleLabel"
android:theme="@android:style/Theme.Translucent.NoTitleBar" android:configChanges="keyboard|keyboardHidden|orientation|screenSize">
android:theme="@android:style/Theme.Translucent.NoTitleBar" >
</activity>
<activity
android:name=".modules.tests.TestsConfigDownload"
android:label="@string/testsModuleLabel"
android:theme="@android:style/Theme.Translucent.NoTitleBar" android:configChanges="keyboard|keyboardHidden|orientation|screenSize">
android:theme="@android:style/Theme.Translucent.NoTitleBar" >
</activity>
<activity
android:name=".modules.tests.TestsMake"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
android:name=".modules.tests.TestsMake"
android:label="@string/testsModuleLabel"
android:theme="@android:style/Theme.NoTitleBar">
</activity>
<activity
android:name=".modules.Messages"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
android:name=".modules.Messages"
android:label="@string/messagesModuleLabel"
android:theme="@android:style/Theme.Translucent.NoTitleBar" >
</activity>
<activity
android:name=".modules.notifications.NotificationItem"
android:label="@string/notificationsModuleLabel"
android:theme="@android:style/Theme.NoTitleBar" android:configChanges="keyboard|keyboardHidden|orientation|screenSize">
android:theme="@android:style/Theme.NoTitleBar" >
</activity>
<activity
android:name=".modules.Notices"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
android:name=".modules.Notices"
android:label="@string/noticesModuleLabel"
android:theme="@android:style/Theme.Translucent.NoTitleBar" >
</activity>
<activity
android:name=".sync.AccountAuthenticator"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
android:name=".sync.AccountAuthenticator"
android:theme="@android:style/Theme.Translucent.NoTitleBar" >
</activity>
<activity
android:name=".modules.downloads.DirectoryTreeDownload"
android:label="@string/documentsDownloadModuleLabel"
android:theme="@android:style/Theme.Translucent.NoTitleBar" android:configChanges="keyboard|keyboardHidden|orientation|screenSize">
android:theme="@android:style/Theme.Translucent.NoTitleBar" >
</activity>
<activity
android:name=".modules.downloads.GetFile"
android:label="@string/documentsDownloadModuleLabel"
android:theme="@android:style/Theme.Translucent.NoTitleBar" android:configChanges="keyboard|keyboardHidden|orientation|screenSize">
android:theme="@android:style/Theme.Translucent.NoTitleBar" >
</activity>
<activity
android:name=".modules.downloads.DownloadsManager"
android:label="@string/documentsDownloadModuleLabel"
android:theme="@android:style/Theme.NoTitleBar"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize">
>
</activity>
<activity
android:name=".modules.groups.MyGroupsManager"
android:label="@string/myGroupsModuleLabel"
android:theme="@android:style/Theme.NoTitleBar" android:configChanges="keyboard|keyboardHidden|orientation|screenSize">
android:theme="@android:style/Theme.NoTitleBar" >
</activity>
<activity
android:name=".modules.GroupTypes"
android:label="@string/groupTypesModuleLabel"
android:theme="@android:style/Theme.Translucent.NoTitleBar" android:configChanges="keyboard|keyboardHidden|orientation|screenSize">
android:theme="@android:style/Theme.Translucent.NoTitleBar" >
</activity>
<activity
android:name=".modules.groups.SendMyGroups"
android:label="@string/sendMyGroupsProgressTitle"
android:theme="@android:style/Theme.Translucent.NoTitleBar" android:configChanges="keyboard|keyboardHidden|orientation|screenSize">
android:theme="@android:style/Theme.Translucent.NoTitleBar" >
</activity>
<activity android:name=".modules.GenerateQR" android:theme="@android:style/Theme.NoTitleBar" android:configChanges="keyboard|keyboardHidden|orientation|screenSize"></activity><provider
<activity android:name=".modules.GenerateQR"
android:theme="@android:style/Theme.NoTitleBar" >
</activity>
<provider
android:name=".sync.DummyProvider"
android:authorities="es.ugr.swad.swadroid.content"
android:label="SWADroid"

View File

@ -100,7 +100,7 @@ public class Courses extends Module {
String progressDescription = getString(R.string.coursesProgressDescription);
int progressTitle = R.string.coursesProgressTitle;
new Connect(false, progressDescription, progressTitle).execute();
startConnection(false, progressDescription, progressTitle);
}
/* (non-Javadoc)

View File

@ -42,7 +42,7 @@ public class GenerateQR extends Module {
ImageView qr_image = (ImageView) findViewById(R.id.qr_code_image);
qr_image.setImageBitmap(qrCode);
} catch (WriterException e) {
error(TAG, e.getMessage(), e);
error(TAG, e.getMessage(), e, true);
}
}

View File

@ -51,9 +51,9 @@ public class GroupTypes extends Module {
super.onStart();
try {
runConnection();
} catch (Exception ex) {
} catch (Exception e) {
String errorMsg = getString(R.string.errorServerResponseMsg);
error(TAG, errorMsg, ex);
error(TAG, errorMsg, e, true);
}
}
@Override
@ -109,7 +109,7 @@ public class GroupTypes extends Module {
String progressDescription = getString(R.string.groupTypesProgressDescription);
int progressTitle = R.string.groupTypesProgressTitle;
new Connect(true, progressDescription, progressTitle).execute();
startConnection(true, progressDescription, progressTitle);
}
@Override
@ -119,7 +119,6 @@ public class GroupTypes extends Module {
@Override
protected void onError() {
// TODO Auto-generated method stub
}

View File

@ -79,9 +79,9 @@ public class Groups extends Module {
super.onStart();
try {
runConnection();
} catch (Exception ex) {
} catch (Exception e) {
String errorMsg = getString(R.string.errorServerResponseMsg);
error(TAG, errorMsg, ex);
error(TAG, errorMsg, e, true);
}
}
@ -101,7 +101,7 @@ public class Groups extends Module {
String progressDescription = getString(R.string.groupsProgressDescription);
int progressTitle = R.string.groupsProgressTitle;
new Connect(true, progressDescription, progressTitle).execute();
startConnection(true, progressDescription, progressTitle);
}
@ -165,7 +165,6 @@ public class Groups extends Module {
@Override
protected void onError() {
// TODO Auto-generated method stub
}
}

View File

@ -87,12 +87,8 @@ public class Login extends Module {
protected void connect() {
String progressDescription = getString(R.string.loginProgressDescription);
int progressTitle = R.string.loginProgressTitle;
Connect con = new Connect(false, progressDescription, progressTitle, true);
/*if(!Global.isLogged())
Toast.makeText(this, progressDescription, Toast.LENGTH_LONG).show();*/
con.execute();
startConnection(false, progressDescription, progressTitle);
}
public static boolean isInteger(String str) {

View File

@ -79,9 +79,9 @@ public class Messages extends Module {
}*/
runConnection();
} catch (Exception ex) {
} catch (Exception e) {
String errorMsg = getString(R.string.errorServerResponseMsg);
error(TAG, errorMsg, ex);
error(TAG, errorMsg, e, true);
}
}
};
@ -116,7 +116,7 @@ public class Messages extends Module {
messageDialog.setContentView(R.layout.messages_dialog);
messageDialog.setCancelable(true);
messageDialog.getWindow().setLayout(LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT);
messageDialog.getWindow().setLayout(LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT);
acceptButton = (Button) messageDialog.findViewById(R.id.message_button_accept);
acceptButton.setOnClickListener(positiveClickListener);
@ -224,7 +224,7 @@ public class Messages extends Module {
String progressDescription = getString(R.string.sendingMessageMsg);
int progressTitle = R.string.messagesModuleLabel;
new Connect(false, progressDescription, progressTitle).execute();
startConnection(false, progressDescription, progressTitle);
Toast.makeText(this, R.string.sendingMessageMsg, Toast.LENGTH_SHORT).show();
Log.i(TAG, getString(R.string.sendingMessageMsg));

File diff suppressed because it is too large Load Diff

View File

@ -79,9 +79,9 @@ public class Notices extends Module {
}*/
runConnection();
} catch (Exception ex) {
} catch (Exception e) {
String errorMsg = getString(R.string.errorServerResponseMsg);
error(TAG, errorMsg, ex);
error(TAG, errorMsg, e, true);
}
}
};
@ -144,7 +144,7 @@ public class Notices extends Module {
String progressDescription = getString(R.string.noticesModuleLabel);
int progressTitle = R.string.noticesModuleLabel;
new Connect(false, progressDescription, progressTitle).execute();
startConnection(false, progressDescription, progressTitle);
Toast.makeText(this, R.string.publishingNotice, Toast.LENGTH_SHORT).show();
Log.i(TAG, getString(R.string.publishingNotice));
@ -187,7 +187,6 @@ public class Notices extends Module {
@Override
protected void onError() {
// TODO Auto-generated method stub
}

View File

@ -70,11 +70,10 @@ public class DirectoryTreeDownload extends Module {
@Override
protected void connect() {
String progessDescription= getString(R.string.documentsDownloadProgressDescription);
String progressDescription= getString(R.string.documentsDownloadProgressDescription);
int progressTitle = R.string.documentsDownloadModuleLabel;
Connect con = new Connect(true,progessDescription,progressTitle,true);
con.execute();
startConnection(true, progressDescription, progressTitle);
}
@Override
@ -85,7 +84,6 @@ public class DirectoryTreeDownload extends Module {
@Override
protected void onError() {
// TODO Auto-generated method stub
}

View File

@ -74,9 +74,9 @@ public class GetFile extends Module {
super.onStart();
try {
runConnection();
} catch (Exception ex) {
} catch (Exception e) {
String errorMsg = getString(R.string.errorServerResponseMsg);
error(TAG, errorMsg, ex);
error(TAG, errorMsg, e, true);
}
}
@Override
@ -112,7 +112,7 @@ public class GetFile extends Module {
@Override
protected void connect() {
new Connect(false, "", 0).execute();
startConnection(false, "", 0);
}
@Override
@ -125,7 +125,6 @@ public class GetFile extends Module {
@Override
protected void onError() {
// TODO Auto-generated method stub
}

View File

@ -89,9 +89,9 @@ public class SendMyGroups extends Module {
super.onStart();
try {
runConnection();
} catch (Exception ex) {
} catch (Exception e) {
String errorMsg = getString(R.string.errorServerResponseMsg);
error(TAG, errorMsg, ex);
error(TAG, errorMsg, e, true);
}
}
@ -164,9 +164,7 @@ public class SendMyGroups extends Module {
String progressDescription = getString(R.string.sendMyGroupsProgressDescription);
int progressTitle = R.string.sendMyGroupsProgressTitle;
new Connect(true, progressDescription, progressTitle).execute();
startConnection(true, progressDescription, progressTitle);
}
@Override
@ -177,7 +175,6 @@ public class SendMyGroups extends Module {
@Override
protected void onError() {
// TODO Auto-generated method stub
}

View File

@ -366,7 +366,7 @@ public class Notifications extends Module {
String progressDescription = getString(R.string.notificationsProgressDescription);
int progressTitle = R.string.notificationsProgressTitle;
new Connect(false, progressDescription, progressTitle).execute();
startConnection(false, progressDescription, progressTitle);
}
/* (non-Javadoc)

View File

@ -83,9 +83,9 @@ public class RollcallConfigDownload extends Module {
Log.d(TAG, "selectedCourseCode = " + Long.toString(Constants.getSelectedCourseCode()));
}
runConnection();
} catch (Exception ex) {
} catch (Exception e) {
String errorMsg = getString(R.string.errorServerResponseMsg);
error(TAG, errorMsg, ex);
error(TAG, errorMsg, e, true);
}
}
@ -210,7 +210,7 @@ public class RollcallConfigDownload extends Module {
String progressDescription = getString(R.string.studentsDownloadProgressDescription);
int progressTitle = R.string.studentsDownloadProgressTitle;
new Connect(true, progressDescription, progressTitle).execute();
startConnection(true, progressDescription, progressTitle);
}
@Override

View File

@ -82,9 +82,9 @@ public class TestsConfigDownload extends Module {
}
runConnection();
} catch (Exception ex) {
} catch (Exception e) {
String errorMsg = getString(R.string.errorServerResponseMsg);
error(TAG, errorMsg, ex);
error(TAG, errorMsg, e, true);
}
}
@ -163,7 +163,7 @@ public class TestsConfigDownload extends Module {
String progressDescription = getString(R.string.testsDownloadProgressDescription);
int progressTitle = R.string.testsDownloadProgressTitle;
new Connect(false, progressDescription, progressTitle).execute();
startConnection(false, progressDescription, progressTitle);
}
/* (non-Javadoc)

View File

@ -234,7 +234,7 @@ public class TestsQuestionsDownload extends Module {
String progressDescription = getString(R.string.testsDownloadProgressDescription);
int progressTitle = R.string.testsDownloadProgressTitle;
new Connect(true, progressDescription, progressTitle).execute();
startConnection(true, progressDescription, progressTitle);
}
/* (non-Javadoc)