# HG changeset patch # User dasilvj@jean-manuel-da-silvas-macbook.local # Date 1243868570 -7200 # Node ID 3bf40efc08eac6bea281b7d05035aa93bb08c877 # Parent 586bbd6b647de0adcd884b85ce07214c7b459889 Bug #147 - Changement dans l'activité Login afin de prendre en compte les nouvelles preferences lors de la reconnection, après avoir quitté l'activité Settings diff -r 586bbd6b647d -r 3bf40efc08ea src/com/beem/project/beem/ui/Login.java --- a/src/com/beem/project/beem/ui/Login.java Mon Jun 01 16:54:11 2009 +0200 +++ b/src/com/beem/project/beem/ui/Login.java Mon Jun 01 17:02:50 2009 +0200 @@ -157,17 +157,8 @@ */ @Override public void onCreate(Bundle savedInstanceState) { - Log.d(getString(R.string.login_tag), "onCreate() started"); super.onCreate(savedInstanceState); setContentView(R.layout.login); - progressDialog = new ProgressDialog(this); - progressDialog.setMessage("Loading. Please wait..."); - beemApp = BeemApplication.getApplication(this); - this.bindService(Login.SERVICE_INTENT, mServConn, BIND_AUTO_CREATE); - if (!mIsConnected) - progressDialog.show(); - beemApp.startBeemService(); - Log.d(getString(R.string.login_tag), "onCreate() ended"); } /** @@ -186,9 +177,6 @@ @Override public void onDestroy() { super.onDestroy(); - this.progressDialog.dismiss(); - progressDialog = null; - this.unbindService(mServConn); } /** @@ -209,4 +197,30 @@ } return false; } + + /** + * {@inheritDoc} + */ + @Override + public void onPause() { + super.onPause(); + this.progressDialog.dismiss(); + progressDialog = null; + this.unbindService(mServConn); + } + + /** + * {@inheritDoc} + */ + @Override + public void onResume() { + super.onResume(); + progressDialog = new ProgressDialog(this); + progressDialog.setMessage("Loading. Please wait..."); + beemApp = BeemApplication.getApplication(this); + this.bindService(Login.SERVICE_INTENT, mServConn, BIND_AUTO_CREATE); + if (!mIsConnected) + progressDialog.show(); + beemApp.startBeemService(); + } }