Revert "Fix for Android bug that causes duplicate baseactivity launches."

This reverts commit 3349945f36.

This fix breaks the actionbar up.
captchafix
Florens Douwes 11 years ago
parent 40513d4753
commit 055b532b3c
  1. 19
      Clover/app/src/main/java/org/floens/chan/ui/activity/BaseActivity.java
  2. 2
      Clover/app/src/main/java/org/floens/chan/ui/activity/BoardActivity.java

@ -34,7 +34,6 @@ import android.support.v4.widget.DrawerLayout;
import android.support.v4.widget.SlidingPaneLayout;
import android.support.v4.widget.SlidingPaneLayout.PanelSlideListener;
import android.text.TextUtils;
import android.util.Log;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
@ -60,11 +59,8 @@ import org.floens.chan.utils.Utils;
import java.util.List;
public abstract class BaseActivity extends Activity implements PanelSlideListener, PinnedManager.PinListener {
private final static String TAG = "BaseActivity";
private final static int ACTION_OPEN_URL = 1;
protected boolean wasFinished = false;
protected PinnedAdapter pinnedAdapter;
protected DrawerLayout pinDrawer;
protected ListView pinDrawerView;
@ -93,21 +89,6 @@ public abstract class BaseActivity extends Activity implements PanelSlideListene
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// See http://stackoverflow.com/a/7748416/1001608
// Possible work around for market launches. See http://code.google.com/p/android/issues/detail?id=2373
// for more details. Essentially, the market launches the main activity on top of other activities.
// we never want this to happen. Instead, we check if we are the root and if not, we finish.
if (!isTaskRoot()) {
final Intent intent = getIntent();
final String intentAction = intent.getAction();
if (intent.hasCategory(Intent.CATEGORY_LAUNCHER) && intentAction != null && intentAction.equals(Intent.ACTION_MAIN)) {
Log.w(TAG, "Activity is not the root. Finishing activity instead of launching.");
finish();
wasFinished = true;
return;
}
}
ThemeHelper.setTheme(this);
ThemeHelper.getInstance().reloadPostViewColors(this);

@ -59,8 +59,6 @@ public class BoardActivity extends BaseActivity implements ActionBar.OnNavigatio
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (wasFinished) return;
actionBarSetToListNavigation = false;
boardLoadable = new Loadable();
threadLoadable = new Loadable();

Loading…
Cancel
Save