File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed
Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -415,7 +415,10 @@ public void expireUserSession() {
415415 synchronized (serviceLock ) {
416416 closeUserSession ();
417417 SessionRegistrationHelper .registerSessionExpiration ();
418- sendBroadcast (new Intent (SessionRegistrationHelper .USER_SESSION_EXPIRED ));
418+ sendBroadcast (
419+ new Intent (SessionRegistrationHelper .USER_SESSION_EXPIRED )
420+ .setPackage (this .getPackageName ())
421+ );
419422 }
420423 }
421424
Original file line number Diff line number Diff line change 11package org .commcare .utils ;
22
3+ import android .app .Activity ;
34import android .content .BroadcastReceiver ;
45import android .content .Context ;
56import android .content .Intent ;
@@ -98,7 +99,10 @@ public static void unregisterSessionExpiration() {
9899 */
99100 public static void redirectToLogin (Context context ) {
100101 Intent i = new Intent (context .getApplicationContext (), DispatchActivity .class );
101- i .setFlags (Intent .FLAG_ACTIVITY_CLEAR_TOP );
102+ i .addFlags (Intent .FLAG_ACTIVITY_CLEAR_TOP );
103+ if (!(context instanceof Activity )) {
104+ i .addFlags (Intent .FLAG_ACTIVITY_NEW_TASK );
105+ }
102106 context .startActivity (i );
103107 }
104108}
You can’t perform that action at this time.
0 commit comments