Lint fixes
@ -6,7 +6,7 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="acr.browser.lightning"
|
||||
android:versionCode="66"
|
||||
android:versionName="3.2.0a" >
|
||||
android:versionName="3.2.0.1a" >
|
||||
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
<uses-permission android:name="com.android.browser.permission.READ_HISTORY_BOOKMARKS" />
|
||||
|
Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 4.5 KiB |
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 6.5 KiB After Width: | Height: | Size: 6.6 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
@ -1,194 +0,0 @@
|
||||
<!--
|
||||
Copyright 2014 ACR Development
|
||||
-->
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/main_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical" >
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/progressWrapper"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?progressColor"
|
||||
android:orientation="vertical" >
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/activity_bar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="2dp"
|
||||
android:indeterminate="false"
|
||||
android:indeterminateOnly="false"
|
||||
android:maxHeight="2dp"
|
||||
android:minHeight="2dp"
|
||||
android:progressDrawable="@drawable/progress" />
|
||||
</LinearLayout>
|
||||
|
||||
<!-- A DrawerLayout is intended to be used as the top-level content view using match_parent for both width and height to consume the full space available. -->
|
||||
|
||||
<android.support.v4.widget.DrawerLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/drawer_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" >
|
||||
|
||||
<!--
|
||||
As the main content view, the view below consumes the entire
|
||||
space available using match_parent in both dimensions.
|
||||
-->
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/content_frame"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
<!--
|
||||
android:layout_gravity="start" tells DrawerLayout to treat
|
||||
this as a sliding drawer on the left side for left-to-right
|
||||
languages and on the right side for right-to-left languages.
|
||||
The drawer is given a fixed width in dp and extends the full height of
|
||||
the container. A solid background is used for contrast
|
||||
with the content view.
|
||||
-->
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/drawer"
|
||||
android:layout_width="300dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="start"
|
||||
android:background="@color/drawer_background"
|
||||
android:clickable="true"
|
||||
android:orientation="vertical" >
|
||||
|
||||
<TextView
|
||||
android:id="@+id/new_tab_button"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentTop="true"
|
||||
android:background="?android:attr/listChoiceBackgroundIndicator"
|
||||
android:gravity="center_vertical"
|
||||
android:minHeight="?android:attr/listPreferredItemHeightSmall"
|
||||
android:paddingLeft="16dp"
|
||||
android:paddingRight="16dp"
|
||||
android:text="@string/action_new_tab"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:textColor="#000000" />
|
||||
|
||||
<View
|
||||
android:id="@+id/view"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_below="@+id/new_tab_button"
|
||||
android:background="#bababa" />
|
||||
|
||||
<ListView
|
||||
android:id="@+id/left_drawer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_above="@+id/lineView"
|
||||
android:layout_below="@+id/view"
|
||||
android:choiceMode="singleChoice"
|
||||
android:divider="#bababa"
|
||||
android:dividerHeight="1dp" />
|
||||
|
||||
<View
|
||||
android:id="@+id/lineView"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_above="@+id/linearLayout1"
|
||||
android:background="#bababa" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/linearLayout1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:baselineAligned="false"
|
||||
android:orientation="horizontal"
|
||||
android:weightSum="2" >
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/action_back"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:background="?android:attr/listChoiceBackgroundIndicator"
|
||||
android:clickable="true" >
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
android:contentDescription="@string/action_back"
|
||||
android:paddingBottom="4dp"
|
||||
android:paddingLeft="4dp"
|
||||
android:paddingRight="4dp"
|
||||
android:paddingTop="4dp"
|
||||
android:src="@drawable/ic_action_back" />
|
||||
</RelativeLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="1dp"
|
||||
android:layout_height="48dp"
|
||||
android:background="#bababa" />
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/action_forward"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:background="?android:attr/listChoiceBackgroundIndicator"
|
||||
android:clickable="true" >
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
android:contentDescription="@string/action_forward"
|
||||
android:paddingBottom="4dp"
|
||||
android:paddingLeft="4dp"
|
||||
android:paddingRight="4dp"
|
||||
android:paddingTop="4dp"
|
||||
android:src="@drawable/ic_action_forward" />
|
||||
</RelativeLayout>
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/right_drawer"
|
||||
android:layout_width="300dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="end"
|
||||
android:background="@color/drawer_background"
|
||||
android:clickable="true"
|
||||
android:orientation="vertical" >
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="#33b5e5"
|
||||
android:gravity="center_vertical"
|
||||
android:minHeight="?android:attr/listPreferredItemHeightSmall"
|
||||
android:paddingLeft="16dp"
|
||||
android:paddingRight="16dp"
|
||||
android:text="@string/action_bookmarks"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:textColor="#000000" />
|
||||
|
||||
<View
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="#bababa" />
|
||||
|
||||
<ListView
|
||||
android:id="@+id/right_drawer_list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:divider="#bababa"
|
||||
android:dividerHeight="1dp" />
|
||||
</LinearLayout>
|
||||
</android.support.v4.widget.DrawerLayout>
|
||||
|
||||
</LinearLayout>
|
@ -1,194 +0,0 @@
|
||||
<!--
|
||||
Copyright 2014 ACR Development
|
||||
-->
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/main_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical" >
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/progressWrapper"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?progressColor"
|
||||
android:orientation="vertical" >
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/activity_bar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="2dp"
|
||||
android:indeterminate="false"
|
||||
android:indeterminateOnly="false"
|
||||
android:maxHeight="2dp"
|
||||
android:minHeight="2dp"
|
||||
android:progressDrawable="@drawable/progress" />
|
||||
</LinearLayout>
|
||||
|
||||
<!-- A DrawerLayout is intended to be used as the top-level content view using match_parent for both width and height to consume the full space available. -->
|
||||
|
||||
<android.support.v4.widget.DrawerLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/drawer_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" >
|
||||
|
||||
<!--
|
||||
As the main content view, the view below consumes the entire
|
||||
space available using match_parent in both dimensions.
|
||||
-->
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/content_frame"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
<!--
|
||||
android:layout_gravity="start" tells DrawerLayout to treat
|
||||
this as a sliding drawer on the left side for left-to-right
|
||||
languages and on the right side for right-to-left languages.
|
||||
The drawer is given a fixed width in dp and extends the full height of
|
||||
the container. A solid background is used for contrast
|
||||
with the content view.
|
||||
-->
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/drawer"
|
||||
android:layout_width="300dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="start"
|
||||
android:background="@color/drawer_background"
|
||||
android:clickable="true"
|
||||
android:orientation="vertical" >
|
||||
|
||||
<TextView
|
||||
android:id="@+id/new_tab_button"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentTop="true"
|
||||
android:background="?android:attr/listChoiceBackgroundIndicator"
|
||||
android:gravity="center_vertical"
|
||||
android:minHeight="?android:attr/listPreferredItemHeightSmall"
|
||||
android:paddingLeft="16dp"
|
||||
android:paddingRight="16dp"
|
||||
android:text="@string/action_new_tab"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:textColor="#000000" />
|
||||
|
||||
<View
|
||||
android:id="@+id/view"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_below="@+id/new_tab_button"
|
||||
android:background="#bababa" />
|
||||
|
||||
<ListView
|
||||
android:id="@+id/left_drawer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_above="@+id/lineView"
|
||||
android:layout_below="@+id/view"
|
||||
android:choiceMode="singleChoice"
|
||||
android:divider="#bababa"
|
||||
android:dividerHeight="1dp" />
|
||||
|
||||
<View
|
||||
android:id="@+id/lineView"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_above="@+id/linearLayout1"
|
||||
android:background="#bababa" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/linearLayout1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:baselineAligned="false"
|
||||
android:orientation="horizontal"
|
||||
android:weightSum="2" >
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/action_back"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:background="?android:attr/listChoiceBackgroundIndicator"
|
||||
android:clickable="true" >
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
android:contentDescription="@string/action_back"
|
||||
android:paddingBottom="4dp"
|
||||
android:paddingLeft="4dp"
|
||||
android:paddingRight="4dp"
|
||||
android:paddingTop="4dp"
|
||||
android:src="@drawable/ic_action_back" />
|
||||
</RelativeLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="1dp"
|
||||
android:layout_height="48dp"
|
||||
android:background="#bababa" />
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/action_forward"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:background="?android:attr/listChoiceBackgroundIndicator"
|
||||
android:clickable="true" >
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
android:contentDescription="@string/action_forward"
|
||||
android:paddingBottom="4dp"
|
||||
android:paddingLeft="4dp"
|
||||
android:paddingRight="4dp"
|
||||
android:paddingTop="4dp"
|
||||
android:src="@drawable/ic_action_forward" />
|
||||
</RelativeLayout>
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/right_drawer"
|
||||
android:layout_width="300dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="end"
|
||||
android:background="@color/drawer_background"
|
||||
android:clickable="true"
|
||||
android:orientation="vertical" >
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="#33b5e5"
|
||||
android:gravity="center_vertical"
|
||||
android:minHeight="?android:attr/listPreferredItemHeightSmall"
|
||||
android:paddingLeft="16dp"
|
||||
android:paddingRight="16dp"
|
||||
android:text="@string/action_bookmarks"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:textColor="#000000" />
|
||||
|
||||
<View
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="#bababa" />
|
||||
|
||||
<ListView
|
||||
android:id="@+id/right_drawer_list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:divider="#bababa"
|
||||
android:dividerHeight="1dp" />
|
||||
</LinearLayout>
|
||||
</android.support.v4.widget.DrawerLayout>
|
||||
|
||||
</LinearLayout>
|
@ -4,6 +4,7 @@
|
||||
|
||||
package acr.browser.lightning;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.app.ActionBar;
|
||||
import android.app.Activity;
|
||||
import android.app.AlertDialog;
|
||||
@ -161,14 +162,13 @@ public class BrowserActivity extends Activity implements BrowserController {
|
||||
|
||||
private static SearchAdapter mSearchAdapter;
|
||||
|
||||
private boolean isIncognito = false;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
initialize();
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
private synchronized void initialize() {
|
||||
setContentView(R.layout.activity_main);
|
||||
TypedValue typedValue = new TypedValue();
|
||||
@ -1249,6 +1249,7 @@ public class BrowserActivity extends Activity implements BrowserController {
|
||||
return true;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public void clearHistory() {
|
||||
this.deleteDatabase(DatabaseHandler.DATABASE_NAME);
|
||||
WebViewDatabase m = WebViewDatabase.getInstance(this);
|
||||
@ -2283,6 +2284,7 @@ public class BrowserActivity extends Activity implements BrowserController {
|
||||
return mDefaultVideoPoster;
|
||||
}
|
||||
|
||||
@SuppressLint("InflateParams")
|
||||
@Override
|
||||
/**
|
||||
* dumb method that returns the loading progress for a video
|
||||
|
@ -27,9 +27,7 @@ import android.webkit.*;
|
||||
import android.webkit.WebSettings.LayoutAlgorithm;
|
||||
import android.webkit.WebSettings.PluginState;
|
||||
import android.widget.EditText;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.VideoView;
|
||||
import org.apache.http.util.ByteArrayBuffer;
|
||||
|
||||
import java.io.*;
|
||||
@ -63,18 +61,16 @@ public class LightningView {
|
||||
|
||||
private AdBlock mAdBlock;
|
||||
|
||||
private CookieManager mCookieManager;
|
||||
|
||||
private boolean isForgroundTab = false;
|
||||
|
||||
private IntentUtils mIntentUtils = null;
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
@SuppressLint("NewApi")
|
||||
public LightningView(Activity activity, String url,
|
||||
CookieManager cookieManager) {
|
||||
|
||||
mActivity = activity;
|
||||
mCookieManager = cookieManager;
|
||||
mWebView = new WebView(activity);
|
||||
mTitle = new Title(activity);
|
||||
mAdBlock = new AdBlock(activity);
|
||||
@ -262,7 +258,8 @@ public class LightningView {
|
||||
return Constants.FILE + homepage;
|
||||
}
|
||||
|
||||
@SuppressLint("NewApi")
|
||||
@SuppressWarnings("deprecation")
|
||||
@SuppressLint({ "NewApi", "SetJavaScriptEnabled" })
|
||||
public synchronized void initializePreferences(Context context) {
|
||||
mPreferences = context.getSharedPreferences(
|
||||
PreferenceConstants.PREFERENCES, 0);
|
||||
@ -361,6 +358,7 @@ public class LightningView {
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
@SuppressLint({"SetJavaScriptEnabled", "NewApi"})
|
||||
public void initializeSettings(WebSettings settings, Context context) {
|
||||
if (API < 18) {
|
||||
@ -476,6 +474,7 @@ public class LightningView {
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
@SuppressLint("NewApi")
|
||||
public synchronized void find(String text) {
|
||||
if (mWebView != null) {
|
||||
|