|
|
@ -68,104 +68,55 @@ import java.util.*; |
|
|
|
public class BrowserActivity extends Activity implements BrowserController { |
|
|
|
public class BrowserActivity extends Activity implements BrowserController { |
|
|
|
|
|
|
|
|
|
|
|
private DrawerLayout mDrawerLayout; |
|
|
|
private DrawerLayout mDrawerLayout; |
|
|
|
|
|
|
|
|
|
|
|
private ListView mDrawerList; |
|
|
|
private ListView mDrawerList; |
|
|
|
|
|
|
|
|
|
|
|
private RelativeLayout mDrawer; |
|
|
|
private RelativeLayout mDrawer; |
|
|
|
|
|
|
|
|
|
|
|
private LinearLayout mDrawerRight; |
|
|
|
private LinearLayout mDrawerRight; |
|
|
|
|
|
|
|
|
|
|
|
private ListView mDrawerListRight; |
|
|
|
private ListView mDrawerListRight; |
|
|
|
|
|
|
|
|
|
|
|
private RelativeLayout mNewTab; |
|
|
|
private RelativeLayout mNewTab; |
|
|
|
|
|
|
|
|
|
|
|
private ActionBarDrawerToggle mDrawerToggle; |
|
|
|
private ActionBarDrawerToggle mDrawerToggle; |
|
|
|
|
|
|
|
|
|
|
|
private List<LightningView> mWebViews = new ArrayList<LightningView>(); |
|
|
|
private List<LightningView> mWebViews = new ArrayList<LightningView>(); |
|
|
|
|
|
|
|
|
|
|
|
private List<Integer> mIdList = new ArrayList<Integer>(); |
|
|
|
private List<Integer> mIdList = new ArrayList<Integer>(); |
|
|
|
|
|
|
|
|
|
|
|
private LightningView mCurrentView; |
|
|
|
private LightningView mCurrentView; |
|
|
|
|
|
|
|
|
|
|
|
private int mIdGenerator; |
|
|
|
private int mIdGenerator; |
|
|
|
|
|
|
|
|
|
|
|
private LightningViewAdapter mTitleAdapter; |
|
|
|
private LightningViewAdapter mTitleAdapter; |
|
|
|
|
|
|
|
|
|
|
|
private List<HistoryItem> mBookmarkList; |
|
|
|
private List<HistoryItem> mBookmarkList; |
|
|
|
|
|
|
|
|
|
|
|
private BookmarkViewAdapter mBookmarkAdapter; |
|
|
|
private BookmarkViewAdapter mBookmarkAdapter; |
|
|
|
|
|
|
|
|
|
|
|
private AutoCompleteTextView mSearch; |
|
|
|
private AutoCompleteTextView mSearch; |
|
|
|
|
|
|
|
|
|
|
|
private ClickHandler mClickHandler; |
|
|
|
private ClickHandler mClickHandler; |
|
|
|
|
|
|
|
|
|
|
|
private ProgressBar mProgressBar; |
|
|
|
private ProgressBar mProgressBar; |
|
|
|
|
|
|
|
|
|
|
|
private boolean mSystemBrowser = false; |
|
|
|
private boolean mSystemBrowser = false; |
|
|
|
|
|
|
|
|
|
|
|
private ValueCallback<Uri> mUploadMessage; |
|
|
|
private ValueCallback<Uri> mUploadMessage; |
|
|
|
|
|
|
|
|
|
|
|
private View mCustomView; |
|
|
|
private View mCustomView; |
|
|
|
|
|
|
|
|
|
|
|
private int mOriginalOrientation; |
|
|
|
private int mOriginalOrientation; |
|
|
|
|
|
|
|
|
|
|
|
private int mActionBarSize; |
|
|
|
private int mActionBarSize; |
|
|
|
|
|
|
|
|
|
|
|
private ActionBar mActionBar; |
|
|
|
private ActionBar mActionBar; |
|
|
|
|
|
|
|
|
|
|
|
private boolean mFullScreen; |
|
|
|
private boolean mFullScreen; |
|
|
|
|
|
|
|
|
|
|
|
private FrameLayout mBrowserFrame; |
|
|
|
private FrameLayout mBrowserFrame; |
|
|
|
|
|
|
|
|
|
|
|
private FullscreenHolder mFullscreenContainer; |
|
|
|
private FullscreenHolder mFullscreenContainer; |
|
|
|
|
|
|
|
|
|
|
|
private CustomViewCallback mCustomViewCallback; |
|
|
|
private CustomViewCallback mCustomViewCallback; |
|
|
|
|
|
|
|
|
|
|
|
private final FrameLayout.LayoutParams COVER_SCREEN_PARAMS = new FrameLayout.LayoutParams( |
|
|
|
private final FrameLayout.LayoutParams COVER_SCREEN_PARAMS = new FrameLayout.LayoutParams( |
|
|
|
ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT); |
|
|
|
ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT); |
|
|
|
|
|
|
|
|
|
|
|
private Bitmap mDefaultVideoPoster; |
|
|
|
private Bitmap mDefaultVideoPoster; |
|
|
|
|
|
|
|
|
|
|
|
private View mVideoProgressView; |
|
|
|
private View mVideoProgressView; |
|
|
|
|
|
|
|
|
|
|
|
private DatabaseHandler mHistoryHandler; |
|
|
|
private DatabaseHandler mHistoryHandler; |
|
|
|
|
|
|
|
|
|
|
|
private SQLiteDatabase mHistoryDatabase; |
|
|
|
private SQLiteDatabase mHistoryDatabase; |
|
|
|
|
|
|
|
|
|
|
|
private SharedPreferences mPreferences; |
|
|
|
private SharedPreferences mPreferences; |
|
|
|
|
|
|
|
|
|
|
|
private SharedPreferences.Editor mEditPrefs; |
|
|
|
private SharedPreferences.Editor mEditPrefs; |
|
|
|
|
|
|
|
|
|
|
|
private Context mContext; |
|
|
|
private Context mContext; |
|
|
|
|
|
|
|
|
|
|
|
private Bitmap mWebpageBitmap; |
|
|
|
private Bitmap mWebpageBitmap; |
|
|
|
|
|
|
|
|
|
|
|
private String mSearchText; |
|
|
|
private String mSearchText; |
|
|
|
|
|
|
|
|
|
|
|
private Activity mActivity; |
|
|
|
private Activity mActivity; |
|
|
|
|
|
|
|
|
|
|
|
private final int API = android.os.Build.VERSION.SDK_INT; |
|
|
|
private final int API = android.os.Build.VERSION.SDK_INT; |
|
|
|
|
|
|
|
|
|
|
|
private Drawable mDeleteIcon; |
|
|
|
private Drawable mDeleteIcon; |
|
|
|
|
|
|
|
|
|
|
|
private Drawable mRefreshIcon; |
|
|
|
private Drawable mRefreshIcon; |
|
|
|
|
|
|
|
|
|
|
|
private Drawable mCopyIcon; |
|
|
|
private Drawable mCopyIcon; |
|
|
|
|
|
|
|
|
|
|
|
private Drawable mIcon; |
|
|
|
private Drawable mIcon; |
|
|
|
|
|
|
|
|
|
|
|
private int mActionBarSizeDp; |
|
|
|
private int mActionBarSizeDp; |
|
|
|
|
|
|
|
|
|
|
|
private int mNumberIconColor; |
|
|
|
private int mNumberIconColor; |
|
|
|
|
|
|
|
|
|
|
|
private String mHomepage; |
|
|
|
private String mHomepage; |
|
|
|
|
|
|
|
|
|
|
|
private boolean mIsNewIntent = false; |
|
|
|
private boolean mIsNewIntent = false; |
|
|
|
|
|
|
|
|
|
|
|
private VideoView mVideoView; |
|
|
|
private VideoView mVideoView; |
|
|
|
|
|
|
|
|
|
|
|
private static SearchAdapter mSearchAdapter; |
|
|
|
private static SearchAdapter mSearchAdapter; |
|
|
|
|
|
|
|
|
|
|
|
private static LayoutParams mMatchParent = new LayoutParams(LayoutParams.MATCH_PARENT, |
|
|
|
private static LayoutParams mMatchParent = new LayoutParams(LayoutParams.MATCH_PARENT, |
|
|
|
LayoutParams.MATCH_PARENT); |
|
|
|
LayoutParams.MATCH_PARENT); |
|
|
|
|
|
|
|
|
|
|
@ -648,7 +599,6 @@ public class BrowserActivity extends Activity implements BrowserController { |
|
|
|
try { |
|
|
|
try { |
|
|
|
WebkitProxy.resetProxy("acr.browser.lightning.BrowserApp", getApplicationContext()); |
|
|
|
WebkitProxy.resetProxy("acr.browser.lightning.BrowserApp", getApplicationContext()); |
|
|
|
} catch (Exception e) { |
|
|
|
} catch (Exception e) { |
|
|
|
// TODO Auto-generated catch block
|
|
|
|
|
|
|
|
e.printStackTrace(); |
|
|
|
e.printStackTrace(); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -1997,7 +1947,7 @@ public class BrowserActivity extends Activity implements BrowserController { |
|
|
|
+ helper.getTitle() + BookmarkPageVariables.Part4); |
|
|
|
+ helper.getTitle() + BookmarkPageVariables.Part4); |
|
|
|
} |
|
|
|
} |
|
|
|
bookmarkHtml += BookmarkPageVariables.End; |
|
|
|
bookmarkHtml += BookmarkPageVariables.End; |
|
|
|
File bookmarkWebPage = new File(mContext.getCacheDir(), "bookmarks.html"); |
|
|
|
File bookmarkWebPage = new File(mContext.getFilesDir(), "bookmarks.html"); |
|
|
|
try { |
|
|
|
try { |
|
|
|
FileWriter bookWriter = new FileWriter(bookmarkWebPage, false); |
|
|
|
FileWriter bookWriter = new FileWriter(bookmarkWebPage, false); |
|
|
|
bookWriter.write(bookmarkHtml); |
|
|
|
bookWriter.write(bookmarkHtml); |
|
|
|