26
26
import org .apache .http .entity .BufferedHttpEntity ;
27
27
import org .apache .http .util .EntityUtils ;
28
28
29
- import android .content .Intent ;
30
29
import android .os .Handler ;
31
30
import android .os .Looper ;
32
31
import android .os .Message ;
33
32
34
- import com .pose .PoseApp ;
35
- import com .pose .SignupSplashActivity ;
36
- import com .pose .models .User ;
37
- import com .pose .utility .GSGlobals ;
38
-
39
33
/**
40
34
* Used to intercept and handle the responses from requests made using
41
35
* {@link AsyncHttpClient}. The {@link #onSuccess(String)} method is
@@ -215,7 +209,6 @@ void sendResponseMessage(HttpResponse response)
215
209
StatusLine status = response .getStatusLine ();
216
210
if (status .getStatusCode () >= 300 )
217
211
{
218
- //sendFailureMessage(new HttpResponseException(status.getStatusCode(), status.getReasonPhrase()));
219
212
try
220
213
{
221
214
HttpEntity entity = null ;
@@ -234,20 +227,19 @@ void sendResponseMessage(HttpResponse response)
234
227
235
228
if (status .getStatusCode () == 401 )
236
229
{
237
- if (User .isAuthenticated ())
238
- {
239
- User .signout (null );
240
- PoseApp .clearDB ();
241
- Intent intentSendLogout = new Intent (GSGlobals .INTENT_POSE_LOGOUT );
242
- PoseApp .getContext ().sendBroadcast (intentSendLogout );
243
-
244
- Intent intent = new Intent (PoseApp .getContext (), SignupSplashActivity .class );
245
- intent .addFlags (Intent .FLAG_ACTIVITY_NEW_TASK );
246
- PoseApp .getContext ().startActivity (intent );
247
- }
230
+ // if (User.isAuthenticated())
231
+ // {
232
+ // User.signout(null);
233
+ // PoseApp.clearDB();
234
+ // Intent intentSendLogout = new Intent(GSGlobals.INTENT_POSE_LOGOUT);
235
+ // PoseApp.getContext().sendBroadcast(intentSendLogout);
236
+ //
237
+ // Intent intent = new Intent(PoseApp.getContext(), SignupSplashActivity.class);
238
+ // intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
239
+ // PoseApp.getContext().startActivity(intent);
240
+ // }
248
241
}
249
- } else
250
- {
242
+ } else {
251
243
try
252
244
{
253
245
HttpEntity entity = null ;
0 commit comments