// Path: src/com/xiaomi/mitv/soundbarapp/provider/DataProvider.java
// public class DataProvider {
//     private GalaxyProvider mProvider = new GalaxyProvider();
//     public List<FirmwareVersion> listVersion(){
//         return mProvider.listVersion();
//     }
// 
//     public FirmwareVersion queryNewVersion(int localVersion){
//         return mProvider.queryNewVersion(localVersion);
//     }
// 
//     public FaqData queryFaqList(){
//         return mProvider.queryFaqList();
//     }
// 
// 
//     //check if the app run in dev mode via the config file on SDCARD
//     private boolean isInDevMode(){
//         return mProvider.isInDevMode();
//     }
// }


import android.content.Context;
import com.xiaomi.mitv.content.FaqData;
import com.xiaomi.mitv.soundbarapp.provider.DataProvider;
import com.xiaomi.mitv.utils.IOUtil;
import java.io.*;
package com.xiaomi.mitv.soundbarapp.faq;



/**
 * Created by chenxuetong on 7/3/14.
 *
 * [
 *     {
 *         id:12111,
 *         title:q1.
 *         content:abcd
 *     },
 *     {
 *         id:22111,
 *         title:q2.
 *         content:abcd
 *     }
 * ]
 *
 */
public class FaqDataStore {
    private static final String ASSETS_DEFAULT_DATA_FILE = "faq/faq_list";
    private static final String QA_DATA_FILE_NAME = "faq_list";

    private final Context mContext;

    public FaqDataStore(Context context) {
        mContext = context;
    }


    public FaqData load() {
        InputStream input = null;
        try {
            input = getDataInputStream();
            return FaqData.loadString(new String(IOUtil.readInputAsBytes(input), "utf-8"));
        }catch (IOException e){
            return null;
        } finally {
            if(input!=null)try {input.close();}catch (IOException e){}
        }
    }

    public FaqData loadRemote() {
// Path: src/com/xiaomi/mitv/soundbarapp/provider/DataProvider.java
// public class DataProvider {
//     private GalaxyProvider mProvider = new GalaxyProvider();
//     public List<FirmwareVersion> listVersion(){
//         return mProvider.listVersion();
//     }
// 
//     public FirmwareVersion queryNewVersion(int localVersion){
//         return mProvider.queryNewVersion(localVersion);
//     }
// 
//     public FaqData queryFaqList(){
//         return mProvider.queryFaqList();
//     }
// 
// 
//     //check if the app run in dev mode via the config file on SDCARD
//     private boolean isInDevMode(){
//         return mProvider.isInDevMode();
//     }
// }


// Path: src/com/xiaomi/mitv/soundbarapp/faq/FaqDataStore.java
import android.content.Context;
import com.xiaomi.mitv.content.FaqData;
import com.xiaomi.mitv.soundbarapp.provider.DataProvider;
import com.xiaomi.mitv.utils.IOUtil;
import java.io.*;

package com.xiaomi.mitv.soundbarapp.faq;



/**
 * Created by chenxuetong on 7/3/14.
 *
 * [
 *     {
 *         id:12111,
 *         title:q1.
 *         content:abcd
 *     },
 *     {
 *         id:22111,
 *         title:q2.
 *         content:abcd
 *     }
 * ]
 *
 */
public class FaqDataStore {
    private static final String ASSETS_DEFAULT_DATA_FILE = "faq/faq_list";
    private static final String QA_DATA_FILE_NAME = "faq_list";

    private final Context mContext;

    public FaqDataStore(Context context) {
        mContext = context;
    }


    public FaqData load() {
        InputStream input = null;
        try {
            input = getDataInputStream();
            return FaqData.loadString(new String(IOUtil.readInputAsBytes(input), "utf-8"));
        }catch (IOException e){
            return null;
        } finally {
            if(input!=null)try {input.close();}catch (IOException e){}
        }
    }

    public FaqData loadRemote() {
        DataProvider provider = new DataProvider();