JLChen
2021-11-16 a4246a571c78ac6c46e7bf7dbfc123b7148caed8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
package com.hdl.sdk.common;
 
import android.content.Context;
 
import com.hdl.sdk.common.utils.LogUtils;
 
/**
 * Created by Tong on 2021/9/28.
 */
public class HDLSdk {
 
    private Context context;
 
    private HDLSdk() {
    }
 
    private static class SingletonInstance {
        private static final HDLSdk INSTANCE = new HDLSdk();
    }
 
    public static HDLSdk getInstance() {
        return SingletonInstance.INSTANCE;
    }
 
    public void init(Context context) {
        this.context = context.getApplicationContext();
    }
 
    public Context getContext() {
        return context;
    }
 
    /**
     * 设置打印是否开启
     * @param enable
     */
    public void setLogEnabled(boolean enable){
        LogUtils.setEnabled(enable);
    }
}