org.tizen.injector.device_1.0.0.201310291329

16:50:04.208 INFO  jd.cli.Main - Decompiling org.tizen.injector.device_1.0.0.201310291329.jar
package org.tizen.injector.device.battery;

import org.tizen.injector.device.battery.page.BatteryPage;
import org.tizen.injector.provider.AbstractInjectorItem;

public class Battery
  extends AbstractInjectorItem
{
  protected void addPages()
  {
    addPage(new BatteryPage(this, "Battery"));
  }
}

/* Location:
 * Qualified Name:     org.tizen.injector.device.battery.Battery
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.injector.device.battery.page;

public class BatteryConstants
{
  public static final String Connect = "Connect";
  public static final String Disconnect = "Disconnect";
}

/* Location:
 * Qualified Name:     org.tizen.injector.device.battery.page.BatteryConstants
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.injector.device.battery.page;

import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.events.SelectionListener;
import org.eclipse.swt.widgets.Slider;
import org.eclipse.swt.widgets.Text;

class BatteryPage$1
  implements SelectionListener
{
  BatteryPage$1(BatteryPage paramBatteryPage) {}
  
  public void widgetDefaultSelected(SelectionEvent paramSelectionEvent) {}
  
  public void widgetSelected(SelectionEvent paramSelectionEvent)
  {
    BatteryPage.access$1(this$0, BatteryPage.access$0(this$0).getSelection());
    BatteryPage.access$2(this$0).setText(Integer.toString(BatteryPage.access$3(this$0)));
  }
}

/* Location:
 * Qualified Name:     org.tizen.injector.device.battery.page.BatteryPage.1
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.injector.device.battery.page;

import org.eclipse.swt.events.MouseEvent;
import org.eclipse.swt.events.MouseListener;

class BatteryPage$2
  implements MouseListener
{
  BatteryPage$2(BatteryPage paramBatteryPage) {}
  
  public void mouseDoubleClick(MouseEvent paramMouseEvent) {}
  
  public void mouseDown(MouseEvent paramMouseEvent) {}
  
  public void mouseUp(MouseEvent paramMouseEvent)
  {
    this$0.sendMessage(1, BatteryPage.access$3(this$0));
  }
}

/* Location:
 * Qualified Name:     org.tizen.injector.device.battery.page.BatteryPage.2
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.injector.device.battery.page;

import org.eclipse.swt.events.KeyEvent;
import org.eclipse.swt.events.KeyListener;

class BatteryPage$3
  implements KeyListener
{
  BatteryPage$3(BatteryPage paramBatteryPage) {}
  
  public void keyPressed(KeyEvent paramKeyEvent) {}
  
  public void keyReleased(KeyEvent paramKeyEvent)
  {
    if ((keyCode == 13) || (keyCode == 16777296)) {
      this$0.sendMessage(1, BatteryPage.access$3(this$0));
    }
  }
}

/* Location:
 * Qualified Name:     org.tizen.injector.device.battery.page.BatteryPage.3
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.injector.device.battery.page;

import org.eclipse.swt.events.MouseEvent;
import org.eclipse.swt.events.MouseListener;
import org.eclipse.swt.widgets.Button;

class BatteryPage$4
  implements MouseListener
{
  BatteryPage$4(BatteryPage paramBatteryPage) {}
  
  public void mouseDoubleClick(MouseEvent paramMouseEvent) {}
  
  public void mouseDown(MouseEvent paramMouseEvent)
  {
    for (int i = 0; i < BatteryPage.access$4(this$0).length; i++) {
      if (BatteryPage.access$4(this$0)[i].getSelection()) {
        if (i == 0) {
          BatteryPage.access$4(this$0)[0].setFocus();
        } else {
          BatteryPage.access$4(this$0)[1].setFocus();
        }
      }
    }
  }
  
  public void mouseUp(MouseEvent paramMouseEvent) {}
}

/* Location:
 * Qualified Name:     org.tizen.injector.device.battery.page.BatteryPage.4
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.injector.device.battery.page;

import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.widgets.Button;

class BatteryPage$5
  extends SelectionAdapter
{
  BatteryPage$5(BatteryPage paramBatteryPage) {}
  
  public void widgetSelected(SelectionEvent paramSelectionEvent)
  {
    for (int i = 0; i < BatteryPage.access$4(this$0).length; i++) {
      if (BatteryPage.access$4(this$0)[i].getSelection()) {
        if (i == 0)
        {
          if (BatteryPage.access$5(this$0) == 1) {
            return;
          }
          BatteryPage.access$6(this$0, 1);
        }
        else
        {
          BatteryPage.access$6(this$0, 0);
        }
      }
    }
    super.widgetSelected(paramSelectionEvent);
    this$0.sendMessage(2, BatteryPage.access$7(this$0));
  }
}

/* Location:
 * Qualified Name:     org.tizen.injector.device.battery.page.BatteryPage.5
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.injector.device.battery.page;

import java.io.IOException;
import org.eclipse.swt.events.KeyEvent;
import org.eclipse.swt.events.KeyListener;
import org.eclipse.swt.events.MouseEvent;
import org.eclipse.swt.events.MouseListener;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.events.SelectionListener;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Slider;
import org.eclipse.swt.widgets.Text;
import org.tizen.common.connection.ConnectionPlugin;
import org.tizen.common.connection.ConnectionPlugin.ISelectionListener;
import org.tizen.injector.protocol.sensor.TestSensorMessage;
import org.tizen.injector.provider.AbstractInjectorItem;
import org.tizen.injector.provider.AbstractInjectorPage;
import org.tizen.injector.socket.TelephonySocket;
import org.tizen.injector.util.FormPageUtil;
import org.tizen.injector.view.InjectorView;
import org.tizen.sdblib.IDevice;
import org.tizen.sdblib.service.FileEntry;

public class BatteryPage
  extends AbstractInjectorPage
  implements ConnectionPlugin.ISelectionListener
{
  private Text sliderText;
  private Slider slider;
  private final String levelNumber = "8\n";
  private final String batteryLevel = "Level    : ";
  private final String batteryCharger = "Charger : ";
  private int sendData = 50;
  private int preSendData = -1;
  private Button[] radioButton;
  private int sensorOn = 0;
  private int preSensorOn = -1;
  private IDevice currentDevice;
  
  public BatteryPage(AbstractInjectorItem paramAbstractInjectorItem, String paramString)
  {
    super(paramAbstractInjectorItem, paramString);
  }
  
  protected void createContents()
  {
    currentDevice = ConnectionPlugin.getDefault().getCurrentDevice();
    InjectorView.getDefault().addSelectionListener(this);
    sensorOn = 0;
    Composite localComposite1 = formUtil.createComposite(parent, 4);
    formUtil.createLabel(localComposite1, "Level    : ");
    slider = formUtil.createSlider(localComposite1, 256);
    slider.setValues(50, 1, 101, 1, 1, 1);
    slider.setLayoutData(new GridData(4, 2, true, false));
    sliderText = new Text(localComposite1, 2);
    sliderText.setText(String.format("%d", new Object[] { Integer.valueOf(slider.getSelection()) }));
    sliderText.setEnabled(false);
    GridData localGridData = new GridData(2, 2, false, false);
    widthHint = 30;
    sliderText.setLayoutData(localGridData);
    sendData = slider.getSelection();
    slider.addSelectionListener(new SelectionListener()
    {
      public void widgetDefaultSelected(SelectionEvent paramAnonymousSelectionEvent) {}
      
      public void widgetSelected(SelectionEvent paramAnonymousSelectionEvent)
      {
        sendData = slider.getSelection();
        sliderText.setText(Integer.toString(sendData));
      }
    });
    Button localButton = formUtil.createButton(localComposite1, "Send", 8);
    localGridData = new GridData(0, 4, false, true);
    widthHint = 50;
    localButton.setLayoutData(localGridData);
    localButton.addMouseListener(new MouseListener()
    {
      public void mouseDoubleClick(MouseEvent paramAnonymousMouseEvent) {}
      
      public void mouseDown(MouseEvent paramAnonymousMouseEvent) {}
      
      public void mouseUp(MouseEvent paramAnonymousMouseEvent)
      {
        sendMessage(1, sendData);
      }
    });
    localButton.addKeyListener(new KeyListener()
    {
      public void keyPressed(KeyEvent paramAnonymousKeyEvent) {}
      
      public void keyReleased(KeyEvent paramAnonymousKeyEvent)
      {
        if ((keyCode == 13) || (keyCode == 16777296)) {
          sendMessage(1, sendData);
        }
      }
    });
    Composite localComposite2 = formUtil.createComposite(parent, 5);
    localComposite2.addMouseListener(new MouseListener()
    {
      public void mouseDoubleClick(MouseEvent paramAnonymousMouseEvent) {}
      
      public void mouseDown(MouseEvent paramAnonymousMouseEvent)
      {
        for (int i = 0; i < radioButton.length; i++) {
          if (radioButton[i].getSelection()) {
            if (i == 0) {
              radioButton[0].setFocus();
            } else {
              radioButton[1].setFocus();
            }
          }
        }
      }
      
      public void mouseUp(MouseEvent paramAnonymousMouseEvent) {}
    });
    formUtil.createLabel(localComposite2, "Charger : ");
    radioButton = new Button[2];
    radioButton[0] = formUtil.createButton(localComposite2, "Connect", 16);
    radioButton[1] = formUtil.createButton(localComposite2, "Disconnect", 16);
    radioButton[1].setSelection(true);
    for (int i = 0; i < radioButton.length; i++) {
      if (radioButton[i].getSelection()) {
        if (i == 0) {
          sensorOn = 1;
        } else {
          sensorOn = 0;
        }
      }
    }
    radioButton[0].addSelectionListener(new SelectionAdapter()
    {
      public void widgetSelected(SelectionEvent paramAnonymousSelectionEvent)
      {
        for (int i = 0; i < radioButton.length; i++) {
          if (radioButton[i].getSelection()) {
            if (i == 0)
            {
              if (preSensorOn == 1) {
                return;
              }
              sensorOn = 1;
            }
            else
            {
              sensorOn = 0;
            }
          }
        }
        super.widgetSelected(paramAnonymousSelectionEvent);
        sendMessage(2, sensorOn);
      }
    });
    boolean bool = checkDeviceConnectedAlready();
    if (bool) {
      connect();
    }
  }
  
  private boolean checkDeviceConnectedAlready()
  {
    return currentDevice != null;
  }
  
  protected void registerReceivers() {}
  
  public void sendMessage(int paramInt1, int paramInt2)
  {
    if ((paramInt1 == 1) && (preSendData == paramInt2)) {
      return;
    }
    TestSensorMessage localTestSensorMessage = new TestSensorMessage(paramInt1, paramInt2);
    try
    {
      injectorSocket.sendSensor("8\n" + localTestSensorMessage.getMessage());
    }
    catch (IOException localIOException)
    {
      localIOException.printStackTrace();
    }
    catch (Exception localException)
    {
      localException.printStackTrace();
    }
    if (paramInt1 == 1) {
      preSendData = paramInt2;
    } else if (paramInt1 == 2) {
      preSensorOn = paramInt2;
    }
  }
  
  public void connect()
  {
    currentDevice = ConnectionPlugin.getDefault().getCurrentDevice();
    slider.setSelection(50);
    sendData = slider.getSelection();
    sliderText.setText(Integer.toString(sendData));
    radioButton[0].setSelection(false);
    radioButton[1].setSelection(true);
    sensorOn = 0;
    sendMessage(1, sendData);
    sendMessage(2, sensorOn);
  }
  
  public void disconnect() {}
  
  protected void finalize()
    throws Throwable
  {
    InjectorView.getDefault().removeSelectionListener(this);
    super.finalize();
  }
  
  public void selectionChanged(FileEntry paramFileEntry)
  {
    if (paramFileEntry == null)
    {
      disconnect();
    }
    else
    {
      String str = paramFileEntry.getDevice().getSerialNumber();
      if (currentDevice == null)
      {
        if (str != null) {
          connect();
        }
      }
      else if (currentDevice.getSerialNumber() != str)
      {
        disconnect();
        connect();
      }
    }
  }
}

/* Location:
 * Qualified Name:     org.tizen.injector.device.battery.page.BatteryPage
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.injector.device.earjack;

import org.tizen.injector.device.earjack.page.EarjackPage;
import org.tizen.injector.provider.AbstractInjectorItem;

public class Earjack
  extends AbstractInjectorItem
{
  protected void addPages()
  {
    addPage(new EarjackPage(this, "Earjack"));
  }
}

/* Location:
 * Qualified Name:     org.tizen.injector.device.earjack.Earjack
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.injector.device.earjack.page;

public class EarjackConstants
{
  public static final String wire3 = "3 Wire";
  public static final String wire4 = "4 Wire";
  public static final String disconnect = "Disconnect";
  public static final int WIRE_3 = 1;
  public static final int WIRE_4 = 3;
  public static final int DISCONNECT = 0;
}

/* Location:
 * Qualified Name:     org.tizen.injector.device.earjack.page.EarjackConstants
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.injector.device.earjack.page;

import org.eclipse.swt.events.MouseEvent;
import org.eclipse.swt.events.MouseListener;
import org.eclipse.swt.widgets.Button;

class EarjackPage$1
  implements MouseListener
{
  EarjackPage$1(EarjackPage paramEarjackPage) {}
  
  public void mouseDoubleClick(MouseEvent paramMouseEvent) {}
  
  public void mouseDown(MouseEvent paramMouseEvent)
  {
    for (int i = 0; i < EarjackPage.access$0(this$0).length; i++) {
      if (EarjackPage.access$0(this$0)[i].getSelection()) {
        if (i == 0) {
          EarjackPage.access$0(this$0)[0].setFocus();
        } else if (i == 1) {
          EarjackPage.access$0(this$0)[1].setFocus();
        } else {
          EarjackPage.access$0(this$0)[2].setFocus();
        }
      }
    }
  }
  
  public void mouseUp(MouseEvent paramMouseEvent) {}
}

/* Location:
 * Qualified Name:     org.tizen.injector.device.earjack.page.EarjackPage.1
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.injector.device.earjack.page;

import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.widgets.Button;

class EarjackPage$2
  extends SelectionAdapter
{
  EarjackPage$2(EarjackPage paramEarjackPage) {}
  
  public void widgetSelected(SelectionEvent paramSelectionEvent)
  {
    for (int i = 0; i < EarjackPage.access$0(this$0).length; i++)
    {
      if (EarjackPage.access$0(this$0)[i].getSelection()) {
        if (i == 0) {
          EarjackPage.access$1(this$0, 1);
        } else if (i == 1) {
          EarjackPage.access$1(this$0, 3);
        } else {
          EarjackPage.access$1(this$0, 0);
        }
      }
      super.widgetSelected(paramSelectionEvent);
      this$0.sendMessage(EarjackPage.access$2(this$0));
    }
  }
}

/* Location:
 * Qualified Name:     org.tizen.injector.device.earjack.page.EarjackPage.2
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.injector.device.earjack.page;

import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.widgets.Button;

class EarjackPage$3
  extends SelectionAdapter
{
  EarjackPage$3(EarjackPage paramEarjackPage) {}
  
  public void widgetSelected(SelectionEvent paramSelectionEvent)
  {
    for (int i = 0; i < EarjackPage.access$0(this$0).length; i++)
    {
      if (EarjackPage.access$0(this$0)[i].getSelection()) {
        if (i == 0) {
          EarjackPage.access$1(this$0, 1);
        } else if (i == 1) {
          EarjackPage.access$1(this$0, 3);
        } else {
          EarjackPage.access$1(this$0, 0);
        }
      }
      super.widgetSelected(paramSelectionEvent);
      this$0.sendMessage(EarjackPage.access$2(this$0));
    }
  }
}

/* Location:
 * Qualified Name:     org.tizen.injector.device.earjack.page.EarjackPage.3
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.injector.device.earjack.page;

import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.widgets.Button;

class EarjackPage$4
  extends SelectionAdapter
{
  EarjackPage$4(EarjackPage paramEarjackPage) {}
  
  public void widgetSelected(SelectionEvent paramSelectionEvent)
  {
    for (int i = 0; i < EarjackPage.access$0(this$0).length; i++)
    {
      if (EarjackPage.access$0(this$0)[i].getSelection()) {
        if (i == 0) {
          EarjackPage.access$1(this$0, 1);
        } else if (i == 1) {
          EarjackPage.access$1(this$0, 3);
        } else {
          EarjackPage.access$1(this$0, 0);
        }
      }
      super.widgetSelected(paramSelectionEvent);
      this$0.sendMessage(EarjackPage.access$2(this$0));
    }
  }
}

/* Location:
 * Qualified Name:     org.tizen.injector.device.earjack.page.EarjackPage.4
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.injector.device.earjack.page;

import java.io.IOException;
import org.eclipse.swt.events.MouseEvent;
import org.eclipse.swt.events.MouseListener;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.tizen.common.connection.ConnectionPlugin;
import org.tizen.common.connection.ConnectionPlugin.ISelectionListener;
import org.tizen.injector.protocol.sensor.TestSensorMessage;
import org.tizen.injector.provider.AbstractInjectorItem;
import org.tizen.injector.provider.AbstractInjectorPage;
import org.tizen.injector.socket.TelephonySocket;
import org.tizen.injector.util.FormPageUtil;
import org.tizen.injector.view.InjectorView;
import org.tizen.sdblib.IDevice;
import org.tizen.sdblib.service.FileEntry;

public class EarjackPage
  extends AbstractInjectorPage
  implements ConnectionPlugin.ISelectionListener
{
  private Button[] radioButton;
  private final String sensorNumber = "9\n";
  private int earjack_status;
  private int tmp_status = -1;
  private IDevice currentDevice;
  
  public EarjackPage(AbstractInjectorItem paramAbstractInjectorItem, String paramString)
  {
    super(paramAbstractInjectorItem, paramString);
  }
  
  protected void createContents()
  {
    InjectorView.getDefault().addSelectionListener(this);
    currentDevice = ConnectionPlugin.getDefault().getCurrentDevice();
    Composite localComposite = formUtil.createComposite(parent, 6);
    localComposite.addMouseListener(new MouseListener()
    {
      public void mouseDoubleClick(MouseEvent paramAnonymousMouseEvent) {}
      
      public void mouseDown(MouseEvent paramAnonymousMouseEvent)
      {
        for (int i = 0; i < radioButton.length; i++) {
          if (radioButton[i].getSelection()) {
            if (i == 0) {
              radioButton[0].setFocus();
            } else if (i == 1) {
              radioButton[1].setFocus();
            } else {
              radioButton[2].setFocus();
            }
          }
        }
      }
      
      public void mouseUp(MouseEvent paramAnonymousMouseEvent) {}
    });
    radioButton = new Button[3];
    radioButton[0] = formUtil.createButton(localComposite, "3 Wire", 16);
    radioButton[1] = formUtil.createButton(localComposite, "4 Wire", 16);
    radioButton[2] = formUtil.createButton(localComposite, "Disconnect", 16);
    radioButton[2].setSelection(true);
    for (int i = 0; i < radioButton.length; i++) {
      if (radioButton[i].getSelection()) {
        if (i == 0) {
          earjack_status = 1;
        } else if (i == 1) {
          earjack_status = 3;
        } else {
          earjack_status = 0;
        }
      }
    }
    radioButton[0].addSelectionListener(new SelectionAdapter()
    {
      public void widgetSelected(SelectionEvent paramAnonymousSelectionEvent)
      {
        for (int i = 0; i < radioButton.length; i++)
        {
          if (radioButton[i].getSelection()) {
            if (i == 0) {
              earjack_status = 1;
            } else if (i == 1) {
              earjack_status = 3;
            } else {
              earjack_status = 0;
            }
          }
          super.widgetSelected(paramAnonymousSelectionEvent);
          sendMessage(earjack_status);
        }
      }
    });
    radioButton[1].addSelectionListener(new SelectionAdapter()
    {
      public void widgetSelected(SelectionEvent paramAnonymousSelectionEvent)
      {
        for (int i = 0; i < radioButton.length; i++)
        {
          if (radioButton[i].getSelection()) {
            if (i == 0) {
              earjack_status = 1;
            } else if (i == 1) {
              earjack_status = 3;
            } else {
              earjack_status = 0;
            }
          }
          super.widgetSelected(paramAnonymousSelectionEvent);
          sendMessage(earjack_status);
        }
      }
    });
    radioButton[2].addSelectionListener(new SelectionAdapter()
    {
      public void widgetSelected(SelectionEvent paramAnonymousSelectionEvent)
      {
        for (int i = 0; i < radioButton.length; i++)
        {
          if (radioButton[i].getSelection()) {
            if (i == 0) {
              earjack_status = 1;
            } else if (i == 1) {
              earjack_status = 3;
            } else {
              earjack_status = 0;
            }
          }
          super.widgetSelected(paramAnonymousSelectionEvent);
          sendMessage(earjack_status);
        }
      }
    });
    boolean bool = checkDeviceConnectedAlready();
    if (bool) {
      connect();
    }
  }
  
  private boolean checkDeviceConnectedAlready()
  {
    return currentDevice != null;
  }
  
  protected void registerReceivers() {}
  
  public void sendMessage(int paramInt)
  {
    TestSensorMessage localTestSensorMessage = new TestSensorMessage(paramInt);
    try
    {
      injectorSocket.sendSensor("9\n" + localTestSensorMessage.getMessage());
    }
    catch (IOException localIOException)
    {
      localIOException.printStackTrace();
    }
    catch (Exception localException)
    {
      localException.printStackTrace();
    }
    tmp_status = paramInt;
  }
  
  public void connect()
  {
    currentDevice = ConnectionPlugin.getDefault().getCurrentDevice();
    earjack_status = 0;
    radioButton[0].setSelection(false);
    radioButton[1].setSelection(false);
    radioButton[2].setSelection(true);
  }
  
  public void disconnect() {}
  
  protected void finalize()
    throws Throwable
  {
    InjectorView.getDefault().removeSelectionListener(this);
    super.finalize();
  }
  
  public void selectionChanged(FileEntry paramFileEntry)
  {
    if (paramFileEntry == null)
    {
      disconnect();
    }
    else
    {
      String str = paramFileEntry.getDevice().getSerialNumber();
      if (currentDevice == null)
      {
        if (str != null) {
          connect();
        }
      }
      else if (currentDevice.getSerialNumber() != str)
      {
        disconnect();
        connect();
      }
    }
    sendMessage(earjack_status);
  }
}

/* Location:
 * Qualified Name:     org.tizen.injector.device.earjack.page.EarjackPage
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.injector.device.rssi;

import org.tizen.injector.device.rssi.page.RssiPage;
import org.tizen.injector.provider.AbstractInjectorItem;

public class Rssi
  extends AbstractInjectorItem
{
  protected void addPages()
  {
    addPage(new RssiPage(this, "Rssi"));
  }
}

/* Location:
 * Qualified Name:     org.tizen.injector.device.rssi.Rssi
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.injector.device.rssi.page;

import org.tizen.injector.protocol.AbstractGA;
import org.tizen.injector.protocol.StructureGA;

public class G02A31
  extends AbstractGA
{
  public G02A31()
  {
    super(2, 49);
  }
  
  protected void makeBody()
  {
    StructureGA localStructureGA = getBody();
    localStructureGA.addByteItem("NET_ACT_TYPE");
    localStructureGA.addByteItem("NET_SVC_DOMAIN");
    localStructureGA.addByteItem("NET_REG_STATUS");
    localStructureGA.addByteItem("NET_EDGE_SUPPORT");
    localStructureGA.addByteItem("LAC0");
    localStructureGA.addByteItem("LAC1");
    localStructureGA.addByteItem("CELL_ID0");
    localStructureGA.addByteItem("CELL_ID1");
    localStructureGA.addByteItem("CELL_ID2");
    localStructureGA.addByteItem("CELL_ID3");
    localStructureGA.addByteItem("REJ_CAUSE");
  }
  
  protected void makeHeader() {}
}

/* Location:
 * Qualified Name:     org.tizen.injector.device.rssi.page.G02A31
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.injector.device.rssi.page;

import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.events.SelectionListener;
import org.eclipse.swt.widgets.Slider;
import org.eclipse.swt.widgets.Text;

class RssiPage$1
  implements SelectionListener
{
  RssiPage$1(RssiPage paramRssiPage) {}
  
  public void widgetSelected(SelectionEvent paramSelectionEvent)
  {
    RssiPage.access$1(this$0, RssiPage.access$0(this$0).getSelection());
    RssiPage.access$2(this$0).setText(Integer.toString(RssiPage.access$3(this$0)));
  }
  
  public void widgetDefaultSelected(SelectionEvent paramSelectionEvent) {}
}

/* Location:
 * Qualified Name:     org.tizen.injector.device.rssi.page.RssiPage.1
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.injector.device.rssi.page;

import org.eclipse.swt.events.MouseEvent;
import org.eclipse.swt.events.MouseListener;

class RssiPage$2
  implements MouseListener
{
  RssiPage$2(RssiPage paramRssiPage) {}
  
  public void mouseDoubleClick(MouseEvent paramMouseEvent) {}
  
  public void mouseDown(MouseEvent paramMouseEvent) {}
  
  public void mouseUp(MouseEvent paramMouseEvent)
  {
    this$0.sendRSSI();
  }
}

/* Location:
 * Qualified Name:     org.tizen.injector.device.rssi.page.RssiPage.2
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.injector.device.rssi.page;

import org.eclipse.swt.events.KeyEvent;
import org.eclipse.swt.events.KeyListener;

class RssiPage$3
  implements KeyListener
{
  RssiPage$3(RssiPage paramRssiPage) {}
  
  public void keyPressed(KeyEvent paramKeyEvent) {}
  
  public void keyReleased(KeyEvent paramKeyEvent)
  {
    if ((keyCode == 13) || (keyCode == 16777296)) {
      this$0.sendRSSI();
    }
  }
}

/* Location:
 * Qualified Name:     org.tizen.injector.device.rssi.page.RssiPage.3
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.injector.device.rssi.page;

import java.io.IOException;
import org.eclipse.swt.events.KeyEvent;
import org.eclipse.swt.events.KeyListener;
import org.eclipse.swt.events.MouseEvent;
import org.eclipse.swt.events.MouseListener;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.events.SelectionListener;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Slider;
import org.eclipse.swt.widgets.Text;
import org.tizen.common.connection.ConnectionPlugin;
import org.tizen.common.connection.ConnectionPlugin.ISelectionListener;
import org.tizen.injector.protocol.StructureGA;
import org.tizen.injector.protocol.sensor.TestSensorMessage;
import org.tizen.injector.provider.AbstractInjectorItem;
import org.tizen.injector.provider.AbstractInjectorPage;
import org.tizen.injector.socket.TelephonySocket;
import org.tizen.injector.telephony.call.TelephonyCall;
import org.tizen.injector.telephony.call.page.MOMTCall;
import org.tizen.injector.util.FormPageUtil;
import org.tizen.injector.view.InjectorView;
import org.tizen.sdblib.IDevice;
import org.tizen.sdblib.service.FileEntry;

public class RssiPage
  extends AbstractInjectorPage
  implements ConnectionPlugin.ISelectionListener
{
  private Text sliderText;
  private Slider slider;
  private final String levelNumber = "11\n";
  private final String rssiLevel = "Level    : ";
  private int sendData = -1;
  private IDevice currentDevice;
  boolean isRssi0 = false;
  boolean isFirst = true;
  
  public RssiPage(AbstractInjectorItem paramAbstractInjectorItem, String paramString)
  {
    super(paramAbstractInjectorItem, paramString);
  }
  
  protected void createContents()
  {
    InjectorView.getDefault().addSelectionListener(this);
    currentDevice = ConnectionPlugin.getDefault().getCurrentDevice();
    Composite localComposite = formUtil.createComposite(parent, 4);
    formUtil.createLabel(localComposite, "Level    : ");
    slider = formUtil.createSlider(localComposite, 256);
    slider.setValues(4, 0, 5, 1, 1, 1);
    slider.setLayoutData(new GridData(4, 2, true, false));
    sliderText = new Text(localComposite, 2);
    sliderText.setText(String.format("%d", new Object[] { Integer.valueOf(slider.getSelection()) }));
    sliderText.setEnabled(false);
    GridData localGridData = new GridData(1, 2, false, false);
    widthHint = 15;
    sliderText.setLayoutData(localGridData);
    sendData = slider.getSelection();
    slider.addSelectionListener(new SelectionListener()
    {
      public void widgetSelected(SelectionEvent paramAnonymousSelectionEvent)
      {
        sendData = slider.getSelection();
        sliderText.setText(Integer.toString(sendData));
      }
      
      public void widgetDefaultSelected(SelectionEvent paramAnonymousSelectionEvent) {}
    });
    Button localButton = formUtil.createButton(localComposite, "Send", 8);
    localGridData = new GridData(0, 4, false, true);
    widthHint = 50;
    localButton.setLayoutData(localGridData);
    localButton.addMouseListener(new MouseListener()
    {
      public void mouseDoubleClick(MouseEvent paramAnonymousMouseEvent) {}
      
      public void mouseDown(MouseEvent paramAnonymousMouseEvent) {}
      
      public void mouseUp(MouseEvent paramAnonymousMouseEvent)
      {
        sendRSSI();
      }
    });
    localButton.addKeyListener(new KeyListener()
    {
      public void keyPressed(KeyEvent paramAnonymousKeyEvent) {}
      
      public void keyReleased(KeyEvent paramAnonymousKeyEvent)
      {
        if ((keyCode == 13) || (keyCode == 16777296)) {
          sendRSSI();
        }
      }
    });
    boolean bool = checkDeviceConnectedAlready();
    if (bool) {
      connect();
    }
  }
  
  public void sendRSSI()
  {
    sendLevelMessage(sendData);
    if (sendData == 0)
    {
      if (!isRssi0)
      {
        sendNetStatus(false);
        TelephonyCall.getinstance().setRssiStatus(false);
      }
      isRssi0 = true;
    }
    else
    {
      if (isRssi0)
      {
        sendNetStatus(true);
        TelephonyCall.getinstance().setRssiStatus(true);
      }
      isRssi0 = false;
    }
    slider.setSelection(sendData);
  }
  
  private boolean checkDeviceConnectedAlready()
  {
    return currentDevice != null;
  }
  
  protected void registerReceivers() {}
  
  public void sendNetStatus(boolean paramBoolean)
  {
    int i = 2;
    int j = 1;
    int k = paramBoolean ? 1 : 0;
    int m = 0;
    int n = 17;
    int i1 = 32;
    int i2 = 0;
    int i3 = 0;
    int i4 = 0;
    int i5 = 10;
    int i6 = 0;
    G02A31 localG02A31 = new G02A31();
    localG02A31.intialize();
    StructureGA localStructureGA = localG02A31.getBody();
    localStructureGA.setInt("NET_ACT_TYPE", i);
    localStructureGA.setInt("NET_SVC_DOMAIN", j);
    localStructureGA.setInt("NET_REG_STATUS", k);
    localStructureGA.setInt("NET_EDGE_SUPPORT", m);
    localStructureGA.setInt("LAC0", n);
    localStructureGA.setInt("LAC1", i1);
    localStructureGA.setInt("CELL_ID0", i2);
    localStructureGA.setInt("CELL_ID1", i3);
    localStructureGA.setInt("CELL_ID2", i4);
    localStructureGA.setInt("CELL_ID3", i5);
    localStructureGA.setInt("REJ_CAUSE", i6);
    try
    {
      injectorSocket.send(localG02A31);
    }
    catch (IOException localIOException)
    {
      localIOException.printStackTrace();
    }
    catch (Exception localException)
    {
      localException.printStackTrace();
    }
  }
  
  public void sendLevelMessage(int paramInt)
  {
    TestSensorMessage localTestSensorMessage = new TestSensorMessage(paramInt);
    try
    {
      injectorSocket.sendSensor("11\n" + localTestSensorMessage.getMessage());
    }
    catch (IOException localIOException)
    {
      localIOException.printStackTrace();
    }
    catch (Exception localException)
    {
      localException.printStackTrace();
    }
  }
  
  public void connect()
  {
    currentDevice = ConnectionPlugin.getDefault().getCurrentDevice();
    slider.setSelection(4);
    sendData = slider.getSelection();
    sliderText.setText(Integer.toString(sendData));
    sendRSSI();
    sendNetStatus(true);
  }
  
  public void disconnect() {}
  
  protected void finalize()
    throws Throwable
  {
    InjectorView.getDefault().removeSelectionListener(this);
    super.finalize();
  }
  
  public void selectionChanged(FileEntry paramFileEntry)
  {
    if (paramFileEntry == null)
    {
      disconnect();
    }
    else
    {
      String str = paramFileEntry.getDevice().getSerialNumber();
      if (currentDevice == null)
      {
        if (str != null) {
          connect();
        }
      }
      else if (currentDevice.getSerialNumber() != str)
      {
        disconnect();
        connect();
      }
    }
  }
}

/* Location:
 * Qualified Name:     org.tizen.injector.device.rssi.page.RssiPage
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.injector.device.sdcard;

import org.tizen.injector.device.sdcard.page.SdcardPage;
import org.tizen.injector.provider.AbstractInjectorItem;

public class Sdcard
  extends AbstractInjectorItem
{
  protected void addPages()
  {
    addPage(new SdcardPage(this, "SD Card"));
  }
}

/* Location:
 * Qualified Name:     org.tizen.injector.device.sdcard.Sdcard
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.injector.device.sdcard.page;

class RecordFormat
  extends SdcardStringArray
{
  private static RecordFormat format = new RecordFormat();
  
  public static RecordFormat getInstance()
  {
    return format;
  }
  
  private RecordFormat()
  {
    add(0, "sdcard_ext4_4G.img");
    add(1, "sdcard_ext4_8G.img");
    add(2, "sdcard_ext4_16G.img");
    add(3, "sdcard_ext4_32G.img");
  }
}

/* Location:
 * Qualified Name:     org.tizen.injector.device.sdcard.page.RecordFormat
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.injector.device.sdcard.page;

public class SdcardConstants
{
  public static final String thisCR = System.getProperty("line.separator");
  public static final String label1 = "Select SD Card : ";
  public static final String button1 = "Attach";
  public static final String button2 = "Detach";
  public static final String warnPopup = "If you detach the SDcard without unmount," + thisCR + "the SDcard filesystem might be crashed." + thisCR + thisCR + "Do you want to detach the SDcard?";
}

/* Location:
 * Qualified Name:     org.tizen.injector.device.sdcard.page.SdcardConstants
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.injector.device.sdcard.page;

import java.lang.reflect.InvocationTargetException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.jface.operation.IRunnableWithProgress;
import org.tizen.injector.socket.SDcardSocket;

class SdcardPage$1$1
  implements IRunnableWithProgress
{
  SdcardPage$1$1(SdcardPage.1 param1) {}
  
  public void run(IProgressMonitor paramIProgressMonitor)
    throws InvocationTargetException, InterruptedException
  {
    while (!paramIProgressMonitor.isCanceled())
    {
      SdcardPage.access$2(SdcardPage.1.access$0(this$1), getInstanceisMounted);
      if (SdcardPage.access$3(SdcardPage.1.access$0(this$1))) {
        break;
      }
      Thread.sleep(100L);
    }
  }
}

/* Location:
 * Qualified Name:     org.tizen.injector.device.sdcard.page.SdcardPage.1.1
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.injector.device.sdcard.page;

import java.lang.reflect.InvocationTargetException;
import java.util.HashSet;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.jface.dialogs.ProgressMonitorDialog;
import org.eclipse.jface.operation.IRunnableWithProgress;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.events.SelectionListener;
import org.eclipse.swt.widgets.Combo;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Shell;
import org.tizen.injector.InjectorDialog;
import org.tizen.injector.socket.SDcardSocket;

class SdcardPage$1
  implements SelectionListener
{
  SdcardPage$1(SdcardPage paramSdcardPage) {}
  
  public void widgetSelected(SelectionEvent paramSelectionEvent)
  {
    if (getInstanceSDpath_set.contains(SdcardPage.access$0(this$0).getText()))
    {
      Shell localShell = SdcardPage.access$1(this$0).getShell();
      InjectorDialog.openInfoDialog(localShell, InjectorDialog.TITLE, SdcardPage.access$0(this$0).getText() + " is already mounted from other emulator.\n" + "Please try again later.");
      return;
    }
    getInstanceisMounted = false;
    this$0.sendMessage("1\n" + SdcardPage.access$0(this$0).getText() + "\n");
    try
    {
      new ProgressMonitorDialog(SdcardPage.access$1(this$0).getShell()).run(true, true, new IRunnableWithProgress()
      {
        public void run(IProgressMonitor paramAnonymousIProgressMonitor)
          throws InvocationTargetException, InterruptedException
        {
          while (!paramAnonymousIProgressMonitor.isCanceled())
          {
            SdcardPage.access$2(this$0, getInstanceisMounted);
            if (SdcardPage.access$3(this$0)) {
              break;
            }
            Thread.sleep(100L);
          }
        }
      });
    }
    catch (InterruptedException localInterruptedException)
    {
      localInterruptedException.printStackTrace();
    }
    catch (Exception localException)
    {
      localException.printStackTrace();
    }
    if (SdcardPage.access$3(this$0))
    {
      this$0.mntButtonClick();
    }
    else
    {
      this$0.umntButtonClick();
      this$0.sendMessage("0\n");
    }
  }
  
  public void widgetDefaultSelected(SelectionEvent paramSelectionEvent) {}
}

/* Location:
 * Qualified Name:     org.tizen.injector.device.sdcard.page.SdcardPage.1
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.injector.device.sdcard.page;

import java.lang.reflect.InvocationTargetException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.jface.operation.IRunnableWithProgress;
import org.tizen.injector.socket.SDcardSocket;

class SdcardPage$2$1
  implements IRunnableWithProgress
{
  SdcardPage$2$1(SdcardPage.2 param2) {}
  
  public void run(IProgressMonitor paramIProgressMonitor)
    throws InvocationTargetException, InterruptedException
  {
    while (!paramIProgressMonitor.isCanceled())
    {
      SdcardPage.access$2(SdcardPage.2.access$0(this$1), getInstanceisMounted);
      if (!SdcardPage.access$3(SdcardPage.2.access$0(this$1))) {
        break;
      }
      SdcardPage.access$4(SdcardPage.2.access$0(this$1), getInstanceumountOk);
      if (!SdcardPage.access$5(SdcardPage.2.access$0(this$1))) {
        break;
      }
      Thread.sleep(100L);
    }
  }
}

/* Location:
 * Qualified Name:     org.tizen.injector.device.sdcard.page.SdcardPage.2.1
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.injector.device.sdcard.page;

import java.lang.reflect.InvocationTargetExce
1 2

Further reading...

For more information on Java 1.5 Tiger, you may find Java 1.5 Tiger, A developer's Notebook by D. Flanagan and B. McLaughlin from O'Reilly of interest.

New!JAR listings


Copyright 2006-2017. Infinite Loop Ltd