package com.mogo.cloud.passport;


import com.elegant.utils.storage.SharedPrefsMgr;

/**
 * @author donghongyu
 * @since 2021-01-28
 * <p>
 * sp 公共缓存区域
 */
public class SpStorage {

    public static String getToken() {
        return SharedPrefsMgr.getInstance(MoGoAiCloudClient.getInstance().getContext()).getString("token");
    }

    public static void setToken(String token) {
        SharedPrefsMgr.getInstance(MoGoAiCloudClient.getInstance().getContext()).putString("token", token);
    }

    public static String getSn() {
        return SharedPrefsMgr.getInstance(MoGoAiCloudClient.getInstance().getContext()).getString("sn");
    }

    public static void setSn(String sn) {
        SharedPrefsMgr.getInstance(MoGoAiCloudClient.getInstance().getContext()).putString("sn", sn);
    }

}
