Retrieve correct package name rather than hardcoding it
This commit is contained in:
parent
bdb36be4e4
commit
eff7e3800d
@ -641,8 +641,8 @@ public class BrowserActivity extends ActionBarActivity implements BrowserControl
|
|||||||
try {
|
try {
|
||||||
String host = mPreferences.getString(PreferenceConstants.USE_PROXY_HOST, "localhost");
|
String host = mPreferences.getString(PreferenceConstants.USE_PROXY_HOST, "localhost");
|
||||||
int port = mPreferences.getInt(PreferenceConstants.USE_PROXY_PORT, 8118);
|
int port = mPreferences.getInt(PreferenceConstants.USE_PROXY_PORT, 8118);
|
||||||
WebkitProxy.setProxy("acr.browser.lightning.BrowserApp", getApplicationContext(), host,
|
WebkitProxy.setProxy(this.getPackageName() + ".BrowserApp", getApplicationContext(),
|
||||||
port);
|
host, port);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
Log.d(Constants.TAG, "error enabling web proxying", e);
|
Log.d(Constants.TAG, "error enabling web proxying", e);
|
||||||
}
|
}
|
||||||
@ -719,7 +719,7 @@ public class BrowserActivity extends ActionBarActivity implements BrowserControl
|
|||||||
mPreferences = getSharedPreferences(PreferenceConstants.PREFERENCES, 0);
|
mPreferences = getSharedPreferences(PreferenceConstants.PREFERENCES, 0);
|
||||||
}
|
}
|
||||||
mFullScreen = mPreferences.getBoolean(PreferenceConstants.FULL_SCREEN, false);
|
mFullScreen = mPreferences.getBoolean(PreferenceConstants.FULL_SCREEN, false);
|
||||||
if(mFullScreen){
|
if (mFullScreen) {
|
||||||
if (mBrowserFrame.findViewById(R.id.toolbar_layout) == null) {
|
if (mBrowserFrame.findViewById(R.id.toolbar_layout) == null) {
|
||||||
mUiLayout.removeView(mToolbarLayout);
|
mUiLayout.removeView(mToolbarLayout);
|
||||||
mBrowserFrame.addView(mToolbarLayout);
|
mBrowserFrame.addView(mToolbarLayout);
|
||||||
@ -2361,7 +2361,7 @@ public class BrowserActivity extends ActionBarActivity implements BrowserControl
|
|||||||
if (mToolbarLayout.getVisibility() != View.GONE) {
|
if (mToolbarLayout.getVisibility() != View.GONE) {
|
||||||
|
|
||||||
Animation hide = AnimationUtils.loadAnimation(mContext, R.anim.slide_up);
|
Animation hide = AnimationUtils.loadAnimation(mContext, R.anim.slide_up);
|
||||||
hide.setAnimationListener(new AnimationListener(){
|
hide.setAnimationListener(new AnimationListener() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onAnimationStart(Animation animation) {
|
public void onAnimationStart(Animation animation) {
|
||||||
@ -2384,7 +2384,7 @@ public class BrowserActivity extends ActionBarActivity implements BrowserControl
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void toggleActionBar(){
|
public void toggleActionBar() {
|
||||||
if (mFullScreen) {
|
if (mFullScreen) {
|
||||||
if (mToolbarLayout.getVisibility() != View.VISIBLE) {
|
if (mToolbarLayout.getVisibility() != View.VISIBLE) {
|
||||||
showActionBar();
|
showActionBar();
|
||||||
@ -2412,7 +2412,7 @@ public class BrowserActivity extends ActionBarActivity implements BrowserControl
|
|||||||
}
|
}
|
||||||
if (mToolbarLayout.getVisibility() != View.VISIBLE) {
|
if (mToolbarLayout.getVisibility() != View.VISIBLE) {
|
||||||
Animation show = AnimationUtils.loadAnimation(mContext, R.anim.slide_down);
|
Animation show = AnimationUtils.loadAnimation(mContext, R.anim.slide_down);
|
||||||
show.setAnimationListener(new AnimationListener(){
|
show.setAnimationListener(new AnimationListener() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onAnimationStart(Animation animation) {
|
public void onAnimationStart(Animation animation) {
|
||||||
|
Loading…
Reference in New Issue
Block a user