// Path: app/src/main/java/project/android/ConnectionFragment.java
// public static HashMap<String, Boolean> sConnectionAlive = new HashMap<>();
// 
// Path: app/src/main/java/project/android/ConnectionFragment.java
// public static Client sSecuredClient;


import android.content.pm.ActivityInfo;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.ImageButton;
import static project.android.ConnectionFragment.sConnectionAlive;
import static project.android.ConnectionFragment.sSecuredClient;
    /**
     * Overrides the <code>Fragment.onPause()</code>
     * method of the Android API.
     *
     * Called when the system is about to start resuming a previous activity.
     */
    @Override
    public void onPause() {
        super.onPause();
        getActivity().setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_FULL_SENSOR);
    }

    /**
     * Overrides the
     * <code>View.onTouchListener.onTouch(View, MotionEvent)</code>
     * method of the Android API.
     *
     * Called when a touch event is dispatched to a <code>View</code>.
     * This allows listeners to get a chance to respond before the
     * target <code>View</code>.
     *
     * @param view the view the touch event has been dispatched to.
     * @param motionEvent the <code>MotionEvent</code> object containing
     *                    full information about the event.
     * @return <code>true</code>, if the listener has consumed the event,<br/>
     *         <code>false</code>, otherwise.
     */
    @Override
    public boolean onTouch(View view, MotionEvent motionEvent) {
        if (view.getId() == R.id.button_touch) {
// Path: app/src/main/java/project/android/ConnectionFragment.java
// public static HashMap<String, Boolean> sConnectionAlive = new HashMap<>();
// 
// Path: app/src/main/java/project/android/ConnectionFragment.java
// public static Client sSecuredClient;


// Path: app/src/main/java/project/android/TouchpadFragment.java
import android.content.pm.ActivityInfo;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.ImageButton;
import static project.android.ConnectionFragment.sConnectionAlive;
import static project.android.ConnectionFragment.sSecuredClient;

    /**
     * Overrides the <code>Fragment.onPause()</code>
     * method of the Android API.
     *
     * Called when the system is about to start resuming a previous activity.
     */
    @Override
    public void onPause() {
        super.onPause();
        getActivity().setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_FULL_SENSOR);
    }

    /**
     * Overrides the
     * <code>View.onTouchListener.onTouch(View, MotionEvent)</code>
     * method of the Android API.
     *
     * Called when a touch event is dispatched to a <code>View</code>.
     * This allows listeners to get a chance to respond before the
     * target <code>View</code>.
     *
     * @param view the view the touch event has been dispatched to.
     * @param motionEvent the <code>MotionEvent</code> object containing
     *                    full information about the event.
     * @return <code>true</code>, if the listener has consumed the event,<br/>
     *         <code>false</code>, otherwise.
     */
    @Override
    public boolean onTouch(View view, MotionEvent motionEvent) {
        if (view.getId() == R.id.button_touch) {
            if (sConnectionAlive.containsValue(true))   processTouch(motionEvent);