cambios minimos en PCBDBHelper

parent e587d51f
......@@ -82,7 +82,7 @@ public class PCBDBHelper extends SQLiteOpenHelper {
System.exit(-1);
}
}else{
Log.e(LOG_TAG,"NO HAY USER EN USER DETAIL CON ESE ID: "+sup);
Log.e(LOG_TAG,"NO HAY USER EN USER_DETAIL CON ESE ID: "+sup);
}
cursor.close();
//db.close(); <--no es necesario cerrar la bbdd https://groups.google.com/forum/#!msg/android-developers/NwDRpHUXt0U/jIam4Q8-cqQJ
......@@ -95,7 +95,8 @@ public class PCBDBHelper extends SQLiteOpenHelper {
* @see PCBDBHelper#setCurrentUser(User)
*/
public User getCurrentUser() {
if (this.currentUser == null) this.currentUser = loadLastUser();
if (this.currentUser == null)
this.currentUser = loadLastUser();
return this.currentUser;
}
......
......@@ -251,7 +251,7 @@ public class User {
*/
public int get_active_scene() {
try {
return (int) this.attributes_stu.get(JSON_STUDENT_ATTTRS.ID_ACTIVE_SCENE);
return this.attributes_stu.getInt(JSON_STUDENT_ATTTRS.ID_ACTIVE_SCENE);
} catch (JSONException e) {
e.printStackTrace();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment