loggerimpl.java

来自「goolge phone 目前没有开放的android 平台的源码」· Java 代码 · 共 101 行

JAVA
101
字号
// Decompiled by Jad v1.5.8e2. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://kpdus.tripod.com/jad.html
// Decompiler options: packimports(3) 
// Source File Name:   LoggerImpl.java

package android.speech.recognition.impl;

import android.speech.recognition.Logger;

// Referenced classes of package android.speech.recognition.impl:
//            System

public class LoggerImpl extends Logger
    implements Runnable
{

    private LoggerImpl()
    {
        System.getInstance().register(this);
        nativeObject = initNativeObject();
    }

    public void run()
    {
        dispose();
    }

    public static LoggerImpl getInstance()
    {
        if(instance == null)
            instance = new LoggerImpl();
        return instance;
    }

    public void setLoggingLevel(android.speech.recognition.Logger.LogLevel level)
    {
        setLoggingLevelProxy(level);
    }

    public void setPath(String path)
    {
        setPathProxy(path);
    }

    public void logError(String message)
    {
        logErrorProxy(message);
    }

    public void logWarn(String message)
    {
        logWarnProxy(message);
    }

    public void logInfo(String message)
    {
        logInfoProxy(message);
    }

    public void logTrace(String message)
    {
        logTraceProxy(message);
    }

    private void dispose()
    {
        if(nativeObject != 0L)
        {
            deleteNativeObject();
            nativeObject = 0L;
            instance = null;
        }
    }

    protected void finalize()
        throws Throwable
    {
        dispose();
        super.finalize();
    }

    private native long initNativeObject();

    private native void setLoggingLevelProxy(android.speech.recognition.Logger.LogLevel loglevel);

    private native void setPathProxy(String s);

    private native void logErrorProxy(String s);

    private native void logWarnProxy(String s);

    private native void logInfoProxy(String s);

    private native void logTraceProxy(String s);

    private native void deleteNativeObject();

    private static LoggerImpl instance;
    private long nativeObject;
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?