/*
 * Copyright (C) 2014 Antew
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.antew.redditinpictures.util;

import android.content.Context;
import android.content.res.TypedArray;
import com.antew.redditinpictures.library.Constants;

public class ConstsFree extends Constants {
    public static final String ADMOB_ID            = "a14fd4522953241";
    public static final String DIALOG_UPGRADE      = "Upgrade";
    public static final String MARKET_INTENT       = "market://details?id=";
    public static final String REMOVE_ADS          = "removeAds";
    public static final String PRO_VERSION_PACKAGE = "com.antew.redditinpictures.pro";
    private static Integer mActionBarSize;

    public static int getActionBarSize(Context context) {
        if (mActionBarSize == null) {
            final TypedArray styledAttributes = context.getTheme().obtainStyledAttributes(
                    new int[] { android.R.attr.actionBarSize });
            mActionBarSize = (int) styledAttributes.getDimension(0, 0);
            styledAttributes.recycle();
        }
        return mActionBarSize;
    }
}

@@ -752,16 +752,57 @@
 nstants;
+%0Aimport com.antew.redditinpictures.pro.R;
 %0A%0Apublic
@@ -1361,261 +1361,108 @@
     
-final TypedArray styledAttributes = context.getTheme().obtainStyledAttributes(%0A                    new int%5B%5D %7B android.R.attr.actionBarSize %7D);%0A            mActionBarSize = (int) styledAttributes.getDimension(0, 0);%0A            styledAttributes.recycle(
+mActionBarSize = context.getResources().getDimensionPixelSize(R.dimen.abs__action_bar_default_height
 );%0A 

Fix retrieving the ActionBar height on a 2.2 emulator, ads no longer overlap the ActionBar. Closes #164