.class Lcom/moji/mjweather/weather/control/CacheViewControlManager$CreateViewRunnable;
.super Ljava/lang/Object;
.source "CacheViewControlManager.java"

# interfaces
.implements Ljava/lang/Runnable;


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcom/moji/mjweather/weather/control/CacheViewControlManager;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x2
    name = "CreateViewRunnable"
.end annotation


# instance fields
.field final synthetic a:Lcom/moji/mjweather/weather/control/CacheViewControlManager;

.field private b:Landroid/content/Context;


# direct methods
.method public constructor <init>(Lcom/moji/mjweather/weather/control/CacheViewControlManager;Landroid/content/Context;)V
    .locals 0

    .line 169
    iput-object p1, p0, Lcom/moji/mjweather/weather/control/CacheViewControlManager$CreateViewRunnable;->a:Lcom/moji/mjweather/weather/control/CacheViewControlManager;

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

    .line 170
    iput-object p2, p0, Lcom/moji/mjweather/weather/control/CacheViewControlManager$CreateViewRunnable;->b:Landroid/content/Context;

    return-void
.end method


# virtual methods
.method public run()V
    .locals 6

    .line 175
    invoke-static {}, Lcom/moji/mjweather/weather/control/CacheViewControlManager;->d()Ljava/lang/Object;

    move-result-object v0

    monitor-enter v0

    .line 177
    :try_start_0
    invoke-static {}, Lcom/moji/areamanagement/MJAreaManager;->c()Ljava/util/List;

    move-result-object v1

    if-eqz v1, :cond_4

    .line 178
    invoke-interface {v1}, Ljava/util/List;->isEmpty()Z

    move-result v2

    if-eqz v2, :cond_0

    goto/16 :goto_1

    :cond_0
    const/4 v2, 0x5

    .line 181
    invoke-interface {v1}, Ljava/util/List;->size()I

    move-result v1

    invoke-static {v2, v1}, Ljava/lang/Math;->min(II)I

    move-result v1

    const/4 v2, 0x0

    :goto_0
    if-ge v2, v1, :cond_3

    .line 183
    new-instance v3, Landroid/support/v4/util/ArrayMap;

    const/16 v4, 0x9

    invoke-direct {v3, v4}, Landroid/support/v4/util/ArrayMap;-><init>(I)V

    .line 184
    new-instance v4, Lcom/moji/mjweather/weather/control/WeatherShorterAndInfoViewControl;

    iget-object v5, p0, Lcom/moji/mjweather/weather/control/CacheViewControlManager$CreateViewRunnable;->b:Landroid/content/Context;

    invoke-direct {v4, v5}, Lcom/moji/mjweather/weather/control/WeatherShorterAndInfoViewControl;-><init>(Landroid/content/Context;)V

    .line 185
    invoke-virtual {v4}, Lcom/moji/mjweather/weather/control/WeatherShorterAndInfoViewControl;->h()V

    .line 186
    sget-object v5, Lcom/moji/mjweather/weather/control/CacheViewControlManager$ControlType;->ShortInfoView:Lcom/moji/mjweather/weather/control/CacheViewControlManager$ControlType;

    invoke-virtual {v5}, Lcom/moji/mjweather/weather/control/CacheViewControlManager$ControlType;->ordinal()I

    move-result v5

    invoke-static {v5}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v5

    invoke-virtual {v3, v5, v4}, Landroid/support/v4/util/ArrayMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 192
    new-instance v4, Lcom/moji/mjweather/weather/control/WeatherBottomAdViewControl;

    iget-object v5, p0, Lcom/moji/mjweather/weather/control/CacheViewControlManager$CreateViewRunnable;->b:Landroid/content/Context;

    invoke-direct {v4, v5}, Lcom/moji/mjweather/weather/control/WeatherBottomAdViewControl;-><init>(Landroid/content/Context;)V

    .line 193
    invoke-virtual {v4}, Lcom/moji/mjweather/weather/control/WeatherBottomAdViewControl;->h()V

    .line 194
    sget-object v5, Lcom/moji/mjweather/weather/control/CacheViewControlManager$ControlType;->BottomADView:Lcom/moji/mjweather/weather/control/CacheViewControlManager$ControlType;

    invoke-virtual {v5}, Lcom/moji/mjweather/weather/control/CacheViewControlManager$ControlType;->ordinal()I

    move-result v5

    invoke-static {v5}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v5

    invoke-virtual {v3, v5, v4}, Landroid/support/v4/util/ArrayMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 197
    new-instance v4, Lcom/moji/mjweather/weather/control/WeatherForecastViewControl;

    iget-object v5, p0, Lcom/moji/mjweather/weather/control/CacheViewControlManager$CreateViewRunnable;->b:Landroid/content/Context;

    invoke-direct {v4, v5}, Lcom/moji/mjweather/weather/control/WeatherForecastViewControl;-><init>(Landroid/content/Context;)V

    .line 198
    invoke-virtual {v4}, Lcom/moji/mjweather/weather/control/WeatherForecastViewControl;->h()V

    .line 199
    sget-object v5, Lcom/moji/mjweather/weather/control/CacheViewControlManager$ControlType;->ForecastView:Lcom/moji/mjweather/weather/control/CacheViewControlManager$ControlType;

    invoke-virtual {v5}, Lcom/moji/mjweather/weather/control/CacheViewControlManager$ControlType;->ordinal()I

    move-result v5

    invoke-static {v5}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v5

    invoke-virtual {v3, v5, v4}, Landroid/support/v4/util/ArrayMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 205
    sget v4, Landroid/os/Build$VERSION;->SDK_INT:I

    const/16 v5, 0x19

    if-lt v4, v5, :cond_1

    const-string v4, "nubia"

    sget-object v5, Landroid/os/Build;->BRAND:Ljava/lang/String;

    invoke-virtual {v4, v5}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v4

    if-nez v4, :cond_2

    .line 206
    :cond_1
    new-instance v4, Lcom/moji/mjweather/weather/control/WeatherIndexViewControl;

    iget-object v5, p0, Lcom/moji/mjweather/weather/control/CacheViewControlManager$CreateViewRunnable;->b:Landroid/content/Context;

    invoke-direct {v4, v5}, Lcom/moji/mjweather/weather/control/WeatherIndexViewControl;-><init>(Landroid/content/Context;)V

    .line 207
    invoke-virtual {v4}, Lcom/moji/mjweather/weather/control/WeatherIndexViewControl;->h()V

    .line 208
    sget-object v5, Lcom/moji/mjweather/weather/control/CacheViewControlManager$ControlType;->IndexView:Lcom/moji/mjweather/weather/control/CacheViewControlManager$ControlType;

    invoke-virtual {v5}, Lcom/moji/mjweather/weather/control/CacheViewControlManager$ControlType;->ordinal()I

    move-result v5

    invoke-static {v5}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v5

    invoke-virtual {v3, v5, v4}, Landroid/support/v4/util/ArrayMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 211
    :cond_2
    new-instance v4, Lcom/moji/mjweather/weather/control/WeatherMiddleAdViewControl;

    iget-object v5, p0, Lcom/moji/mjweather/weather/control/CacheViewControlManager$CreateViewRunnable;->b:Landroid/content/Context;

    invoke-direct {v4, v5}, Lcom/moji/mjweather/weather/control/WeatherMiddleAdViewControl;-><init>(Landroid/content/Context;)V

    .line 212
    invoke-virtual {v4}, Lcom/moji/mjweather/weather/control/WeatherMiddleAdViewControl;->h()V

    .line 213
    sget-object v5, Lcom/moji/mjweather/weather/control/CacheViewControlManager$ControlType;->MiddleADView:Lcom/moji/mjweather/weather/control/CacheViewControlManager$ControlType;

    invoke-virtual {v5}, Lcom/moji/mjweather/weather/control/CacheViewControlManager$ControlType;->ordinal()I

    move-result v5

    invoke-static {v5}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v5

    invoke-virtual {v3, v5, v4}, Landroid/support/v4/util/ArrayMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 218
    iget-object v4, p0, Lcom/moji/mjweather/weather/control/CacheViewControlManager$CreateViewRunnable;->a:Lcom/moji/mjweather/weather/control/CacheViewControlManager;

    invoke-static {v4}, Lcom/moji/mjweather/weather/control/CacheViewControlManager;->a(Lcom/moji/mjweather/weather/control/CacheViewControlManager;)Landroid/support/v4/util/ArrayMap;

    move-result-object v4

    invoke-static {v2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v5

    invoke-virtual {v4, v5, v3}, Landroid/support/v4/util/ArrayMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    add-int/lit8 v2, v2, 0x1

    goto/16 :goto_0

    .line 221
    :cond_3
    monitor-exit v0

    return-void

    .line 179
    :cond_4
    :goto_1
    monitor-exit v0

    return-void

    :catchall_0
    move-exception v1

    .line 221
    monitor-exit v0
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    throw v1
.end method
