// Path: player-android/src/com/dxyh/fqrtmpplayer/MyApplication.java
// public class MyApplication extends Application implements LibFQRtmp.OnNativeCrashListener {
// 	private final static String TAG = "MyApplication";
//     private static MyApplication instance;
//     
//     private ThreadPoolExecutor mThreadPool = new ThreadPoolExecutor(0, 3, 2, TimeUnit.SECONDS,
//             new LinkedBlockingQueue<Runnable>());
//     
//     @Override
//     public void onCreate() {
//         super.onCreate();
//         
//         instance = this;
//         
//         LibFQRtmp.setOnNativeCrashListener(this);
//     }
//     
// 	@Override
// 	public void onNativeCrash() {
// 		Log.e(TAG, "FQRtmpPlayer crashed");
// 	}
//     
//     @Override
//     public void onLowMemory() {
//         super.onLowMemory();
//         Log.w(TAG, "System is running low on memory");
//     }
//     
//     public static MyApplication getInstance() {
//     	return instance;
//     }
//     
//     public static Context getAppContext() {
//         return instance;
//     }
//     
//     public static Resources getAppResources() {
//         return instance.getResources();
//     }
//     
//     public static void runBackground(Runnable runnable) {
//         instance.mThreadPool.execute(runnable);
//     }
// }


import com.dxyh.fqrtmpplayer.MyApplication;
import com.dxyh.fqrtmpplayer.R;
import android.app.Activity;
import android.app.AlertDialog;
import android.app.Dialog;
import android.content.DialogInterface;
import android.provider.Settings;
import android.text.TextUtils;
import android.view.Window;
import android.view.WindowManager;
import android.widget.EditText;
import android.widget.Toast;

package com.dxyh.fqrtmpplayer.gui;



public class UiTools {
    @SuppressWarnings("unused")
    private static final String TAG = "UiTools";
    
    public interface OnInputDialogClickListener {
        public void onClick(DialogInterface dialog, final String input);
    }
    public static void inputDialog(Activity activity, final String title,
            final String hint,
            final OnInputDialogClickListener positive_listener,
            final OnInputDialogClickListener negative_listener) {

// Path: player-android/src/com/dxyh/fqrtmpplayer/MyApplication.java
// public class MyApplication extends Application implements LibFQRtmp.OnNativeCrashListener {
// 	private final static String TAG = "MyApplication";
//     private static MyApplication instance;
//     
//     private ThreadPoolExecutor mThreadPool = new ThreadPoolExecutor(0, 3, 2, TimeUnit.SECONDS,
//             new LinkedBlockingQueue<Runnable>());
//     
//     @Override
//     public void onCreate() {
//         super.onCreate();
//         
//         instance = this;
//         
//         LibFQRtmp.setOnNativeCrashListener(this);
//     }
//     
// 	@Override
// 	public void onNativeCrash() {
// 		Log.e(TAG, "FQRtmpPlayer crashed");
// 	}
//     
//     @Override
//     public void onLowMemory() {
//         super.onLowMemory();
//         Log.w(TAG, "System is running low on memory");
//     }
//     
//     public static MyApplication getInstance() {
//     	return instance;
//     }
//     
//     public static Context getAppContext() {
//         return instance;
//     }
//     
//     public static Resources getAppResources() {
//         return instance.getResources();
//     }
//     
//     public static void runBackground(Runnable runnable) {
//         instance.mThreadPool.execute(runnable);
//     }
// }


// Path: player-android/src/com/dxyh/fqrtmpplayer/gui/UiTools.java
import com.dxyh.fqrtmpplayer.MyApplication;
import com.dxyh.fqrtmpplayer.R;
import android.app.Activity;
import android.app.AlertDialog;
import android.app.Dialog;
import android.content.DialogInterface;
import android.provider.Settings;
import android.text.TextUtils;
import android.view.Window;
import android.view.WindowManager;
import android.widget.EditText;
import android.widget.Toast;

package com.dxyh.fqrtmpplayer.gui;



public class UiTools {
    @SuppressWarnings("unused")
    private static final String TAG = "UiTools";
    
    public interface OnInputDialogClickListener {
        public void onClick(DialogInterface dialog, final String input);
    }
    public static void inputDialog(Activity activity, final String title,
            final String hint,
            final OnInputDialogClickListener positive_listener,
            final OnInputDialogClickListener negative_listener) {

        final EditText edit = new EditText(MyApplication.getAppContext());
