package com.kfzs.duanduan.datashare;

import android.content.Context;
import android.content.SharedPreferences;

/**
 * <pre>
 *     sinlov
 *
 *     /\__/\
 *    /`    '\
 *  ≈≈≈ 0  0 ≈≈≈ Hello world!
 *    \  --  /
 *   /        \
 *  /          \
 * |            |
 *  \  ||  ||  /
 *   \_oo__oo_/≡≡≡≡≡≡≡≡o
 *
 * </pre>
 * Created by sinlov on 17/2/21.
 */
public class XMLShareSession {

    private static final String XML_NAME = "kfzs_share_xml_session";
    private static final String HEAD_SESSION_HASH = "XML.Share.KFZS.Session.Hash";

    public static void saveHeadHash(Context ctx, int hash) {
        SharedPreferences sharedPreferences = ctx.getSharedPreferences(XML_NAME, Context.MODE_WORLD_READABLE);
        SharedPreferences.Editor edit = sharedPreferences.edit();
        edit.putInt(HEAD_SESSION_HASH, hash);
        edit.apply();
    }

    private XMLShareSession() {
    }
}
