Browse Source

Fixed a bug where sometimes opening browser from recents opened recent tab, removed extra view

Also increased strictmode scope
master
Anthony Restaino 9 years ago
parent
commit
c8d06f8ce6
  1. 15
      app/src/main/java/acr/browser/lightning/activity/BrowserActivity.java
  2. 8
      app/src/main/res/layout/activity_main.xml

15
app/src/main/java/acr/browser/lightning/activity/BrowserActivity.java

@ -154,8 +154,8 @@ public abstract class BrowserActivity extends ThemableBrowserActivity implements @@ -154,8 +154,8 @@ public abstract class BrowserActivity extends ThemableBrowserActivity implements
// Toolbar Views
@Bind(R.id.toolbar) Toolbar mToolbar;
private View mSearchBackground;
private Toolbar mToolbar;
private SearchView mSearch;
private ImageView mArrowImage;
@ -236,14 +236,11 @@ public abstract class BrowserActivity extends ThemableBrowserActivity implements @@ -236,14 +236,11 @@ public abstract class BrowserActivity extends ThemableBrowserActivity implements
if (BuildConfig.DEBUG) {
StrictMode.setThreadPolicy(new StrictMode.ThreadPolicy.Builder()
.detectDiskReads()
.detectDiskWrites()
.detectNetwork()
.detectAll()
.penaltyLog()
.build());
StrictMode.setVmPolicy(new StrictMode.VmPolicy.Builder()
.detectLeakedClosableObjects()
.detectLeakedSqlLiteObjects()
.detectAll()
.penaltyLog()
.build());
}
@ -272,7 +269,6 @@ public abstract class BrowserActivity extends ThemableBrowserActivity implements @@ -272,7 +269,6 @@ public abstract class BrowserActivity extends ThemableBrowserActivity implements
}
private synchronized void initialize(Bundle savedInstanceState) {
mToolbar = (Toolbar) findViewById(R.id.toolbar);
initializeToolbarHeight(getResources().getConfiguration());
setSupportActionBar(mToolbar);
ActionBar actionBar = getSupportActionBar();
@ -415,10 +411,15 @@ public abstract class BrowserActivity extends ThemableBrowserActivity implements @@ -415,10 +411,15 @@ public abstract class BrowserActivity extends ThemableBrowserActivity implements
Intent intent = savedInstanceState == null ? getIntent() : null;
boolean launchedFromHistory = intent != null && (intent.getFlags() & Intent.FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY) != 0;
if (isPanicTrigger(intent)) {
setIntent(null);
panicClean();
} else {
if (launchedFromHistory) {
intent = null;
}
mPresenter.setupTabs(intent);
setIntent(null);
mProxyUtils.checkForProxy(BrowserActivity.this);

8
app/src/main/res/layout/activity_main.xml

@ -7,13 +7,6 @@ @@ -7,13 +7,6 @@
android:layout_height="match_parent"
tools:context=".activity.BrowserActivity">
<LinearLayout
android:id="@+id/main_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@null"
android:orientation="vertical">
<android.support.v4.widget.DrawerLayout
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
@ -53,5 +46,4 @@ @@ -53,5 +46,4 @@
</android.support.v4.widget.DrawerLayout>
</LinearLayout>
</android.support.design.widget.CoordinatorLayout>
Loading…
Cancel
Save