package com.philliphsu.bottomsheetpickers.view;

import android.content.Context;
import android.os.Build;
import android.view.View;

/**
 * Model that encapsulates the formatting conventions of the user's locale.
 */
public final class LocaleModel {
    // TODO: The current utility APIs use this Context only to retrieve
    // the user's locale. Consider holding a reference to the Locale
    // instead of the Context, and passing the former to the utility class.
    private final Context mAppContext;

    public LocaleModel(Context context) {
        mAppContext = context.getApplicationContext();
    }

    public String getTimeSeparator(boolean is24Hour) {
        return DateTimeFormatUtils.getTimeSeparator(mAppContext, is24Hour);
    }

    public boolean isAmPmWrittenBeforeTime() {
        return DateTimeFormatUtils.isAmPmWrittenBeforeTime(mAppContext);
    }

    public boolean isLayoutRtl() {
        if (Build.VERSION.SDK_INT >= 17) {
            return mAppContext.getResources().getConfiguration()
                    .getLayoutDirection() == View.LAYOUT_DIRECTION_RTL;
        } else {
            // There is only LTR before SDK 17.
            return false;
        }
    }
}
@@ -217,22 +217,16 @@
 %0Apublic 
-final 
 class Lo

Remove final modifier from LocaleModel because Mockito cannot mock final classes. (cherry picked from commit a3f19d4)