Removed superfluous method

This commit is contained in:
Anthony Restaino 2014-08-20 18:31:16 -04:00
parent 4c75b9ffb5
commit 2044d89c05

View File

@ -167,7 +167,7 @@ public class BrowserActivity extends Activity implements BrowserController {
new int[] { android.R.attr.actionBarSize });
mActionBarSize = (int) styledAttributes.getDimension(0, 0);
if (pixelsToDp(mActionBarSize) < 48) {
mActionBarSize = getDp(48);
mActionBarSize = Utils.convertToDensityPixels(mContext, 48);
}
mActionBarSizeDp = pixelsToDp(mActionBarSize);
styledAttributes.recycle();
@ -1378,16 +1378,6 @@ public class BrowserActivity extends Activity implements BrowserController {
openBookmarks();
}
/**
* converts the int num into density pixels
*
* @return density pixels
*/
private int getDp(int num) {
float scale = getResources().getDisplayMetrics().density;
return (int) (num * scale + 0.5f);
}
private int pixelsToDp(int num) {
float scale = getResources().getDisplayMetrics().density;
return (int) ((num - 0.5f) / scale);