text:
"""Collection of helper methods.

All containing methods are legacy helpers that should not be used by new
components. Instead call the service directly.
"""
from homeassistant.components.climate import _LOGGER
from homeassistant.components.climate.const import (
    ATTR_AUX_HEAT, ATTR_FAN_MODE, ATTR_HUMIDITY, ATTR_HVAC_MODE,
    ATTR_PRESET_MODE, ATTR_SWING_MODE, ATTR_TARGET_TEMP_HIGH,
    ATTR_TARGET_TEMP_LOW, DOMAIN, SERVICE_SET_AUX_HEAT, SERVICE_SET_FAN_MODE,
    SERVICE_SET_HUMIDITY, SERVICE_SET_HVAC_MODE, SERVICE_SET_PRESET_MODE,
    SERVICE_SET_SWING_MODE, SERVICE_SET_TEMPERATURE)
from homeassistant.const import (
    ATTR_ENTITY_ID, ATTR_TEMPERATURE, SERVICE_TURN_OFF, SERVICE_TURN_ON)
from homeassistant.loader import bind_hass

async def async_set_preset_mode(hass, preset_mode, entity_id=None):
    """Set new preset mode."""
    data = {
        ATTR_PRESET_MODE: preset_mode
    }

    if entity_id:
        data[ATTR_ENTITY_ID] = entity_id

    await hass.services.async_call(
        DOMAIN, SERVICE_SET_PRESET_MODE, data, blocking=True)

@bind_hass
def set_preset_mode(hass, preset_mode, entity_id=None):
    """Set new preset mode."""
    data = {
        ATTR_PRESET_MODE: preset_mode
    }

    if entity_id:
        data[ATTR_ENTITY_ID] = entity_id

    hass.services.call(DOMAIN, SERVICE_SET_PRESET_MODE, data)

async def async_set_aux_heat(hass, aux_heat, entity_id=None):
    """Turn all or specified climate devices auxiliary heater on."""
    data = {
        ATTR_AUX_HEAT: aux_heat
    }

    if entity_id:
        data[ATTR_ENTITY_ID] = entity_id

    await hass.services.async_call(
        DOMAIN, SERVICE_SET_AUX_HEAT, data, blocking=True)

@bind_hass
def set_aux_heat(hass, aux_heat, entity_id=None):
    """Turn all or specified climate devices auxiliary heater on."""
    data = {
        ATTR_AUX_HEAT: aux_heat
    }

    if entity_id:
        data[ATTR_ENTITY_ID] = entity_id

    hass.services.call(DOMAIN, SERVICE_SET_AUX_HEAT, data)

async def async_set_temperature(hass, temperature=None, entity_id=None,
                                target_temp_high=None, target_temp_low=None,
                                hvac_mode=None):
    """Set new target temperature."""
    kwargs = {
        key: value for key, value in [
            (ATTR_TEMPERATURE, temperature),
            (ATTR_TARGET_TEMP_HIGH, target_temp_high),
            (ATTR_TARGET_TEMP_LOW, target_temp_low),
            (ATTR_ENTITY_ID, entity_id),
            (ATTR_HVAC_MODE, hvac_mode)
        ] if value is not None
    }
    _LOGGER.debug("set_temperature start data=%s", kwargs)
    await hass.services.async_call(
        DOMAIN, SERVICE_SET_TEMPERATURE, kwargs, blocking=True)

@bind_hass
def set_temperature(hass, temperature=None, entity_id=None,
                    target_temp_high=None, target_temp_low=None,
                    hvac_mode=None):
    """Set new target temperature."""
    kwargs = {
        key: value for key, value in [
            (ATTR_TEMPERATURE, temperature),
            (ATTR_TARGET_TEMP_HIGH, target_temp_high),
            (ATTR_TARGET_TEMP_LOW, target_temp_low),
            (ATTR_ENTITY_ID, entity_id),
            (ATTR_HVAC_MODE, hvac_mode)
        ] if value is not None
    }
    _LOGGER.debug("set_temperature start data=%s", kwargs)
    hass.services.call(DOMAIN, SERVICE_SET_TEMPERATURE, kwargs)

async def async_set_humidity(hass, humidity, entity_id=None):
    """Set new target humidity."""
    data = {ATTR_HUMIDITY: humidity}

    if entity_id is not None:
        data[ATTR_ENTITY_ID] = entity_id

    await hass.services.async_call(
        DOMAIN, SERVICE_SET_HUMIDITY, data, blocking=True)

@bind_hass
def set_humidity(hass, humidity, entity_id=None):
    """Set new target humidity."""
    data = {ATTR_HUMIDITY: humidity}

    if entity_id is not None:
        data[ATTR_ENTITY_ID] = entity_id

    hass.services.call(DOMAIN, SERVICE_SET_HUMIDITY, data)

async def async_set_fan_mode(hass, fan, entity_id=None):
    """Set all or specified climate devices fan mode on."""
    data = {ATTR_FAN_MODE: fan}

    if entity_id:
        data[ATTR_ENTITY_ID] = entity_id

    await hass.services.async_call(
        DOMAIN, SERVICE_SET_FAN_MODE, data, blocking=True)

@bind_hass
def set_fan_mode(hass, fan, entity_id=None):
    """Set all or specified climate devices fan mode on."""
    data = {ATTR_FAN_MODE: fan}

    if entity_id:
        data[ATTR_ENTITY_ID] = entity_id

    hass.services.call(DOMAIN, SERVICE_SET_FAN_MODE, data)

async def async_set_hvac_mode(hass, hvac_mode, entity_id=None):
    """Set new target operation mode."""
    data = {ATTR_HVAC_MODE: hvac_mode}

    if entity_id is not None:
        data[ATTR_ENTITY_ID] = entity_id

    await hass.services.async_call(
        DOMAIN, SERVICE_SET_HVAC_MODE, data, blocking=True)

@bind_hass
def set_operation_mode(hass, hvac_mode, entity_id=None):
    """Set new target operation mode."""
    data = {ATTR_HVAC_MODE: hvac_mode}

    if entity_id is not None:
        data[ATTR_ENTITY_ID] = entity_id

    hass.services.call(DOMAIN, SERVICE_SET_HVAC_MODE, data)

async def async_set_swing_mode(hass, swing_mode, entity_id=None):
    """Set new target swing mode."""
    data = {ATTR_SWING_MODE: swing_mode}

    if entity_id is not None:
        data[ATTR_ENTITY_ID] = entity_id

    await hass.services.async_call(
        DOMAIN, SERVICE_SET_SWING_MODE, data, blocking=True)

@bind_hass
def set_swing_mode(hass, swing_mode, entity_id=None):
    """Set new target swing mode."""
    data = {ATTR_SWING_MODE: swing_mode}

    if entity_id is not None:
        data[ATTR_ENTITY_ID] = entity_id

    hass.services.call(DOMAIN, SERVICE_SET_SWING_MODE, data)

async def async_turn_on(hass, entity_id=None):
    """Turn on device."""
    data = {}

    if entity_id is not None:
        data[ATTR_ENTITY_ID] = entity_id

    await hass.services.async_call(
        DOMAIN, SERVICE_TURN_ON, data, blocking=True)

async def async_turn_off(hass, entity_id=None):
    """Turn off device."""
    data = {}

    if entity_id is not None:
        data[ATTR_ENTITY_ID] = entity_id

    await hass.services.async_call(
        DOMAIN, SERVICE_TURN_OFF, data, blocking=True)


text:
<?php

namespace App\Model;

use \App\Libs\Model;

class UserRole extends Model{

	public $timestamps = false;

	public function users(){

		$this->hasMany(\App\Model\User::class,'id','rank');
	}

	/**
    * Accessor for rights
    */
    public function getRightsAttribute(){
    	return json_decode($this->attributes['rights']);
    }

	/**
    * Mutator for rights
    */
    public function setRightsAttribute($value){
    	$this->attributes['rights'] = json_encode($value);
    }

    public function isAdminRole(){
        $roles = $this->getRightsAttribute();

        return $roles? in_array('admin_area',$roles) : false;
    }

}

redpajama_set_name: RedPajamaGithub


text:
SYNONYM

#### According to
Index Fungorum

#### Published in
Sydowia 5: 351 (1951)

#### Original name
null

### Remarks
null


text:
package org.jboss.resteasy.test.nextgen.providers.collection;

import org.jboss.resteasy.annotations.providers.jaxb.Wrapped;
import org.jboss.resteasy.client.ClientRequest;
import org.jboss.resteasy.client.ClientResponse;
import org.jboss.resteasy.client.jaxrs.ResteasyClient;
import org.jboss.resteasy.client.jaxrs.ResteasyClientBuilder;
import org.jboss.resteasy.client.jaxrs.ResteasyWebTarget;
import org.jboss.resteasy.test.BaseResourceTest;
import org.junit.AfterClass;
import org.junit.Assert;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;

import javax.ws.rs.Consumes;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.client.Entity;
import javax.ws.rs.core.GenericType;
import javax.ws.rs.core.Response;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlRootElement;
import java.util.List;

import static org.jboss.resteasy.test.TestPortProvider.generateURL;

/**
 * @author Bill Burke
 * @version $Revision: 1 $
 */
public class CollectionTest2Test extends BaseResourceTest
{
   @XmlRootElement
   @XmlAccessorType(XmlAccessType.FIELD)
   public static class Foo
   {
      @XmlAttribute
      private String test;

      public Foo()
      {
      }

      public Foo(String test)
      {
         this.test = test;
      }

      public String getTest()
      {
         return test;
      }

      public void setTest(String test)
      {
         this.test = test;
      }
   }

   @XmlRootElement(name = "foo", namespace = "http://foo.com")
   @XmlAccessorType(XmlAccessType.FIELD)
   public static class NamespacedFoo
   {
      @XmlAttribute
      private String test;

      public NamespacedFoo()
      {
      }

      public NamespacedFoo(String test)
      {
         this.test = test;
      }

      public String getTest()
      {
         return test;
      }

      public void setTest(String test)
      {
         this.test = test;
      }
   }

   @Path("/")
   public static class MyResource
   {
      @Path("/array")
      @Produces("application/xml")
      @Consumes("application/xml")
      @POST
      public Foo[] naked(Foo[] foo)
      {
         Assert.assertEquals(1, foo.length);
         Assert.assertEquals(foo[0].getTest(), "hello");
         return foo;
      }

      @Path("/list")
      @POST
      @Produces("application/xml")
      @Consumes("application/xml")
      @Wrapped(element = "list", namespace = "", prefix = "")
      public List<Foo> wrapped(@Wrapped(element = "list", namespace = "", prefix = "") List<Foo> list)
      {
         Assert.assertEquals(1, list.size());
         Assert.assertEquals(list.get(0).getTest(), "hello");
         return list;
      }

   }

   @Path("/namespaced")
   public static class MyNamespacedResource
   {
      @Path("/array")
      @Produces("application/xml")
      @Consumes("application/xml")
      @POST
      public NamespacedFoo[] naked(NamespacedFoo[] foo)
      {
         Assert.assertEquals(1, foo.length);
         Assert.assertEquals(foo[0].getTest(), "hello");
         return foo;
      }

      @Path("/list")
      @POST
      @Produces("application/xml")
      @Consumes("application/xml")
      @Wrapped(element = "list", namespace = "", prefix = "")
      public List<NamespacedFoo> wrapped(@Wrapped(element = "list", namespace = "", prefix = "") List<NamespacedFoo> list)
      {
         Assert.assertEquals(1, list.size());
         Assert.assertEquals(list.get(0).getTest(), "hello");
         return list;
      }

   }

   private static ResteasyClient client;

   @BeforeClass
   public static void setup()
   {
      addPerRequestResource(MyResource.class);
      addPerRequestResource(MyNamespacedResource.class);
      client = new ResteasyClientBuilder().build();
   }

   @AfterClass
   public static void shutdown()
   {
      client.close();
   }

   @Test
   public void testNakedArray() throws Exception
   {
      String xml = "<resteasy:collection xmlns:resteasy=\"http://jboss.org/resteasy\">"
              + "<foo test=\"hello\"/></resteasy:collection>";

      ResteasyWebTarget target = client.target(generateURL("/array"));
      Response response = target.request().post(Entity.xml(xml));
      List<Foo> list = response.readEntity(new GenericType<List<Foo>>()
      {
      });
      Assert.assertEquals(1, list.size());
      Assert.assertEquals(list.get(0).getTest(), "hello");
      response.close();

   }

   @Test
   public void testList() throws Exception
   {
      String xml = "<list>"
              + "<foo test=\"hello\"/></list>";

      ResteasyWebTarget target = client.target(generateURL("/list"));
      Response response = target.request().post(Entity.xml(xml));
      Foo[] list = response.readEntity(new GenericType<Foo[]>()
      {
      });
      Assert.assertEquals(1, list.length);
      Assert.assertEquals(list[0].getTest(), "hello");
      response.close();

   }

   @Test
   public void testNamespacedNakedArray() throws Exception
   {
      String xml = "<collection xmlns:foo=\"http://foo.com\">"
              + "<foo:foo test=\"hello\"/></collection>";

      ResteasyWebTarget target = client.target(generateURL("/namespaced/array"));
      Response response = target.request().post(Entity.xml(xml));
      List<NamespacedFoo> list = response.readEntity(new GenericType<List<NamespacedFoo>>()
      {
      });
      Assert.assertEquals(1, list.size());
      Assert.assertEquals(list.get(0).getTest(), "hello");
      response.close();

   }

   @Test
   public void testNamespacedList() throws Exception
   {
      String xml = "<list xmlns:foo=\"http://foo.com\">"
              + "<foo:foo test=\"hello\"/></list>";

      ResteasyWebTarget target = client.target(generateURL("/namespaced/list"));
      Response response = target.request().post(Entity.xml(xml));
      NamespacedFoo[] list = response.readEntity(new GenericType<NamespacedFoo[]>()
      {
      });
      Assert.assertEquals(1, list.length);
      Assert.assertEquals(list[0].getTest(), "hello");
      response.close();
   }

   @Test
   public void testBadList() throws Exception
   {
      String xml = "<bad-list>"
              + "<foo test=\"hello\"/></bad-list>";

      ResteasyWebTarget target = client.target(generateURL("/list"));
      Response response = target.request().post(Entity.xml(xml));
      Assert.assertEquals(400, response.getStatus());
      response.close();

   }

}


text:
      <link href="http://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
      <link href='https://fonts.googleapis.com/css?family=Amatic+SC:700' rel='stylesheet' type='text/css'>
      <link href="./css/materialdesignicons.min.css" media="all" rel="stylesheet" type="text/css" />
      <link rel="shortcut icon" href="./images/favicon.ico" type="image/x-icon">
      <link rel="icon" href="./images/favicon.ico" type="image/x-icon">
      <link type="text/css" rel="stylesheet" href="./css/materialize.min.css"  media="screen,projection"/>
      <link type="text/css" rel="stylesheet" href="./css/page.css"  media="screen,projection"/>
      <meta name="viewport" content="width=device-width, initial-scale=1.0"/>

 Jessica White

 Software Developer

 Founder/Organiser of Women In Tech Nottingham.

 Blog

Blog Topics

All

Hackathons

Conferences

Women In Tech

Rasberry Pi

Node

C#

Java

                              Sonos Alerts

                              Women Tech Makers 16

                              Women Tech Makers 15

                              Microservices Day

                              NodeConf


text:
namespace mzxrules.ZActor.OActors
{
    class GossipStoneActor:ActorRecord_Wrapper
    {

        public GossipStoneActor(short[] record, params int[] p)
            : base(record)
        {
            objectDependencies = p;
        }
        protected override string GetActorName()
        {
            return "Gossip Stone";
        }
    }
}


text:
.class public Lcom/android/internal/util/StateMachine;
.super Ljava/lang/Object;
.source "StateMachine.java"

# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/android/internal/util/StateMachine$LogRec;,
        Lcom/android/internal/util/StateMachine$LogRecords;,
        Lcom/android/internal/util/StateMachine$SmHandler;
    }
.end annotation

# static fields
.field public static final HANDLED:Z = true

.field public static final NOT_HANDLED:Z = false

.field private static final SM_INIT_CMD:I = -0x2

.field private static final SM_QUIT_CMD:I = -0x1

# instance fields
.field private mName:Ljava/lang/String;

.field private mSmHandler:Lcom/android/internal/util/StateMachine$SmHandler;

.field private mSmThread:Landroid/os/HandlerThread;

# direct methods
.method static synthetic -get0(Lcom/android/internal/util/StateMachine;)Landroid/os/HandlerThread;
    .locals 1

    iget-object v0, p0, Lcom/android/internal/util/StateMachine;->mSmThread:Landroid/os/HandlerThread;

    return-object v0
.end method

.method static synthetic -set0(Lcom/android/internal/util/StateMachine;Lcom/android/internal/util/StateMachine$SmHandler;)Lcom/android/internal/util/StateMachine$SmHandler;
    .locals 0

    iput-object p1, p0, Lcom/android/internal/util/StateMachine;->mSmHandler:Lcom/android/internal/util/StateMachine$SmHandler;

    return-object p1
.end method

.method static synthetic -set1(Lcom/android/internal/util/StateMachine;Landroid/os/HandlerThread;)Landroid/os/HandlerThread;
    .locals 0

    iput-object p1, p0, Lcom/android/internal/util/StateMachine;->mSmThread:Landroid/os/HandlerThread;

    return-object p1
.end method

.method protected constructor <init>(Ljava/lang/String;)V
    .locals 2
    .param p1, "name"    # Ljava/lang/String;

    .prologue
    .line 1250
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 1251
    new-instance v1, Landroid/os/HandlerThread;

    invoke-direct {v1, p1}, Landroid/os/HandlerThread;-><init>(Ljava/lang/String;)V

    iput-object v1, p0, Lcom/android/internal/util/StateMachine;->mSmThread:Landroid/os/HandlerThread;

    .line 1252
    iget-object v1, p0, Lcom/android/internal/util/StateMachine;->mSmThread:Landroid/os/HandlerThread;

    invoke-virtual {v1}, Landroid/os/HandlerThread;->start()V

    .line 1253
    iget-object v1, p0, Lcom/android/internal/util/StateMachine;->mSmThread:Landroid/os/HandlerThread;

    invoke-virtual {v1}, Landroid/os/HandlerThread;->getLooper()Landroid/os/Looper;

    move-result-object v0

    .line 1255
    .local v0, "looper":Landroid/os/Looper;
    invoke-direct {p0, p1, v0}, Lcom/android/internal/util/StateMachine;->initStateMachine(Ljava/lang/String;Landroid/os/Looper;)V

    .line 1250
    return-void
.end method

.method protected constructor <init>(Ljava/lang/String;Landroid/os/Handler;)V
    .locals 1
    .param p1, "name"    # Ljava/lang/String;
    .param p2, "handler"    # Landroid/os/Handler;

    .prologue
    .line 1272
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 1273
    invoke-virtual {p2}, Landroid/os/Handler;->getLooper()Landroid/os/Looper;

    move-result-object v0

    invoke-direct {p0, p1, v0}, Lcom/android/internal/util/StateMachine;->initStateMachine(Ljava/lang/String;Landroid/os/Looper;)V

    .line 1272
    return-void
.end method

.method protected constructor <init>(Ljava/lang/String;Landroid/os/Looper;)V
    .locals 0
    .param p1, "name"    # Ljava/lang/String;
    .param p2, "looper"    # Landroid/os/Looper;

    .prologue
    .line 1263
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 1264
    invoke-direct {p0, p1, p2}, Lcom/android/internal/util/StateMachine;->initStateMachine(Ljava/lang/String;Landroid/os/Looper;)V

    .line 1263
    return-void
.end method

.method private initStateMachine(Ljava/lang/String;Landroid/os/Looper;)V
    .locals 2
    .param p1, "name"    # Ljava/lang/String;
    .param p2, "looper"    # Landroid/os/Looper;

    .prologue
    .line 1241
    iput-object p1, p0, Lcom/android/internal/util/StateMachine;->mName:Ljava/lang/String;

    .line 1242
    new-instance v0, Lcom/android/internal/util/StateMachine$SmHandler;

    const/4 v1, 0x0

    invoke-direct {v0, p2, p0, v1}, Lcom/android/internal/util/StateMachine$SmHandler;-><init>(Landroid/os/Looper;Lcom/android/internal/util/StateMachine;Lcom/android/internal/util/StateMachine$SmHandler;)V

    iput-object v0, p0, Lcom/android/internal/util/StateMachine;->mSmHandler:Lcom/android/internal/util/StateMachine$SmHandler;

    .line 1240
    return-void
.end method

# virtual methods
.method protected addLogRec(Ljava/lang/String;)V
    .locals 8
    .param p1, "string"    # Ljava/lang/String;

    .prologue
    .line 1474
    iget-object v7, p0, Lcom/android/internal/util/StateMachine;->mSmHandler:Lcom/android/internal/util/StateMachine$SmHandler;

    .line 1475
    .local v7, "smh":Lcom/android/internal/util/StateMachine$SmHandler;
    if-nez v7, :cond_0

    return-void

    .line 1476
    :cond_0
    invoke-static {v7}, Lcom/android/internal/util/StateMachine$SmHandler;->-get4(Lcom/android/internal/util/StateMachine$SmHandler;)Lcom/android/internal/util/StateMachine$LogRecords;

    move-result-object v0

    invoke-static {v7}, Lcom/android/internal/util/StateMachine$SmHandler;->-wrap0(Lcom/android/internal/util/StateMachine$SmHandler;)Landroid/os/Message;

    move-result-object v2

    invoke-static {v7}, Lcom/android/internal/util/StateMachine$SmHandler;->-wrap3(Lcom/android/internal/util/StateMachine$SmHandler;)Lcom/android/internal/util/IState;

    move-result-object v4

    .line 1477
    invoke-static {v7}, Lcom/android/internal/util/StateMachine$SmHandler;->-get6(Lcom/android/internal/util/StateMachine$SmHandler;)[Lcom/android/internal/util/StateMachine$SmHandler$StateInfo;

    move-result-object v1

    invoke-static {v7}, Lcom/android/internal/util/StateMachine$SmHandler;->-get7(Lcom/android/internal/util/StateMachine$SmHandler;)I

    move-result v3

    aget-object v1, v1, v3

    iget-object v5, v1, Lcom/android/internal/util/StateMachine$SmHandler$StateInfo;->state:Lcom/android/internal/util/State;

    invoke-static {v7}, Lcom/android/internal/util/StateMachine$SmHandler;->-get2(Lcom/android/internal/util/StateMachine$SmHandler;)Lcom/android/internal/util/State;

    move-result-object v6

    move-object v1, p0

    move-object v3, p1

    .line 1476
    invoke-virtual/range {v0 .. v6}, Lcom/android/internal/util/StateMachine$LogRecords;->add(Lcom/android/internal/util/StateMachine;Landroid/os/Message;Ljava/lang/String;Lcom/android/internal/util/IState;Lcom/android/internal/util/IState;Lcom/android/internal/util/IState;)V

    .line 1472
    return-void
.end method

.method protected final addState(Lcom/android/internal/util/State;)V
    .locals 2
    .param p1, "state"    # Lcom/android/internal/util/State;

    .prologue
    .line 1290
    iget-object v0, p0, Lcom/android/internal/util/StateMachine;->mSmHandler:Lcom/android/internal/util/StateMachine$SmHandler;

    const/4 v1, 0x0

    invoke-static {v0, p1, v1}, Lcom/android/internal/util/StateMachine$SmHandler;->-wrap4(Lcom/android/internal/util/StateMachine$SmHandler;Lcom/android/internal/util/State;Lcom/android/internal/util/State;)Lcom/android/internal/util/StateMachine$SmHandler$StateInfo;

    .line 1289
    return-void
.end method

.method protected final addState(Lcom/android/internal/util/State;Lcom/android/internal/util/State;)V
    .locals 1
    .param p1, "state"    # Lcom/android/internal/util/State;
    .param p2, "parent"    # Lcom/android/internal/util/State;

    .prologue
    .line 1282
    iget-object v0, p0, Lcom/android/internal/util/StateMachine;->mSmHandler:Lcom/android/internal/util/StateMachine$SmHandler;

    invoke-static {v0, p1, p2}, Lcom/android/internal/util/StateMachine$SmHandler;->-wrap4(Lcom/android/internal/util/StateMachine$SmHandler;Lcom/android/internal/util/State;Lcom/android/internal/util/State;)Lcom/android/internal/util/StateMachine$SmHandler$StateInfo;

    .line 1281
    return-void
.end method

.method public final copyLogRecs()Ljava/util/Collection;
    .locals 5
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "()",
            "Ljava/util/Collection",
            "<",
            "Lcom/android/internal/util/StateMachine$LogRec;",
            ">;"
        }
    .end annotation

    .prologue
    .line 1457
    new-instance v3, Ljava/util/Vector;

    invoke-direct {v3}, Ljava/util/Vector;-><init>()V

    .line 1458
    .local v3, "vlr":Ljava/util/Vector;, "Ljava/util/Vector<Lcom/android/internal/util/StateMachine$LogRec;>;"
    iget-object v2, p0, Lcom/android/internal/util/StateMachine;->mSmHandler:Lcom/android/internal/util/StateMachine$SmHandler;

    .line 1459
    .local v2, "smh":Lcom/android/internal/util/StateMachine$SmHandler;
    if-eqz v2, :cond_0

    .line 1460
    invoke-static {v2}, Lcom/android/internal/util/StateMachine$SmHandler;->-get4(Lcom/android/internal/util/StateMachine$SmHandler;)Lcom/android/internal/util/StateMachine$LogRecords;

    move-result-object v4

    invoke-static {v4}, Lcom/android/internal/util/StateMachine$LogRecords;->-get0(Lcom/android/internal/util/StateMachine$LogRecords;)Ljava/util/Vector;

    move-result-object v4

    invoke-interface {v4}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;

    move-result-object v1

    .local v1, "lr$iterator":Ljava/util/Iterator;
    :goto_0
    invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z

    move-result v4

    if-eqz v4, :cond_0

    invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/android/internal/util/StateMachine$LogRec;

    .line 1461
    .local v0, "lr":Lcom/android/internal/util/StateMachine$LogRec;
    invoke-virtual {v3, v0}, Ljava/util/Vector;->add(Ljava/lang/Object;)Z

    goto :goto_0

    .line 1464
    .end local v0    # "lr":Lcom/android/internal/util/StateMachine$LogRec;
    .end local v1    # "lr$iterator":Ljava/util/Iterator;
    :cond_0
    return-object v3
.end method

.method protected final deferMessage(Landroid/os/Message;)V
    .locals 1
    .param p1, "msg"    # Landroid/os/Message;

    .prologue
    .line 1362
    iget-object v0, p0, Lcom/android/internal/util/StateMachine;->mSmHandler:Lcom/android/internal/util/StateMachine$SmHandler;

    invoke-static {v0, p1}, Lcom/android/internal/util/StateMachine$SmHandler;->-wrap6(Lcom/android/internal/util/StateMachine$SmHandler;Landroid/os/Message;)V

    .line 1361
    return-void
.end method

.method public dump(Ljava/io/FileDescriptor;Ljava/io/PrintWriter;[Ljava/lang/String;)V
    .locals 3
    .param p1, "fd"    # Ljava/io/FileDescriptor;
    .param p2, "pw"    # Ljava/io/PrintWriter;
    .param p3, "args"    # [Ljava/lang/String;

    .prologue
    .line 1988
    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {p0}, Lcom/android/internal/util/StateMachine;->getName()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string/jumbo v2, ":"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {p2, v1}, Ljava/io/PrintWriter;->println(Ljava/lang/String;)V

    .line 1989
    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string/jumbo v2, " total records="

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {p0}, Lcom/android/internal/util/StateMachine;->getLogRecCount()I

    move-result v2

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {p2, v1}, Ljava/io/PrintWriter;->println(Ljava/lang/String;)V

    .line 1990
    const/4 v0, 0x0

    .local v0, "i":I
    :goto_0
    invoke-virtual {p0}, Lcom/android/internal/util/StateMachine;->getLogRecSize()I

    move-result v1

    if-ge v0, v1, :cond_0

    .line 1991
    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string/jumbo v2, " rec["

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string/jumbo v2, "]: "

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {p0, v0}, Lcom/android/internal/util/StateMachine;->getLogRec(I)Lcom/android/internal/util/StateMachine$LogRec;

    move-result-object v2

    invoke-virtual {v2}, Lcom/android/internal/util/StateMachine$LogRec;->toString()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {p2, v1}, Ljava/io/PrintWriter;->println(Ljava/lang/String;)V

    .line 1992
    invoke-virtual {p2}, Ljava/io/PrintWriter;->flush()V

    .line 1990
    add-int/lit8 v0, v0, 0x1

    goto :goto_0

    .line 1994
    :cond_0
    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string/jumbo v2, "curState="

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {p0}, Lcom/android/internal/util/StateMachine;->getCurrentState()Lcom/android/internal/util/IState;

    move-result-object v2

    invoke-interface {v2}, Lcom/android/internal/util/IState;->getName()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {p2, v1}, Ljava/io/PrintWriter;->println(Ljava/lang/String;)V

    .line 1985
    return-void
.end method

.method protected final getCurrentMessage()Landroid/os/Message;
    .locals 2

    .prologue
    const/4 v1, 0x0

    .line 1308
    iget-object v0, p0, Lcom/android/internal/util/StateMachine;->mSmHandler:Lcom/android/internal/util/StateMachine$SmHandler;

    .line 1309
    .local v0, "smh":Lcom/android/internal/util/StateMachine$SmHandler;
    if-nez v0, :cond_0

    return-object v1

    .line 1310
    :cond_0
    invoke-static {v0}, Lcom/android/internal/util/StateMachine$SmHandler;->-wrap0(Lcom/android/internal/util/StateMachine$SmHandler;)Landroid/os/Message;

    move-result-object v1

    return-object v1
.end method

.method protected final getCurrentState()Lcom/android/internal/util/IState;
    .locals 2

    .prologue
    const/4 v1, 0x0

    .line 1318
    iget-object v0, p0, Lcom/android/internal/util/StateMachine;->mSmHandler:Lcom/android/internal/util/StateMachine$SmHandler;

    .line 1319
    .local v0, "smh":Lcom/android/internal/util/StateMachine$SmHandler;
    if-nez v0, :cond_0

    return-object v1

    .line 1320
    :cond_0
    invoke-static {v0}, Lcom/android/internal/util/StateMachine$SmHandler;->-wrap3(Lcom/android/internal/util/StateMachine$SmHandler;)Lcom/android/internal/util/IState;

    move-result-object v1

    return-object v1
.end method

.method public final getHandler()Landroid/os/Handler;
    .locals 1

    .prologue
    .line 1509
    iget-object v0, p0, Lcom/android/internal/util/StateMachine;->mSmHandler:Lcom/android/internal/util/StateMachine$SmHandler;

    return-object v0
.end method

.method public final getLogRec(I)Lcom/android/internal/util/StateMachine$LogRec;
    .locals 2
    .param p1, "index"    # I

    .prologue
    const/4 v1, 0x0

    .line 1448
    iget-object v0, p0, Lcom/android/internal/util/StateMachine;->mSmHandler:Lcom/android/internal/util/StateMachine$SmHandler;

    .line 1449
    .local v0, "smh":Lcom/android/internal/util/StateMachine$SmHandler;
    if-nez v0, :cond_0

    return-object v1

    .line 1450
    :cond_0
    invoke-static {v0}, Lcom/android/internal/util/StateMachine$SmHandler;->-get4(Lcom/android/internal/util/StateMachine$SmHandler;)Lcom/android/internal/util/StateMachine$LogRecords;

    move-result-object v1

    invoke-virtual {v1, p1}, Lcom/android/internal/util/StateMachine$LogRecords;->get(I)Lcom/android/internal/util/StateMachine$LogRec;

    move-result-object v1

    return-object v1
.end method

.method public final getLogRecCount()I
    .locals 2

    .prologue
    .line 1438
    iget-object v0, p0, Lcom/android/internal/util/StateMachine;->mSmHandler:Lcom/android/internal/util/StateMachine$SmHandler;

    .line 1439
    .local v0, "smh":Lcom/android/internal/util/StateMachine$SmHandler;
    if-nez v0, :cond_0

    const/4 v1, 0x0

    return v1

    .line 1440
    :cond_0
    invoke-static {v0}, Lcom/android/internal/util/StateMachine$SmHandler;->-get4(Lcom/android/internal/util/StateMachine$SmHandler;)Lcom/android/internal/util/StateMachine$LogRecords;

    move-result-object v1

    invoke-virtual {v1}, Lcom/android/internal/util/StateMachine$LogRecords;->count()I

    move-result v1

    return v1
.end method

.method public final getLogRecSize()I
    .locals 2

    .prologue
    .line 1428
    iget-object v0, p0, Lcom/android/internal/util/StateMachine;->mSmHandler:Lcom/android/internal/util/StateMachine$SmHandler;

    .line 1429
    .local v0, "smh":Lcom/android/internal/util/StateMachine$SmHandler;
    if-nez v0, :cond_0

    const/4 v1, 0x0

    return v1

    .line 1430
    :cond_0
    invoke-static {v0}, Lcom/android/internal/util/StateMachine$SmHandler;->-get4(Lcom/android/internal/util/StateMachine$SmHandler;)Lcom/android/internal/util/StateMachine$LogRecords;

    move-result-object v1

    invoke-virtual {v1}, Lcom/android/internal/util/StateMachine$LogRecords;->size()I

    move-result v1

    return v1
.end method

.method protected getLogRecString(Landroid/os/Message;)Ljava/lang/String;
    .locals 1
    .param p1, "msg"    # Landroid/os/Message;

    .prologue
    .line 1495
    const-string/jumbo v0, ""

    return-object v0
.end method

.method public final getName()Ljava/lang/String;
    .locals 1

    .prologue
    .line 1402
    iget-object v0, p0, Lcom/android/internal/util/StateMachine;->mName:Ljava/lang/String;

    return-object v0
.end method

.method protected getWhatToString(I)Ljava/lang/String;
    .locals 1
    .param p1, "what"    # I

    .prologue
    .line 1502
    const/4 v0, 0x0

    return-object v0
.end method

.method protected haltedProcessMessage(Landroid/os/Message;)V
    .locals 0
    .param p1, "msg"    # Landroid/os/Message;

    .prologue
    .line 1378
    return-void
.end method

.method protected final hasDeferredMessages(I)Z
    .locals 5
    .param p1, "what"    # I

    .prologue
    const/4 v4, 0x0

    .line 1885
    iget-object v2, p0, Lcom/android/internal/util/StateMachine;->mSmHandler:Lcom/android/internal/util/StateMachine$SmHandler;

    .line 1886
    .local v2, "smh":Lcom/android/internal/util/StateMachine$SmHandler;
    if-nez v2, :cond_0

    return v4

    .line 1888
    :cond_0
    invoke-static {v2}, Lcom/android/internal/util/StateMachine$SmHandler;->-get1(Lcom/android/internal/util/StateMachine$SmHandler;)Ljava/util/ArrayList;

    move-result-object v3

    invoke-virtual {v3}, Ljava/util/ArrayList;->iterator()Ljava/util/Iterator;

    move-result-object v0

    .line 1889
    .local v0, "iterator":Ljava/util/Iterator;, "Ljava/util/Iterator<Landroid/os/Message;>;"
    :cond_1
    invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z

    move-result v3

    if-eqz v3, :cond_2

    .line 1890
    invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Landroid/os/Message;

    .line 1891
    .local v1, "msg":Landroid/os/Message;
    iget v3, v1, Landroid/os/Message;->what:I

    if-ne v3, p1, :cond_1

    const/4 v3, 0x1

    return v3

    .line 1894
    .end local v1    # "msg":Landroid/os/Message;
    :cond_2
    return v4
.end method

.method protected final hasMessages(I)Z
    .locals 2
    .param p1, "what"    # I

    .prologue
    .line 1902
    iget-object v0, p0, Lcom/android/internal/util/StateMachine;->mSmHandler:Lcom/android/internal/util/StateMachine$SmHandler;

    .line 1903
    .local v0, "smh":Lcom/android/internal/util/StateMachine$SmHandler;
    if-nez v0, :cond_0

    const/4 v1, 0x0

    return v1

    .line 1905
    :cond_0
    invoke-virtual {v0, p1}, Lcom/android/internal/util/StateMachine$SmHandler;->hasMessages(I)Z

    move-result v1

    return v1
.end method

.method public isDbg()Z
    .locals 2

    .prologue
    .line 1947
    iget-object v0, p0, Lcom/android/internal/util/StateMachine;->mSmHandler:Lcom/android/internal/util/StateMachine$SmHandler;

    .line 1948
    .local v0, "smh":Lcom/android/internal/util/StateMachine$SmHandler;
    if-nez v0, :cond_0

    const/4 v1, 0x0

    return v1

    .line 1950
    :cond_0
    invoke-static {v0}, Lcom/android/internal/util/StateMachine$SmHandler;->-wrap1(Lcom/android/internal/util/StateMachine$SmHandler;)Z

    move-result v1

    return v1
.end method

.method protected final isQuit(Landroid/os/Message;)Z
    .locals 3
    .param p1, "msg"    # Landroid/os/Message;

    .prologue
    .line 1914
    iget-object v0, p0, Lcom/android/internal/util/StateMachine;->mSmHandler:Lcom/android/internal/util/StateMachine$SmHandler;

    .line 1915
    .local v0, "smh":Lcom/android/internal/util/StateMachine$SmHandler;
    if-nez v0, :cond_1

    iget v1, p1, Landroid/os/Message;->what:I

    const/4 v2, -0x1

    if-ne v1, v2, :cond_0

    const/4 v1, 0x1

    :goto_0
    return v1

    :cond_0
    const/4 v1, 0x0

    goto :goto_0

    .line 1917
    :cond_1
    invoke-static {v0, p1}, Lcom/android/internal/util/StateMachine$SmHandler;->-wrap2(Lcom/android/internal/util/StateMachine$SmHandler;Landroid/os/Message;)Z

    move-result v1

    return v1
.end method

.method protected log(Ljava/lang/String;)V
    .locals 1
    .param p1, "s"    # Ljava/lang/String;

    .prologue
    .line 2023
    iget-object v0, p0, Lcom/android/internal/util/StateMachine;->mName:Ljava/lang/String;

    invoke-static {v0, p1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 2022
    return-void
.end method

.method protected logAndAddLogRec(Ljava/lang/String;)V
    .locals 0
    .param p1, "s"    # Ljava/lang/String;

    .prologue
    .line 2013
    invoke-virtual {p0, p1}, Lcom/android/internal/util/StateMachine;->addLogRec(Ljava/lang/String;)V

    .line 2014
    invoke-virtual {p0, p1}, Lcom/android/internal/util/StateMachine;->log(Ljava/lang/String;)V

    .line 2012
    return-void
.end method

.method protected logd(Ljava/lang/String;)V
    .locals 1
    .param p1, "s"    # Ljava/lang/String;

    .prologue
    .line 2032
    iget-object v0, p0, Lcom/android/internal/util/StateMachine;->mName:Ljava/lang/String;

    invoke-static {v0, p1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 2031
    return-void
.end method

.method protected loge(Ljava/lang/String;)V
    .locals 1
    .param p1, "s"    # Ljava/lang/String;

    .prologue
    .line 2068
    iget-object v0, p0, Lcom/android/internal/util/StateMachine;->mName:Ljava/lang/String;

    invoke-static {v0, p1}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I

    .line 2067
    return-void
.end method

.method protected loge(Ljava/lang/String;Ljava/lang/Throwable;)V
    .locals 1
    .param p1, "s"    # Ljava/lang/String;
    .param p2, "e"    # Ljava/lang/Throwable;

    .prologue
    .line 2078
    iget-object v0, p0, Lcom/android/internal/util/StateMachine;->mName:Ljava/lang/String;

    invoke-static {v0, p1, p2}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I

    .line 2077
    return-void
.end method

.method protected logi(Ljava/lang/String;)V
    .locals 1
    .param p1, "s"    # Ljava/lang/String;

    .prologue
    .line 2050
    iget-object v0, p0, Lcom/android/internal/util/StateMachine;->mName:Ljava/lang/String;

    invoke-static {v0, p1}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I

    .line 2049
    return-void
.end method

.method protected logv(Ljava/lang/String;)V
    .locals 1
    .param p1, "s"    # Ljava/lang/String;

    .prologue
    .line 2041
    iget-object v0, p0, Lcom/android/internal/util/StateMachine;->mName:Ljava/lang/String;

    invoke-static {v0, p1}, Landroid/util/Log;->v(Ljava/lang/String;Ljava/lang/String;)I

    .line 2040
    return-void
.end method

.method protected logw(Ljava/lang/String;)V
    .locals 1
    .param p1, "s"    # Ljava/lang/String;

    .prologue
    .line 2059
    iget-object v0, p0, Lcom/android/internal/util/StateMachine;->mName:Ljava/lang/String;

    invoke-static {v0, p1}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I

    .line 2058
    return-void
.end method

.method public final obtainMessage()Landroid/os/Message;
    .locals 1

    .prologue
    .line 1523
    iget-object v0, p0, Lcom/android/internal/util/StateMachine;->mSmHandler:Lcom/android/internal/util/StateMachine$SmHandler;

    invoke-static {v0}, Landroid/os/Message;->obtain(Landroid/os/Handler;)Landroid/os/Message;

    move-result-object v0

    return-object v0
.end method

.method public final obtainMessage(I)Landroid/os/Message;
    .locals 1
    .param p1, "what"    # I

    .prologue
    .line 1538
    iget-object v0, p0, Lcom/android/internal/util/StateMachine;->mSmHandler:Lcom/android/internal/util/StateMachine$SmHandler;

    invoke-static {v0, p1}, Landroid/os/Message;->obtain(Landroid/os/Handler;I)Landroid/os/Message;

    move-result-object v0

    return-object v0
.end method

.method public final obtainMessage(II)Landroid/os/Message;
    .locals 2
    .param p1, "what"    # I
    .param p2, "arg1"    # I

    .prologue
    .line 1573
    iget-object v0, p0, Lcom/android/internal/util/StateMachine;->mSmHandler:Lcom/android/internal/util/StateMachine$SmHandler;

    const/4 v1, 0x0

    invoke-static {v0, p1, p2, v1}, Landroid/os/Message;->obtain(Landroid/os/Handler;III)Landroid/os/Message;

    move-result-object v0

    return-object v0
.end method

.method public final obtainMessage(III)Landroid/os/Message;
    .locals 1
    .param p1, "what"    # I
    .param p2, "arg1"    # I
    .param p3, "arg2"    # I

    .prologue
    .line 1591
    iget-object v0, p0, Lcom/android/internal/util/StateMachine;->mSmHandler:Lcom/android/internal/util/StateMachine$SmHandler;

    invoke-static {v0, p1, p2, p3}, Landroid/os/Message;->obtain(Landroid/os/Handler;III)Landroid/os/Message;

    move-result-object v0

    return-object v0
.end method

.method public final obtainMessage(IIILjava/lang/Object;)Landroid/os/Message;
    .locals 1
    .param p1, "what"    # I
    .param p2, "arg1"    # I
    .param p3, "arg2"    # I
    .param p4, "obj"    # Ljava/lang/Object;

    .prologue
    .line 1610
    iget-object v0, p0, Lcom/android/internal/util/StateMachine;->mSmHandler:Lcom/android/internal/util/StateMachine$SmHandler;

    invoke-static {v0, p1, p2, p3, p4}, Landroid/os/Message;->obtain(Landroid/os/Handler;IIILjava/lang/Object;)Landroid/os/Message;

    move-result-object v0

    return-object v0
.end method

.method public final obtainMessage(ILjava/lang/Object;)Landroid/os/Message;
    .locals 1
    .param p1, "what"    # I
    .param p2, "obj"    # Ljava/lang/Object;

    .prologue
    .line 1555
    iget-object v0, p0, Lcom/android/internal/util/StateMachine;->mSmHandler:Lcom/android/internal/util/StateMachine$SmHandler;

    invoke-static {v0, p1, p2}, Landroid/os/Message;->obtain(Landroid/os/Handler;ILjava/lang/Object;)Landroid/os/Message;

    move-result-object v0

    return-object v0
.end method

.method protected onHalting()V
    .locals 0

    .prologue
    .line 1386
    return-void
.end method

.method protected onQuitting()V
    .locals 0

    .prologue
    .line 1395
    return-void
.end method

.method protected final quit()V
    .locals 1

    .prologue
    .line 1925
    iget-object v0, p0, Lcom/android/internal/util/StateMachine;->mSmHandler:Lcom/android/internal/util/StateMachine$SmHandler;

    .line 1926
    .local v0, "smh":Lcom/android/internal/util/StateMachine$SmHandler;
    if-nez v0, :cond_0

    return-void

    .line 1928
    :cond_0
    invoke-static {v0}, Lcom/android/internal/util/StateMachine$SmHandler;->-wrap8(Lcom/android/internal/util/StateMachine$SmHandler;)V

    .line 1923
    return-void
.end method

.method protected final quitNow()V
    .locals 1

    .prologue
    .line 1936
    iget-object v0, p0, Lcom/android/internal/util/StateMachine;->mSmHandler:Lcom/android/internal/util/StateMachine$SmHandler;

    .line 1937
    .local v0, "smh":Lcom/android/internal/util/StateMachine$SmHandler;
    if-nez v0, :cond_0

    return-void

    .line 1939
    :cond_0
    invoke-static {v0}, Lcom/android/internal/util/StateMachine$SmHandler;->-wrap7(Lcom/android/internal/util/StateMachine$SmHandler;)V

    .line 1934
    return-void
.end method

.method protected recordLogRec(Landroid/os/Message;)Z
    .locals 1
    .param p1, "msg"    # Landroid/os/Message;

    .prologue
    .line 1484
    const/4 v0, 0x1

    return v0
.end method

.method protected final removeDeferredMessages(I)V
    .locals 4
    .param p1, "what"    # I

    .prologue
    .line 1871
    iget-object v2, p0, Lcom/android/internal/util/StateMachine;->mSmHandler:Lcom/android/internal/util/StateMachine$SmHandler;

    .line 1872
    .local v2, "smh":Lcom/android/internal/util/StateMachine$SmHandler;
    if-nez v2, :cond_0

    return-void

    .line 1874
    :cond_0
    invoke-static {v2}, Lcom/android/internal/util/StateMachine$SmHandler;->-get1(Lcom/android/internal/util/StateMachine$SmHandler;)Ljava/util/ArrayList;

    move-result-object v3

    invoke-virtual {v3}, Ljava/util/ArrayList;->iterator()Ljava/util/Iterator;

    move-result-object v0

    .line 1875
    .local v0, "iterator":Ljava/util/Iterator;, "Ljava/util/Iterator<Landroid/os/Message;>;"
    :cond_1
    :goto_0
    invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z

    move-result v3

    if-eqz v3, :cond_2

    .line 1876
    invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Landroid/os/Message;

    .line 1877
    .local v1, "msg":Landroid/os/Message;
    iget v3, v1, Landroid/os/Message;->what:I

    if-ne v3, p1, :cond_1

    invoke-interface {v0}, Ljava/util/Iterator;->remove()V

    goto :goto_0

    .line 1870
    .end local v1    # "msg":Landroid/os/Message;
    :cond_2
    return-void
.end method

.method protected final removeMessages(I)V
    .locals 1
    .param p1, "what"    # I

    .prologue
    .line 1861
    iget-object v0, p0, Lcom/android/internal/util/StateMachine;->mSmHandler:Lcom/android/internal/util/StateMachine$SmHandler;

    .line 1862
    .local v0, "smh":Lcom/android/internal/util/StateMachine$SmHandler;
    if-nez v0, :cond_0

    return-void

    .line 1864
    :cond_0
    invoke-virtual {v0, p1}, Lcom/android/internal/util/StateMachine$SmHandler;->removeMessages(I)V

    .line 1859
    return-void
.end method

.method public final sendMessage(I)V
    .locals 2
    .param p1, "what"    # I

    .prologue
    .line 1620
    iget-object v0, p0, Lcom/android/internal/util/StateMachine;->mSmHandler:Lcom/android/internal/util/StateMachine$SmHandler;

    .line 1621
    .local v0, "smh":Lcom/android/internal/util/StateMachine$SmHandler;
    if-nez v0, :cond_0

    return-void

    .line 1623
    :cond_0
    invoke-virtual {p0, p1}, Lcom/android/internal/util/StateMachine;->obtainMessage(I)Landroid/os/Message;

    move-result-object v1

    invoke-virtual {v0, v1}, Lcom/android/internal/util/StateMachine$SmHandler;->sendMessage(Landroid/os/Message;)Z

    .line 1618
    return-void
.end method

.method public final sendMessage(II)V
    .locals 2
    .param p1, "what"    # I
    .param p2, "arg1"    # I

    .prologue
    .line 1646
    iget-object v0, p0, Lcom/android/internal/util/StateMachine;->mSmHandler:Lcom/android/internal/util/StateMachine$SmHandler;

    .line 1647
    .local v0, "smh":Lcom/android/internal/util/StateMachine$SmHandler;
    if-nez v0, :cond_0

    return-void

    .line 1649
    :cond_0
    invoke-virtual {p0, p1, p2}, Lcom/android/internal/util/StateMachine;->obtainMessage(II)Landroid/os/Message;

    move-result-object v1

    invoke-virtual {v0, v1}, Lcom/android/internal/util/StateMachine$SmHandler;->sendMessage(Landroid/os/Message;)Z

    .line 1644
    return-void
.end method

.method public final sendMessage(III)V
    .locals 2
    .param p1, "what"    # I
    .param p2, "arg1"    # I
    .param p3, "arg2"    # I

    .prologue
    .line 1659
    iget-object v0, p0, Lcom/android/internal/util/StateMachine;->mSmHandler:Lcom/android/internal/util/StateMachine$SmHandler;

    .line 1660
    .local v0, "smh":Lcom/android/internal/util/StateMachine$SmHandler;
    if-nez v0, :cond_0

    return-void

    .line 1662
    :cond_0
    invoke-virtual {p0, p1, p2, p3}, Lcom/android/internal/util/StateMachine;->obtainMessage(III)Landroid/os/Message;

    move-result-object v1

    invoke-virtual {v0, v1}, Lcom/android/internal/util/StateMachine$SmHandler;->sendMessage(Landroid/os/Message;)Z

    .line 1657
    return-void
.end method

.method public final sendMessage(IIILjava/lang/Object;)V
    .locals 2
    .param p1, "what"    # I
    .param p2, "arg1"    # I
    .param p3, "arg2"    # I
    .param p4, "obj"    # Ljava/lang/Object;

    .prologue
    .line 1672
    iget-object v0, p0, Lcom/android/internal/util/StateMachine;->mSmHandler:Lcom/android/internal/util/StateMachine$SmHandler;

    .line 1673
    .local v0, "smh":Lcom/android/internal/util/StateMachine$SmHandler;
    if-nez v0, :cond_0

    return-void

    .line 1675
    :cond_0
    invoke-virtual {p0, p1, p2, p3, p4}, Lcom/android/internal/util/StateMachine;->obtainMessage(IIILjava/lang/Object;)Landroid/os/Message;

    move-result-object v1

    invoke-virtual {v0, v1}, Lcom/android/internal/util/StateMachine$SmHandler;->sendMessage(Landroid/os/Message;)Z

    .line 1670
    return-void
.end method

.method public final sendMessage(ILjava/lang/Object;)V
    .locals 2
    .param p1, "what"    # I
    .param p2, "obj"    # Ljava/lang/Object;

    .prologue
    .line 1633
    iget-object v0, p0, Lcom/android/internal/util/StateMachine;->mSmHandler:Lcom/android/internal/util/StateMachine$SmHandler;

    .line 1634
    .local v0, "smh":Lcom/android/internal/util/StateMachine$SmHandler;
    if-nez v0, :cond_0

    return-void

    .line 1636
    :cond_0
    invoke-virtual {p0, p1, p2}, Lcom/android/internal/util/StateMachine;->obtainMessage(ILjava/lang/Object;)Landroid/os/Message;

    move-result-object v1

    invoke-virtual {v0, v1}, Lcom/android/internal/util/StateMachine$SmHandler;->sendMessage(Landroid/os/Message;)Z

    .line 1631
    return-void
.end method

.method public final sendMessage(Landroid/os/Message;)V
    .locals 1
    .param p1, "msg"    # Landroid/os/Message;

    .prologue
    .line 1685
    iget-object v0, p0, Lcom/android/internal/util/StateMachine;->mSmHandler:Lcom/android/internal/util/StateMachine$SmHandler;

    .line 1686
    .local v0, "smh":Lcom/android/internal/util/StateMachine$SmHandler;
    if-nez v0, :cond_0

    return-void

    .line 1688
    :cond_0
    invoke-virtual {v0, p1}, Lcom/android/internal/util/StateMachine$SmHandler;->sendMessage(Landroid/os/Message;)Z

    .line 1683
    return-void
.end method

.method protected final sendMessageAtFrontOfQueue(I)V
    .locals 2
    .param p1, "what"    # I

    .prologue
    .line 1778
    iget-object v0, p0, Lcom/android/internal/util/StateMachine;->mSmHandler:Lcom/android/internal/util/StateMachine$SmHandler;

    .line 1779
    .local v0, "smh":Lcom/android/internal/util/StateMachine$SmHandler;
    if-nez v0, :cond_0

    return-void

    .line 1781
    :cond_0
    invoke-virtual {p0, p1}, Lcom/android/internal/util/StateMachine;->obtainMessage(I)Landroid/os/Message;

    move-result-object v1

    invoke-virtual {v0, v1}, Lcom/android/internal/util/StateMachine$SmHandler;->sendMessageAtFrontOfQueue(Landroid/os/Message;)Z

    .line 1776
    return-void
.end method

.method protected final sendMessageAtFrontOfQueue(II)V
    .locals 2
    .param p1, "what"    # I
    .param p2, "arg1"    # I

    .prologue
    .line 1806
    iget-object v0, p0, Lcom/android/internal/util/StateMachine;->mSmHandler:Lcom/android/internal/util/StateMachine$SmHandler;

    .line 1807
    .local v0, "smh":Lcom/android/internal/util/StateMachine$SmHandler;
    if-nez v0, :cond_0

    return-void

    .line 1809
    :cond_0
    invoke-virtual {p0, p1, p2}, Lcom/android/internal/util/StateMachine;->obtainMessage(II)Landroid/os/Message;

    move-result-object v1

    invoke-virtual {v0, v1}, Lcom/android/internal/util/StateMachine$SmHandler;->sendMessageAtFrontOfQueue(Landroid/os/Message;)Z

    .line 1804
    return-void
.end method

.method protected final sendMessageAtFrontOfQueue(III)V
    .locals 2
    .param p1, "what"    # I
    .param p2, "arg1"    # I
    .param p3, "arg2"    # I

    .prologue
    .line 1821
    iget-object v0, p0, Lcom/android/internal/util/StateMachine;->mSmHandler:Lcom/android/internal/util/StateMachine$SmHandler;

    .line 1822
    .local v0, "smh":Lcom/android/internal/util/StateMachine$SmHandler;
    if-nez v0, :cond_0

    return-void

    .line 1824
    :cond_0
    invoke-virtual {p0, p1, p2, p3}, Lcom/android/internal/util/StateMachine;->obtainMessage(III)Landroid/os/Message;

    move-result-object v1

    invoke-virtual {v0, v1}, Lcom/android/internal/util/StateMachine$SmHandler;->sendMessageAtFrontOfQueue(Landroid/os/Message;)Z

    .line 1819
    return-void
.end method

.method protected final sendMessageAtFrontOfQueue(IIILjava/lang/Object;)V
    .locals 2
    .param p1, "what"    # I
    .param p2, "arg1"    # I
    .param p3, "arg2"    # I
    .param p4, "obj"    # Ljava/lang/Object;

    .prologue
    .line 1835
    iget-object v0, p0, Lcom/android/internal/util/StateMachine;->mSmHandler:Lcom/android/internal/util/StateMachine$SmHandler;

    .line 1836
    .local v0, "smh":Lcom/android/internal/util/StateMachine$SmHandler;
    if-nez v0, :cond_0

    return-void

    .line 1838
    :cond_0
    invoke-virtual {p0, p1, p2, p3, p4}, Lcom/android/internal/util/StateMachine;->obtainMessage(IIILjava/lang/Object;)Landroid/os/Message;

    move-result-object v1

    invoke-virtual {v0, v1}, Lcom/android/internal/util/StateMachine$SmHandler;->sendMessageAtFrontOfQueue(Landroid/os/Message;)Z

    .line 1833
    return-void
.end method

.method protected final sendMessageAtFrontOfQueue(ILjava/lang/Object;)V
    .locals 2
    .param p1, "what"    # I
    .param p2, "obj"    # Ljava/lang/Object;

    .prologue
    .line 1792
    iget-object v0, p0, Lcom/android/internal/util/StateMachine;->mSmHandler:Lcom/android/internal/util/StateMachine$SmHandler;

    .line 1793
    .local v0, "smh":Lcom/android/internal/util/StateMachine$SmHandler;
    if-nez v0, :cond_0

    return-void

    .line 1795
    :cond_0
    invoke-virtual {p0, p1, p2}, Lcom/android/internal/util/StateMachine;->obtainMessage(ILjava/lang/Object;)Landroid/os/Message;

    move-result-object v1

    invoke-virtual {v0, v1}, Lcom/android/internal/util/StateMachine$SmHandler;->sendMessageAtFrontOfQueue(Landroid/os/Message;)Z

    .line 1790
    return-void
.end method

.method protected final sendMessageAtFrontOfQueue(Landroid/os/Message;)V
    .locals 1
    .param p1, "msg"    # Landroid/os/Message;

    .prologue
    .line 1849
    iget-object v0, p0, Lcom/android/internal/util/StateMachine;->mSmHandler:Lcom/android/internal/util/StateMachine$SmHandler;

    .line 1850
    .local v0, "smh":Lcom/android/internal/util/StateMachine$SmHandler;
    if-nez v0, :cond_0

    return-void

    .line 1852
    :cond_0
    invoke-virtual {v0, p1}, Lcom/android/internal/util/StateMachine$SmHandler;->sendMessageAtFrontOfQueue(Landroid/os/Message;)Z

    .line 1847
    return-void
.end method

.method public final sendMessageDelayed(IIIJ)V
    .locals 2
    .param p1, "what"    # I
    .param p2, "arg1"    # I
    .param p3, "arg2"    # I
    .param p4, "delayMillis"    # J

    .prologue
    .line 1737
    iget-object v0, p0, Lcom/android/internal/util/StateMachine;->mSmHandler:Lcom/android/internal/util/StateMachine$SmHandler;

    .line 1738
    .local v0, "smh":Lcom/android/internal/util/StateMachine$SmHandler;
    if-nez v0, :cond_0

    return-void

    .line 1740
    :cond_0
    invoke-virtual {p0, p1, p2, p3}, Lcom/android/internal/util/StateMachine;->obtainMessage(III)Landroid/os/Message;

    move-result-object v1

    invoke-virtual {v0, v1, p4, p5}, Lcom/android/internal/util/StateMachine$SmHandler;->sendMessageDelayed(Landroid/os/Message;J)Z

    .line 1735
    return-void
.end method

.method public final sendMessageDelayed(IIILjava/lang/Object;J)V
    .locals 3
    .param p1, "what"    # I
    .param p2, "arg1"    # I
    .param p3, "arg2"    # I
    .param p4, "obj"    # Ljava/lang/Object;
    .param p5, "delayMillis"    # J

    .prologue
    .line 1751
    iget-object v0, p0, Lcom/android/internal/util/StateMachine;->mSmHandler:Lcom/android/internal/util/StateMachine$SmHandler;

    .line 1752
    .local v0, "smh":Lcom/android/internal/util/StateMachine$SmHandler;
    if-nez v0, :cond_0

    return-void

    .line 1754
    :cond_0
    invoke-virtual {p0, p1, p2, p3, p4}, Lcom/android/internal/util/StateMachine;->obtainMessage(IIILjava/lang/Object;)Landroid/os/Message;

    move-result-object v1

    invoke-virtual {v0, v1, p5, p6}, Lcom/android/internal/util/StateMachine$SmHandler;->sendMessageDelayed(Landroid/os/Message;J)Z

    .line 1749
    return-void
.end method

.method public final sendMessageDelayed(IIJ)V
    .locals 3
    .param p1, "what"    # I
    .param p2, "arg1"    # I
    .param p3, "delayMillis"    # J

    .prologue
    .line 1724
    iget-object v0, p0, Lcom/android/internal/util/StateMachine;->mSmHandler:Lcom/android/internal/util/StateMachine$SmHandler;

    .line 1725
    .local v0, "smh":Lcom/android/internal/util/StateMachine$SmHandler;
    if-nez v0, :cond_0

    return-void

    .line 1727
    :cond_0
    invoke-virtual {p0, p1, p2}, Lcom/android/internal/util/StateMachine;->obtainMessage(II)Landroid/os/Message;

    move-result-object v1

    invoke-virtual {v0, v1, p3, p4}, Lcom/android/internal/util/StateMachine$SmHandler;->sendMessageDelayed(Landroid/os/Message;J)Z

    .line 1722
    return-void
.end method

.method public final sendMessageDelayed(IJ)V
    .locals 2
    .param p1, "what"    # I
    .param p2, "delayMillis"    # J

    .prologue
    .line 1698
    iget-object v0, p0, Lcom/android/internal/util/StateMachine;->mSmHandler:Lcom/android/internal/util/StateMachine$SmHandler;

    .line 1699
    .local v0, "smh":Lcom/android/internal/util/StateMachine$SmHandler;
    if-nez v0, :cond_0

    return-void

    .line 1701
    :cond_0
    invoke-virtual {p0, p1}, Lcom/android/internal/util/StateMachine;->obtainMessage(I)Landroid/os/Message;

    move-result-object v1

    invoke-virtual {v0, v1, p2, p3}, Lcom/android/internal/util/StateMachine$SmHandler;->sendMessageDelayed(Landroid/os/Message;J)Z

    .line 1696
    return-void
.end method

.method public final sendMessageDelayed(ILjava/lang/Object;J)V
    .locals 3
    .param p1, "what"    # I
    .param p2, "obj"    # Ljava/lang/Object;
    .param p3, "delayMillis"    # J

    .prologue
    .line 1711
    iget-object v0, p0, Lcom/android/internal/util/StateMachine;->mSmHandler:Lcom/android/internal/util/StateMachine$SmHandler;

    .line 1712
    .local v0, "smh":Lcom/android/internal/util/StateMachine$SmHandler;
    if-nez v0, :cond_0

    return-void

    .line 1714
    :cond_0
    invoke-virtual {p0, p1, p2}, Lcom/android/internal/util/StateMachine;->obtainMessage(ILjava/lang/Object;)Landroid/os/Message;

    move-result-object v1

    invoke-virtual {v0, v1, p3, p4}, Lcom/android/internal/util/StateMachine$SmHandler;->sendMessageDelayed(Landroid/os/Message;J)Z

    .line 1709
    return-void
.end method

.method public final sendMessageDelayed(Landroid/os/Message;J)V
    .locals 2
    .param p1, "msg"    # Landroid/os/Message;
    .param p2, "delayMillis"    # J

    .prologue
    .line 1764
    iget-object v0, p0, Lcom/android/internal/util/StateMachine;->mSmHandler:Lcom/android/internal/util/StateMachine$SmHandler;

    .line 1765
    .local v0, "smh":Lcom/android/internal/util/StateMachine$SmHandler;
    if-nez v0, :cond_0

    return-void

    .line 1767
    :cond_0
    invoke-virtual {v0, p1, p2, p3}, Lcom/android/internal/util/StateMachine$SmHandler;->sendMessageDelayed(Landroid/os/Message;J)Z

    .line 1762
    return-void
.end method

.method public setDbg(Z)V
    .locals 1
    .param p1, "dbg"    # Z

    .prologue
    .line 1960
    iget-object v0, p0, Lcom/android/internal/util/StateMachine;->mSmHandler:Lcom/android/internal/util/StateMachine$SmHandler;

    .line 1961
    .local v0, "smh":Lcom/android/internal/util/StateMachine$SmHandler;
    if-nez v0, :cond_0

    return-void

    .line 1963
    :cond_0
    invoke-static {v0, p1}, Lcom/android/internal/util/StateMachine$SmHandler;->-wrap9(Lcom/android/internal/util/StateMachine$SmHandler;Z)V

    .line 1958
    return-void
.end method

.method protected final setInitialState(Lcom/android/internal/util/State;)V
    .locals 1
    .param p1, "initialState"    # Lcom/android/internal/util/State;

    .prologue
    .line 1300
    iget-object v0, p0, Lcom/android/internal/util/StateMachine;->mSmHandler:Lcom/android/internal/util/StateMachine$SmHandler;

    invoke-static {v0, p1}, Lcom/android/internal/util/StateMachine$SmHandler;->-wrap10(Lcom/android/internal/util/StateMachine$SmHandler;Lcom/android/internal/util/State;)V

    .line 1299
    return-void
.end method

.method public final setLogOnlyTransitions(Z)V
    .locals 1
    .param p1, "enable"    # Z

    .prologue
    .line 1420
    iget-object v0, p0, Lcom/android/internal/util/StateMachine;->mSmHandler:Lcom/android/internal/util/StateMachine$SmHandler;

    invoke-static {v0}, Lcom/android/internal/util/StateMachine$SmHandler;->-get4(Lcom/android/internal/util/StateMachine$SmHandler;)Lcom/android/internal/util/StateMachine$LogRecords;

    move-result-object v0

    invoke-virtual {v0, p1}, Lcom/android/internal/util/StateMachine$LogRecords;->setLogOnlyTransitions(Z)V

    .line 1419
    return-void
.end method

.method public final setLogRecSize(I)V
    .locals 1
    .param p1, "maxSize"    # I

    .prologue
    .line 1411
    iget-object v0, p0, Lcom/android/internal/util/StateMachine;->mSmHandler:Lcom/android/internal/util/StateMachine$SmHandler;

    invoke-static {v0}, Lcom/android/internal/util/StateMachine$SmHandler;->-get4(Lcom/android/internal/util/StateMachine$SmHandler;)Lcom/android/internal/util/StateMachine$LogRecords;

    move-result-object v0

    invoke-virtual {v0, p1}, Lcom/android/internal/util/StateMachine$LogRecords;->setSize(I)V

    .line 1410
    return-void
.end method

.method public start()V
    .locals 1

    .prologue
    .line 1971
    iget-object v0, p0, Lcom/android/internal/util/StateMachine;->mSmHandler:Lcom/android/internal/util/StateMachine$SmHandler;

    .line 1972
    .local v0, "smh":Lcom/android/internal/util/StateMachine$SmHandler;
    if-nez v0, :cond_0

    return-void

    .line 1975
    :cond_0
    invoke-static {v0}, Lcom/android/internal/util/StateMachine$SmHandler;->-wrap5(Lcom/android/internal/util/StateMachine$SmHandler;)V

    .line 1969
    return-void
.end method

.method public toString()Ljava/lang/String;
    .locals 3

    .prologue
    const/4 v2, 0x0

    .line 1999
    new-instance v1, Ljava/io/StringWriter;

    invoke-direct {v1}, Ljava/io/StringWriter;-><init>()V

    .line 2000
    .local v1, "sr":Ljava/io/StringWriter;
    new-instance v0, Ljava/io/PrintWriter;

    invoke-direct {v0, v1}, Ljava/io/PrintWriter;-><init>(Ljava/io/Writer;)V

    .line 2001
    .local v0, "pr":Ljava/io/PrintWriter;
    invoke-virtual {p0, v2, v0, v2}, Lcom/android/internal/util/StateMachine;->dump(Ljava/io/FileDescriptor;Ljava/io/PrintWriter;[Ljava/lang/String;)V

    .line 2002
    invoke-virtual {v0}, Ljava/io/PrintWriter;->flush()V

    .line 2003
    invoke-virtual {v0}, Ljava/io/PrintWriter;->close()V

    .line 2004
    invoke-virtual {v1}, Ljava/io/StringWriter;->toString()Ljava/lang/String;

    move-result-object v2

    return-object v2
.end method

.method protected final transitionTo(Lcom/android/internal/util/IState;)V
    .locals 1
    .param p1, "destState"    # Lcom/android/internal/util/IState;

    .prologue
    .line 1338
    iget-object v0, p0, Lcom/android/internal/util/StateMachine;->mSmHandler:Lcom/android/internal/util/StateMachine$SmHandler;

    invoke-static {v0, p1}, Lcom/android/internal/util/StateMachine$SmHandler;->-wrap11(Lcom/android/internal/util/StateMachine$SmHandler;Lcom/android/internal/util/IState;)V

    .line 1337
    return-void
.end method

.method protected final transitionToHaltingState()V
    .locals 2

    .prologue
    .line 1349
    iget-object v0, p0, Lcom/android/internal/util/StateMachine;->mSmHandler:Lcom/android/internal/util/StateMachine$SmHandler;

    iget-object v1, p0, Lcom/android/internal/util/StateMachine;->mSmHandler:Lcom/android/internal/util/StateMachine$SmHandler;

    invoke-static {v1}, Lcom/android/internal/util/StateMachine$SmHandler;->-get3(Lcom/android/internal/util/StateMachine$SmHandler;)Lcom/android/internal/util/StateMachine$SmHandler$HaltingState;

    move-result-object v1

    invoke-static {v0, v1}, Lcom/android/internal/util/StateMachine$SmHandler;->-wrap11(Lcom/android/internal/util/StateMachine$SmHandler;Lcom/android/internal/util/IState;)V

    .line 1348
    return-void
.end method

.method protected unhandledMessage(Landroid/os/Message;)V
    .locals 2
    .param p1, "msg"    # Landroid/os/Message;

    .prologue
    .line 1371
    iget-object v0, p0, Lcom/android/internal/util/StateMachine;->mSmHandler:Lcom/android/internal/util/StateMachine$SmHandler;

    invoke-static {v0}, Lcom/android/internal/util/StateMachine$SmHandler;->-get0(Lcom/android/internal/util/StateMachine$SmHandler;)Z

    move-result v0

    if-eqz v0, :cond_0

    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    const-string/jumbo v1, " - unhandledMessage: msg.what="

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    iget v1, p1, Landroid/os/Message;->what:I

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-virtual {p0, v0}, Lcom/android/internal/util/StateMachine;->loge(Ljava/lang/String;)V

    .line 1370
    :cond_0
    return-void
.end method


text:
package clt

import (
	"bufio"
	"bytes"
	"testing"

	"github.com/BTBurke/snapshot"
)

func WithTestInput(input string) (*InteractiveSession, *bytes.Buffer) {
	var out bytes.Buffer
	return &InteractiveSession{
		input:  bufio.NewReader(bytes.NewBufferString(input)),
		output: &out,
	}, &out
}

func TestSay(t *testing.T) {

	tt := []struct {
		Name       string
		Method     string
		Prompt     string
		Default    string
		ValHint    string
		Options    map[string]string
		Input      string
		Resp       string
		Validators []ValidationFunc
	}{
		{Name: "simple ask", Method: "ask", Prompt: "Did this work", Input: "yes\n", Resp: "yes"},
		{Name: "simple yn", Method: "yn", Prompt: "Do you want this to work", Input: "y", Default: "n", Resp: "y"},
		{Name: "retry yn", Method: "yn", Prompt: "Do you want this to work", Input: "q\ny", Default: "n", Resp: "y"},
	}
	for _, tc := range tt {
		t.Run(tc.Name, func(t *testing.T) {
			sess, buf := WithTestInput(tc.Input)

			var got string
			switch tc.Method {
			case "ask":
				got = sess.ask(tc.Prompt, tc.Default, tc.ValHint, tc.Validators...)
			case "yn":
				got = sess.AskYesNo(tc.Prompt, tc.Default)
			default:
				t.Errorf("unexpected test: %s", tc.Method)
			}
			if tc.Resp != got {
				t.Errorf("interactive session returned bad response, expected %s, got %s", tc.Resp, got)
			}
			snapshot.Assert(t, buf.Bytes())
		})

	}
}


text:
// UGLight.h: interface for the UGLight class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_UGLIGHT_H__7A46AF17_BFD1_4C51_8148_C638C4D9EB3B__INCLUDED_)
#define AFX_UGLIGHT_H__7A46AF17_BFD1_4C51_8148_C638C4D9EB3B__INCLUDED_

#include "Scene/UGPrerequisites.h"
#include "Scene/UGAngle.h"
#include "Scene/UGColorValue.h"
#include "Scene/UGVector3R.h"
#include "Scene/UGMovableObject.h"
#include "Scene/UGQuaternion4d.h"

namespace UGC
{
class SCENE_API UGLight : public UGMovableObject
{
public:
	enum LightTypes
    {
        /// Point light sources give off light equally in all directions, so require only position not direction
        LT_POINT,
		/// Directional lights simulate parallel light beams from a distant source, hence have direction but no position
		LT_DIRECTIONAL,
		/// Spotlights simulate a cone of light from a source so require position and direction, plus extra values for falloff
		LT_SPOTLIGHT
    };

	UGLight();
	UGLight(const UGString& name);
	UGLight(const UGString& name, UGScene* pCreator);
	~UGLight();

    void SetType(LightTypes type);
    LightTypes GetType() const;

	void SetDiffuseColour(UGReal red, UGReal green, UGReal blue);
	void SetDiffuseColour(const UGColorValue& colour);
	UGColorValue GetDiffuseColour() const;

//	void SetAmbientColour(UGReal red, UGReal green, UGReal blue);
//	void SetAmbientColour(const UGColorValue& colour);
//	UGColorValue GetAmbientColour() const;

	void SetSpecularColour(UGReal red, UGReal green, UGReal blue);
	void SetSpecularColour(const UGColorValue& colour);
	UGColorValue GetSpecularColour() const;

	void SetAttenuation(UGReal range, UGReal constant, UGReal linear, UGReal quadratic);
	UGReal GetAttenuationRange() const;
	UGReal GetAttenuationConstant() const;
	UGReal GetAttenuationLinear() const;
	UGReal GetAttenuationQuadric() const;

	void SetPosition(UGReal x, UGReal y, UGReal z);
	void SetPosition(const UGVector3R& vec);
	UGVector3R GetPosition() const;

	void SetDirection(UGReal x, UGReal y, UGReal z);
	void SetDirection(const UGVector3R& vec);
	UGVector3R GetDirection() const;

	void SetSpotlightRange(UGReal innerAngle, UGReal outerAngle, UGReal falloff = 1.0);
	void SetSpotlightInnerAngle(UGReal val);
	UGReal GetSpotlightInnerAngle(void) const;
	void SetSpotlightOuterAngle(UGReal val);
	UGReal GetSpotlightOuterAngle() const;
	void SetSpotlightFalloff(UGReal val);
	UGReal GetSpotlightFalloff() const;

	UGVector4R GetAs4DVector() const;
	void SetPowerScale(UGReal power);
	UGReal GetPowerScale() const;

	UGVector3R GetDerivedPosition() const;
	UGVector3R GetDerivedDirection() const;

//	const AxisAlignedBox& GetBoundingBox(void) const;
//	void _updateRenderQueue(RenderQueue* queue);
//	const String& GetMovableType(void) const;
//	void SetVisible(bool visible);
//	virtual const PlaneBoundedVolume& _GetNearClipVolume(const Camera* const cam) const;
//	virtual const PlaneBoundedVolumeList& _GetFrustumClipVolumes(const Camera* const cam) const;
//	UGReal GetBoundingRadius(void) const { return 0; /* not visible */ }
//	uint32 GetTypeFlags(void) const;
//	AnimableValuePtr createAnimableValue(const String& valueName);

protected:
	void Update() const;

protected:
	LightTypes m_LightType;
	UGReal m_fSpotFalloff;
	UGReal m_fSpotInner;
	UGReal m_fSpotOuter;
	UGColorValue m_Diffuse;
	UGColorValue m_Specular;
	mutable UGVector3R m_vecDerivedPosition;
 	mutable UGVector3R m_vecDerivedDirection;
	UGReal m_fRange;
	UGReal m_fPowerScale;
	UGReal m_fAttenuationConst;
	UGReal m_fAttenuationLinear;
	UGReal m_fAttenuationQuad;

	UGVector3R m_vecPosition;
	UGVector3R m_vecDirection;

	mutable UGQuaternion4d m_quaLastParentOrientation;
	mutable UGVector3R m_vecLastParentPosition;

	mutable UGbool m_bLocalTransformDirty;
public:
	static UGString FACTORY_TYPE_NAME;
};
typedef UGList<UGLight*> UGLightList;

}
#endif // !defined(AFX_UGLIGHT_H__7A46AF17_BFD1_4C51_8148_C638C4D9EB3B__INCLUDED_)


text:
{% extends "backboneLayout.html" %}

{% block more_scripts %}
<script>
    //ANSWERLIST_API_URL = "{% url api_dispatch_list api_name="personal_data" resource_name="answerlist" %}";
    //ANSWERLIST_KEY = "socialhealth";
    MEETUP_REQUEST_API_URL = "{% url api_dispatch_list api_name="personal_data" resource_name="meetup_request" %}";
    PROFILE_API_URL = "{{ PROFILE_API_URL }}"
</script>

<script src="{{ STATIC_URL }}js/profile.js"></script>
<script src="{{ STATIC_URL }}js/meetup.js"></script>
<script>
$(function () {
    window.createRequestApp = new CreateMeetupRequestView({ autocomplete: true, container: $(".container")});
//	window.radialApp = new SocialHealthRadialView();
//	$(window).bind("resize", function () { radialApp.render(); });
});
</script>

{% endblock %}

{% block content %}
{% endblock %}


text:
import MockAdapter from 'axios-mock-adapter';

import LineClient from '../LineClient';

const ACCESS_TOKEN = '1234567890';
const CHANNEL_SECRET = 'so-secret';

const createMock = (): {
  client: LineClient;
  mock: MockAdapter;
  headers: {
    Accept: string;
    'Content-Type': string;
    Authorization: string;
  };
} => {
  const client = new LineClient({
    accessToken: ACCESS_TOKEN,
    channelSecret: CHANNEL_SECRET,
  });
  const mock = new MockAdapter(client.axios);
  const headers = {
    Accept: 'application/json, text/plain, */*',
    'Content-Type': 'application/json',
    Authorization: `Bearer ${ACCESS_TOKEN}`,
  };
  return { client, mock, headers };
};

describe('Audience', () => {
  describe('#createUploadAudienceGroup', () => {
    const reply = {
      audienceGroupId: 4389303728991,
      type: 'UPLOAD',
      description: 'test',
      created: 1500351844,
    };

    const body = {
      description: 'audienceGroupName',
      isIfaAudience: false,
      audiences: [
        {
          id: '1',
        },
      ],
      uploadDescription: 'audience1',
    };

    it('should call createUploadAudienceGroup api', async () => {
      expect.assertions(4);

      const { client, mock, headers } = createMock();

      mock.onPost().reply((config) => {
        expect(config.url).toEqual('/v2/bot/audienceGroup/upload');
        expect(JSON.parse(config.data)).toEqual(body);
        expect(config.headers).toEqual(headers);
        return [200, reply];
      });

      const res = await client.createUploadAudienceGroup(
        'audienceGroupName',
        false,
        [
          {
            id: '1',
          },
        ],
        {
          uploadDescription: 'audience1',
        }
      );

      expect(res).toEqual(reply);
    });
  });

  describe('#updateUploadAudienceGroup', () => {
    const reply = {};

    const body = {
      audienceGroupId: 1,
      audiences: [
        {
          id: '1',
        },
      ],
      description: 'audienceGroupName',
      uploadDescription: 'audience1',
    };

    it('should call updateUploadAudienceGroup api', async () => {
      expect.assertions(4);

      const { client, mock, headers } = createMock();

      mock.onPut().reply((config) => {
        expect(config.url).toEqual('/v2/bot/audienceGroup/upload');
        expect(JSON.parse(config.data)).toEqual(body);
        expect(config.headers).toEqual(headers);
        return [200, reply];
      });

      const res = await client.updateUploadAudienceGroup(
        1,
        [
          {
            id: '1',
          },
        ],
        {
          description: 'audienceGroupName',
          uploadDescription: 'audience1',
        }
      );

      expect(res).toEqual(reply);
    });
  });

  describe('#createClickAudienceGroup', () => {
    const reply = {
      audienceGroupId: 4389303728991,
      type: 'CLICK',
      description: 'test',
      created: 1500351844,
      requestId: 'f70dd685-499a-4231-a441-f24b8d4fba21',
      clickUrl: null,
    };

    const body = {
      description: 'audienceGroupName',
      requestId: '12222',
      clickUrl: 'https://line.me/en',
    };

    it('should call createClickAudienceGroup api', async () => {
      expect.assertions(4);

      const { client, mock, headers } = createMock();

      mock.onPost().reply((config) => {
        expect(config.url).toEqual('/v2/bot/audienceGroup/click');
        expect(JSON.parse(config.data)).toEqual(body);
        expect(config.headers).toEqual(headers);
        return [200, reply];
      });

      const res = await client.createClickAudienceGroup(
        'audienceGroupName',
        '12222',
        {
          clickUrl: 'https://line.me/en',
        }
      );

      expect(res).toEqual(reply);
    });
  });

  describe('#createImpAudienceGroup', () => {
    const reply = {
      audienceGroupId: 4389303728991,
      type: 'IMP',
      description: 'test',
      created: 1500351844,
      requestId: 'f70dd685-499a-4231-a441-f24b8d4fba21',
    };

    const body = {
      description: 'audienceGroupName',
      requestId: '12222',
    };

    it('should call createImpAudienceGroup api', async () => {
      expect.assertions(4);

      const { client, mock, headers } = createMock();

      mock.onPost().reply((config) => {
        expect(config.url).toEqual('/v2/bot/audienceGroup/imp');
        expect(JSON.parse(config.data)).toEqual(body);
        expect(config.headers).toEqual(headers);
        return [200, reply];
      });

      const res = await client.createImpAudienceGroup(
        'audienceGroupName',
        '12222'
      );

      expect(res).toEqual(reply);
    });
  });

  describe('#setDescriptionAudienceGroup', () => {
    const reply = {};

    const body = {
      description: 'audienceGroupName',
    };

    const audienceGroupId = 4389303728991;

    it('should call setDescriptionAudienceGroup api', async () => {
      expect.assertions(4);

      const { client, mock, headers } = createMock();

      mock.onPut().reply((config) => {
        expect(config.url).toEqual(
          `/v2/bot/audienceGroup/${audienceGroupId}/updateDescription`
        );
        expect(JSON.parse(config.data)).toEqual(body);
        expect(config.headers).toEqual(headers);
        return [200, reply];
      });

      const res = await client.setDescriptionAudienceGroup(
        'audienceGroupName',
        audienceGroupId
      );

      expect(res).toEqual(reply);
    });
  });

  describe('#deleteAudienceGroup', () => {
    const reply = {};

    const audienceGroupId = 4389303728991;

    it('should call deleteAudienceGroup api', async () => {
      expect.assertions(3);

      const { client, mock, headers } = createMock();

      mock.onDelete().reply((config) => {
        expect(config.url).toEqual(`/v2/bot/audienceGroup/${audienceGroupId}`);
        expect(config.headers).toEqual(headers);
        return [200, reply];
      });

      const res = await client.deleteAudienceGroup(audienceGroupId);

      expect(res).toEqual(reply);
    });
  });

  describe('#getAudienceGroup', () => {
    const reply = {
      audienceGroupId: 4389303728991,
      type: 'CLICK',
      description: 'audienceGroupName',
      status: 'READY',
      audienceCount: 2,
      created: 1500351844,
      requestId: 'f70dd685-499a-4231-a441-f24b8d4fba21',
      clickUrl: 'https://line.me/en',
      jobs: null,
    };

    const audienceGroupId = 4389303728991;

    it('should call getAudienceGroup api', async () => {
      expect.assertions(3);

      const { client, mock, headers } = createMock();

      mock.onGet().reply((config) => {
        expect(config.url).toEqual(`/v2/bot/audienceGroup/${audienceGroupId}`);
        expect(config.headers).toEqual(headers);
        return [200, reply];
      });

      const res = await client.getAudienceGroup(audienceGroupId);

      expect(res).toEqual(reply);
    });
  });

  describe('#getAudienceGroups', () => {
    const reply = {
      audienceGroups: [
        {
          audienceGroupId: 4389303728991,
          type: 'CLICK',
          description: 'audienceGroupName',
          status: 'READY',
          audienceCount: 2,
          created: 1500351844,
          requestId: 'f70dd685-499a-4231-a441-f24b8d4fba21',
          clickUrl: 'https://line.me/en',
        },
      ],
      hasNextPage: false,
      totalCount: 1,
      page: 1,
      size: 40,
    };

    const page = 1;
    const description = 'audienceGroupName';
    const status = 'READY';
    const size = 40;

    it('should call getAudienceGroups api', async () => {
      expect.assertions(3);

      const { client, mock, headers } = createMock();

      mock.onGet().reply((config) => {
        expect(config.url).toEqual(
          `/v2/bot/audienceGroup/list?page=${page}&description=${description}&status=${status}&size=${size}`
        );
        expect(config.headers).toEqual(headers);
        return [200, reply];
      });

      const res = await client.getAudienceGroups({
        page,
        description,
        status,
        size,
      });

      expect(res).toEqual(reply);
    });
  });

  describe('#getAudienceGroupAuthorityLevel', () => {
    const reply = {
      authorityLevel: 'PUBLIC',
    };

    it('should call getAudienceGroupAuthorityLevel api', async () => {
      expect.assertions(3);

      const { client, mock, headers } = createMock();

      mock.onGet().reply((config) => {
        expect(config.url).toEqual('/v2/bot/audienceGroup/authorityLevel');
        expect(config.headers).toEqual(headers);
        return [200, reply];
      });

      const res = await client.getAudienceGroupAuthorityLevel();

      expect(res).toEqual(reply);
    });
  });

  describe('#changeAudienceGroupAuthorityLevel', () => {
    const reply = {};

    const body = {
      authorityLevel: 'PUBLIC',
    };

    it('should call changeAudienceGroupAuthorityLevel api', async () => {
      expect.assertions(4);

      const { client, mock, headers } = createMock();

      mock.onPut().reply((config) => {
        expect(config.url).toEqual('/v2/bot/audienceGroup/authorityLevel');
        expect(JSON.parse(config.data)).toEqual(body);
        expect(config.headers).toEqual(headers);
        return [200, reply];
      });

      const res = await client.changeAudienceGroupAuthorityLevel('PUBLIC');

      expect(res).toEqual(reply);
    });
  });
});


text:
/*global bridge,assert,suite,setup,teardown,test*/
/*jshint esnext:true, maxlen:false*/

suite('Client()', function() {
  var message = bridge._m;
  var Message = message.Message;
  var Receiver = message.Receiver;
  var client = bridge.client;
  var myClient;

  this.timeout(3000);

  setup(function() {
    this.sinon = sinon.sandbox.create();
    this.endpoint = {
      addListener: sinon.stub(),
      removeListener: sinon.stub(),
      postMessage: sinon.stub()
    };
  });

  teardown(function() {
    this.sinon.restore();
    if (myClient) myClient.destroy();
  });

  suite('Client#connect()', function() {
    setup(function() {
      this.sinon.stub(Message.prototype, 'send');
      Message.prototype.send.returns(fakePromise());
    });

    test('it attaches MessageChannel port to the messsage', function() {
      this.sinon.spy(Message.prototype, 'set');

      myClient = client('some-service', this.endpoint);
      myClient.connect();
      var args = Message.prototype.set.withArgs('transfer').args[0];
      assert.ok(args[1][0] instanceof MessagePort);
    });

    test('it sends the clientId and service name', function() {
      this.sinon.spy(Message.prototype, 'set');

      myClient = client('some-service', this.endpoint);
      myClient.connect();

      var data = Message.prototype.set.withArgs('data').args[0][1];
      assert.equal(data.service, 'some-service');
      assert.equal(data.clientId, myClient.id);
    });

    test('it listens for a response on the MessageChannel', function() {
      this.sinon.spy(Message.prototype, 'listen');
      this.sinon.stub(window, 'MessageChannel');

      var fakeChannel = fakeMessageChannel();
      window.MessageChannel.returns(fakeChannel);

      myClient = client('some-service', this.endpoint);
      myClient.connect();

      var endpoint = Message.prototype.listen.args[0][0];
      assert.equal(endpoint, fakeChannel.port1);
    });

    test('it swaps ports if the response comes back on the MessageChannel', function() {
      this.sinon.stub(window, 'MessageChannel');

      var fakeChannel = fakeMessageChannel();
      window.MessageChannel.returns(fakeChannel);

      myClient = client('some-service', this.endpoint);
      myClient.connect();

      var onSuccess = Message.prototype.send.getCall(0).returnValue.then.args[0][0];
      var fakeResponse = {
        event: { target: fakeChannel.port1 }
      };

      sinon.spy(myClient, 'setPort');
      onSuccess(fakeResponse);

      sinon.assert.calledWith(myClient.setPort, fakeChannel.port1);
    });

    test('it keeps the endpoint as the port if response does not arrive on MessageChannel', function() {
      this.sinon.stub(window, 'MessageChannel');

      var fakeChannel = fakeMessageChannel();
      window.MessageChannel.returns(fakeChannel);

      myClient = client('some-service', this.endpoint);
      myClient.connect();

      var onSuccess = Message.prototype.send.getCall(0).returnValue.then.args[0][0];
      var fakeResponse = {
        event: { target: this.endpoint }
      };

      sinon.spy(myClient, 'setPort');
      onSuccess(fakeResponse);

      assert.isFalse(myClient.setPort.calledWith(fakeChannel.port1));
    });

    test('It begins listening for server push once connected', function() {
      this.sinon.stub(window, 'MessageChannel');
      this.sinon.spy(Receiver.prototype, 'listen');

      var fakeChannel = fakeMessageChannel();
      window.MessageChannel.returns(fakeChannel);

      myClient = client('some-service', this.endpoint);
      myClient.connect();

      sinon.assert.notCalled(Receiver.prototype.listen);

      var onSuccess = Message.prototype.send.getCall(0).returnValue.then.args[0][0];
      var fakeResponse = {
        event: { target: fakeChannel.port1 }
      };

      sinon.spy(myClient, 'setPort');
      onSuccess(fakeResponse);

      sinon.assert.calledWith(Receiver.prototype.listen, myClient.port);
    });

    test('it logs informative message if connection fails', function(done) {
      var expectedMessage = 'Unable to establish a connection with "some-service"';

      this.sinon.stub(console, 'error');
      Message.prototype.send.restore();

      myClient = client('some-service', this.endpoint);
      myClient.connect().then(result => {
        done('should not run');
      }).catch(err => {
        assert.isTrue(err instanceof Error);
        assert.ok(~err.message.indexOf(expectedMessage));
        sinon.assert.called(console.error);
        done();
      }).catch(done);
    });

    function fakeMessageChannel() {
      var port1 = fakeMessagePort();
      var port2 = fakeMessagePort();
      return { port1: port1, port2: port2 };
    }

    function fakeMessagePort() {
      return {
        start: sinon.stub(),
        addEventListener: sinon.stub(),
        removeEventListener: sinon.stub(),
        postMessage: sinon.stub(),
        close: sinon.stub()
      };
    }
  });

  suite('Client#method()', function() {
    test('calling .method() triggers a connect', function() {
      this.sinon.spy(client.prototype, 'connect');
      myClient = client('some-service', this.endpoint);
      sinon.assert.notCalled(myClient.connect);
      myClient.method('someMethod1');
      sinon.assert.called(myClient.connect);
    });

    test('it does not send message until connected', function() {
      myClient = client('some-service', this.endpoint);

      sinon.stub(myClient, 'connect').returns(fakePromise());
      sinon.spy(myClient, 'message');

      sinon.assert.notCalled(myClient.message);

      myClient.method('someMethod1');

      var thenCallback = myClient.connect
        .getCall(0)
        .returnValue
        .then
        .args[0][0];

      thenCallback();
      sinon.assert.calledWith(myClient.message, '_method');
    });

    test('it returns an informative message when it times out', function(done) {
      var expectedMessage = `Method "someMethod1" didn't get a response`;

      myClient = client('some-service', this.endpoint);

      // Behave as connected
      sinon.stub(myClient, 'connect').returns(Promise.resolve());

      myClient.method('someMethod1')
        .then(done)
        .catch(err => {
          assert.isTrue(err instanceof Error);
          assert.ok(~err.message.indexOf(expectedMessage));
          done();
        })
        .catch(done);
    });

    test('the default message timeout can be overriden', function(done) {
      var then = Date.now();

      myClient = client({
        service: 'some-service',
        endpoint: this.endpoint,
        timeout: 300
      });

      myClient.method('someMethod1')
        .then(result => done('should not run'))
        .catch(err => {
          assert.ok(Date.now() - then >= 300);
          assert.ok(Date.now() - then < 2000);
          done();
        })
        .catch(done);
    });
  });

  suite('Client#disconnect()', function() {
    setup(function() {
      this.sinon.spy(Message.prototype, 'send');
    });

    test('it cancels pending methods', function(done) {
      myClient = client('some-service', this.endpoint);

      // HACK connected
      myClient.connected = Promise.resolve();

      myClient.method('someMethod1');
      myClient.method('someMethod2');
      myClient.method('someMethod3');

      myClient.connect().then(() => {
        assert.equal(myClient.pending.size, 3);
        myClient.disconnect();
        assert.equal(myClient.pending.size, 1);
        done();
      }).catch(done);
    });

    test('returns resolved promise if not connected', function(done) {
      myClient = client('some-service', this.endpoint);

      myClient.disconnect()
        .then(() => {
          sinon.assert.notCalled(message.Message.prototype.send);
          done();
        }).catch(done);
    });
  });

  /**
   * Utils
   */

  function fakePromise() {
    return {
      then: sinon.spy(() => fakePromise()),
      catch: sinon.spy(() => fakePromise())
    };
  }
});


text:
module RailsAssetLocalization
  class Engine < Rails::Engine
  end
end


text:
<?xml version="1.0" encoding="UTF-8"?>
<Tokens version="1.0">
	<File path="Classes/AutoScalingMetricCollectionTypeUnmarshaller.html">

		<Token>
			<TokenIdentifier>//apple_ref/occ/cl/AutoScalingMetricCollectionTypeUnmarshaller</TokenIdentifier>
			<Abstract type="html">Metric Collection Type Unmarshaller</Abstract>
			<DeclaredIn>AutoScalingMetricCollectionTypeUnmarshaller.h</DeclaredIn>

			<NodeRef refid="140"/>
		</Token>

	</File>
</Tokens>


text:
import sys, os
sys.path.append(os.path.join(os.path.dirname(__file__)))
import migrateEreserves as me

m = me.Migration()

m.runMigration()


text:
#ifndef AMA_TENSOR_DETAIL_TENSOR_CWISE_UNARY_HPP
#define AMA_TENSOR_DETAIL_TENSOR_CWISE_UNARY_HPP 1

#include <ama/tensor/detail/tensor_base.hpp>
#include <boost/mpl/bool.hpp>
#include <boost/mpl/if.hpp>

namespace ama
{
  namespace tensor_
  {

    /* this class represent a unary component-wise operation */
    template <typename OPERAND, typename OPERATOR> class tensor_cwise_unary;

    /* specialization of tensor_traits */
    template <typename OPERAND, typename OPERATOR>
    struct tensor_traits< tensor_cwise_unary<OPERAND, OPERATOR> >
    {
      typedef typename OPERATOR::result_type value_type;

      typedef typename OPERAND::dimension_type dimension_type;

      typedef typename OPERAND::controvariant_type controvariant_type;
      typedef typename OPERAND::covariant_type covariant_type;

      typedef ::boost::mpl::false_ is_assignable;
      typedef ::boost::mpl::true_ is_temporary;
    };

    /* class declaration */
    template <typename OPERAND, typename OPERATOR>
    class tensor_cwise_unary:
        public tensor_base< tensor_cwise_unary<OPERAND, OPERATOR> >
    {
    protected:
      typedef tensor_base< tensor_cwise_unary<OPERAND, OPERATOR> > base_type;
      typedef tensor_cwise_unary<OPERAND, OPERATOR> derived_type;

    protected:
      typedef OPERAND operand_type;
      typedef OPERATOR operator_type;

    public:
      typedef typename base_type::value_type value_type;

    public:
      /* constructor */
      explicit
      tensor_cwise_unary(operand_type const & operand,
                         operator_type const & op = operator_type())
          : m_operand(operand),
            m_operator(op) { }

    public:
      /* retrieve the value */
      template <typename ILIST>
      value_type at() const { return m_operator(m_operand.template at<ILIST>()); }

    protected:
      /* if the operand is temporary we save a copy, otherwise a reference */
      typedef typename OPERAND::is_temporary operand_is_temporary;
      typedef typename ::boost::mpl::if_<
            operand_is_temporary
          , operand_type const
          , operand_type const &
          >::type const_operand_type;

      /* members */
      const_operand_type m_operand;
      operator_type const m_operator;
    };

  }
}

#endif /* AMA_TENSOR_DETAIL_TENSOR_CWISE_UNARY_HPP */


text: placeholder for athos blog post


text:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.wms.opensource.images3android.demo"
    android:versionCode="1"
    android:versionName="1.0" >

    <uses-sdk
        android:minSdkVersion="11"
        android:targetSdkVersion="22" />

    <uses-permission android:name="android.permission.INTERNET"></uses-permission>
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"></uses-permission>
    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE"></uses-permission>
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.CAMERA" />
    <uses-permission android:name="android.permission.SET_WALLPAPER" />
    <uses-permission android:name="com.android.launcher.permission.INSTALL_SHORTCUT"/>

    <application
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/Theme.AppCompat.Light.DarkActionBar" >

        <activity
            android:name="com.wms.opensource.images3android.activity.UploadImageActivity"
            android:label="@string/uploadImageActivityTitle"
            android:screenOrientation="portrait">
            <intent-filter>
                <action android:name="android.intent.action.MAIN"></action>
                <category android:name="android.intent.category.LAUNCHER"></category>
            </intent-filter>

            <intent-filter>
                <action android:name="android.intent.action.CREATE_SHORTCUT"></action>
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
        </activity>

        <activity
            android:name="com.wms.opensource.images3android.activity.ImageListFragmentActivity"
            android:label="@string/imageListActivityTitle"
            android:screenOrientation="portrait"
            android:configChanges="keyboardHidden|orientation"
            android:windowSoftInputMode="stateVisible|adjustResize">
        </activity>
    </application>

</manifest>


text:
Need to query a `RLMObject` against a to-many relationship using multiple properties? This category brings the hidden gem in `NSPredicate`, `SUBQUERY`, to Realm. For example, given this Realm setup:

```Objective-C
Person : RLMObject
@property NSString *Id;
@property RLMArray<Dog> *dogs;

Dog : RLMObject
@property BOOL hasFleas;
@property NSString *color;
```

it is now possible to write a query for all the Person(s) that have at least one Dog with fleas and is colored brown. This makes use of `SUBQUERY` in the resulting Realm query:

```Objective-C
RLMResults *ownersOfBrownDogsWithFleas = [Person objectsWithSubqueryPredicate:@"SUBQUERY(dogs, $dog, $dog.hasFleas = YES AND $dog.color == 'brown').@count > 0"];
```
####Format
The format is similar to the standard NSPredicate `SUBQUERY` expression:
```Objective-C
SUBQUERY(RLMArray keypath, variable, predicate)
```

####Installation
RBQFetchedResultsController is available through [CocoaPods](http://cocoapods.org). To install
it, simply add the following line to your Podfile:

    pod 'RealmSubqueryHelper'

####Demo

Build and run/test the Example project in Xcode to see a working `SUBQUERY`. This project uses CocoaPods. If you don't have [CocoaPods](http://cocoapods.org/) installed, grab it with [sudo] gem install cocoapods.

```
git clone https://github.com/bigfish24/RealmSubqueryHelper
cd RealmSubqueryHelper/objc-example
pod install
open RBQFetchedResultsControllerExample.xcworkspace
```

#####Requirements
* iOS 7+

####Limitations
1. The base object must have a primary key (above, `Person` has primary key `Id`).
2. Only the `@count` collection operator is supported.
3. Compound predicates with `SUBQUERY` are supported, but nested `SUBQUERY` is not.