Browse Source

Change variables to project naming convention

master
Anthony Restaino 9 years ago
parent
commit
b3f991e598
  1. 34
      app/src/main/java/acr/browser/lightning/activity/BrowserActivity.java

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

@ -177,17 +177,17 @@ public abstract class BrowserActivity extends ThemableBrowserActivity implements
// The singleton BookmarkManager // The singleton BookmarkManager
@Inject @Inject
BookmarkManager bookmarkManager; BookmarkManager mBookmarkManager;
// Event bus // Event bus
@Inject @Inject
Bus eventBus; Bus mEventBus;
@Inject @Inject
BookmarkPage bookmarkPage; BookmarkPage mBookmarkPage;
@Inject @Inject
BookmarksDialogBuilder bookmarksDialogBuilder; BookmarksDialogBuilder mBookmarksDialogBuilder;
// Image // Image
private Bitmap mWebpageBitmap; private Bitmap mWebpageBitmap;
@ -778,7 +778,7 @@ public abstract class BrowserActivity extends ThemableBrowserActivity implements
return true; return true;
case R.id.action_add_bookmark: case R.id.action_add_bookmark:
if (mCurrentView != null && !mCurrentView.getUrl().startsWith(Constants.FILE)) { if (mCurrentView != null && !mCurrentView.getUrl().startsWith(Constants.FILE)) {
eventBus.post(new BrowserEvents.AddBookmark(mCurrentView.getTitle(), mEventBus.post(new BrowserEvents.AddBookmark(mCurrentView.getTitle(),
mCurrentView.getUrl())); mCurrentView.getUrl()));
} }
return true; return true;
@ -956,7 +956,7 @@ public abstract class BrowserActivity extends ThemableBrowserActivity implements
}, 200); }, 200);
// Should update the bookmark status in BookmarksFragment // Should update the bookmark status in BookmarksFragment
eventBus.post(new BrowserEvents.CurrentPageUrl(mCurrentView.getUrl())); mEventBus.post(new BrowserEvents.CurrentPageUrl(mCurrentView.getUrl()));
// new Handler().postDelayed(new Runnable() { // new Handler().postDelayed(new Runnable() {
// @Override // @Override
@ -1000,7 +1000,7 @@ public abstract class BrowserActivity extends ThemableBrowserActivity implements
} }
mCurrentView.loadUrl(url); mCurrentView.loadUrl(url);
eventBus.post(new BrowserEvents.CurrentPageUrl(url)); mEventBus.post(new BrowserEvents.CurrentPageUrl(url));
} }
@Override @Override
@ -1172,7 +1172,7 @@ public abstract class BrowserActivity extends ThemableBrowserActivity implements
if (mDrawerLayout.isDrawerOpen(mDrawerLeft)) { if (mDrawerLayout.isDrawerOpen(mDrawerLeft)) {
mDrawerLayout.closeDrawer(mDrawerLeft); mDrawerLayout.closeDrawer(mDrawerLeft);
} else if (mDrawerLayout.isDrawerOpen(mDrawerRight)) { } else if (mDrawerLayout.isDrawerOpen(mDrawerRight)) {
eventBus mEventBus
.post(new BrowserEvents.UserPressedBack()); .post(new BrowserEvents.UserPressedBack());
} else { } else {
if (mCurrentView != null) { if (mCurrentView != null) {
@ -1212,7 +1212,7 @@ public abstract class BrowserActivity extends ThemableBrowserActivity implements
overridePendingTransition(R.anim.fade_in_scale, R.anim.slide_down_out); overridePendingTransition(R.anim.fade_in_scale, R.anim.slide_down_out);
} }
eventBus.unregister(busEventListener); mEventBus.unregister(busEventListener);
} }
void saveOpenTabs() { void saveOpenTabs() {
@ -1277,7 +1277,7 @@ public abstract class BrowserActivity extends ThemableBrowserActivity implements
filter.addAction(NETWORK_BROADCAST_ACTION); filter.addAction(NETWORK_BROADCAST_ACTION);
registerReceiver(mNetworkReceiver, filter); registerReceiver(mNetworkReceiver, filter);
eventBus.register(busEventListener); mEventBus.register(busEventListener);
} }
/** /**
@ -1513,7 +1513,7 @@ public abstract class BrowserActivity extends ThemableBrowserActivity implements
if (url == null || mSearch == null || mSearch.hasFocus()) { if (url == null || mSearch == null || mSearch.hasFocus()) {
return; return;
} }
eventBus.post(new BrowserEvents.CurrentPageUrl(url)); mEventBus.post(new BrowserEvents.CurrentPageUrl(url));
if (shortUrl && !url.startsWith(Constants.FILE)) { if (shortUrl && !url.startsWith(Constants.FILE)) {
switch (mPreferences.getUrlBoxContentChoice()) { switch (mPreferences.getUrlBoxContentChoice()) {
case 0: // Default, show only the domain case 0: // Default, show only the domain
@ -1680,7 +1680,7 @@ public abstract class BrowserActivity extends ThemableBrowserActivity implements
} }
File bookmarkWebPage = new File(mActivity.getFilesDir(), Constants.BOOKMARKS_FILENAME); File bookmarkWebPage = new File(mActivity.getFilesDir(), Constants.BOOKMARKS_FILENAME);
bookmarkPage.buildBookmarkPage(null, bookmarkManager.getBookmarksFromFolder(null, true)); mBookmarkPage.buildBookmarkPage(null, mBookmarkManager.getBookmarksFromFolder(null, true));
view.loadUrl(Constants.FILE + bookmarkWebPage); view.loadUrl(Constants.FILE + bookmarkWebPage);
} }
@ -2101,10 +2101,10 @@ public abstract class BrowserActivity extends ThemableBrowserActivity implements
} }
} else if (currentUrl.endsWith(Constants.BOOKMARKS_FILENAME)) { } else if (currentUrl.endsWith(Constants.BOOKMARKS_FILENAME)) {
if (url != null) { if (url != null) {
bookmarksDialogBuilder.showLongPressedDialogForUrl(this, url); mBookmarksDialogBuilder.showLongPressedDialogForUrl(this, url);
} else if (result != null && result.getExtra() != null) { } else if (result != null && result.getExtra() != null) {
final String newUrl = result.getExtra(); final String newUrl = result.getExtra();
bookmarksDialogBuilder.showLongPressedDialogForUrl(this, newUrl); mBookmarksDialogBuilder.showLongPressedDialogForUrl(this, newUrl);
} }
} }
} else { } else {
@ -2405,7 +2405,7 @@ public abstract class BrowserActivity extends ThemableBrowserActivity implements
@Subscribe @Subscribe
public void bookmarkCurrentPage(final BookmarkEvents.WantToBookmarkCurrentPage event) { public void bookmarkCurrentPage(final BookmarkEvents.WantToBookmarkCurrentPage event) {
if (mCurrentView != null) { if (mCurrentView != null) {
eventBus.post(new BrowserEvents.AddBookmark(mCurrentView.getTitle(), mCurrentView.getUrl())); mEventBus.post(new BrowserEvents.AddBookmark(mCurrentView.getTitle(), mCurrentView.getUrl()));
} }
} }
@ -2432,7 +2432,7 @@ public abstract class BrowserActivity extends ThemableBrowserActivity implements
openBookmarkPage(mWebView); openBookmarkPage(mWebView);
} }
if (mCurrentView != null) { if (mCurrentView != null) {
eventBus.post(new BrowserEvents.CurrentPageUrl(mCurrentView.getUrl())); mEventBus.post(new BrowserEvents.CurrentPageUrl(mCurrentView.getUrl()));
} }
} }
@ -2448,7 +2448,7 @@ public abstract class BrowserActivity extends ThemableBrowserActivity implements
openBookmarkPage(mWebView); openBookmarkPage(mWebView);
} }
if (mCurrentView != null) { if (mCurrentView != null) {
eventBus.post(new BrowserEvents.CurrentPageUrl(mCurrentView.getUrl())); mEventBus.post(new BrowserEvents.CurrentPageUrl(mCurrentView.getUrl()));
} }
} }

Loading…
Cancel
Save