diff --git a/android/titanium/src/java/org/appcelerator/titanium/TiApplication.java b/android/titanium/src/java/org/appcelerator/titanium/TiApplication.java index 4c4bf105912..b97da5a8255 100644 --- a/android/titanium/src/java/org/appcelerator/titanium/TiApplication.java +++ b/android/titanium/src/java/org/appcelerator/titanium/TiApplication.java @@ -198,10 +198,11 @@ public static void removeFromActivityStack(Activity activity) { if (activity != null) { activityStack.remove(activity); - if (activityStack.size() == 1 && activityStack.get(0).get() - .getLocalClassName().equals(TiApplication.getAppRootOrCurrentActivity().getLocalClassName())) { - // only base activity is visible - close app - terminateActivityStack(); + if (activityStack.size() == 1) { + boolean isTiRootActivity = (activityStack.get(0).get() instanceof TiRootActivity); + if (isTiRootActivity) { + terminateActivityStack(); + } } } }