.class public Lcom/moji/storage/MJStorage; .super Ljava/lang/Object; .source "MJStorage.java" # annotations .annotation system Ldalvik/annotation/MemberClasses; value = { Lcom/moji/storage/MJStorage$StoragePermissionListener;, Lcom/moji/storage/MJStorage$ExternalInstanceHolder;, Lcom/moji/storage/MJStorage$InternalInstanceHolder; } .end annotation # static fields .field private static final a:Ljava/lang/Object; .field private static b:Lcom/moji/storage/helpers/SimpleStorageConfiguration; .field private static c:Ljava/util/List; .annotation system Ldalvik/annotation/Signature; value = { "Ljava/util/List<", "Ljava/lang/ref/SoftReference<", "Lcom/moji/storage/MJStorage$StoragePermissionListener;", ">;>;" } .end annotation .end field # direct methods .method static constructor ()V .locals 1 .line 24 new-instance v0, Ljava/lang/Object; invoke-direct {v0}, Ljava/lang/Object;->()V sput-object v0, Lcom/moji/storage/MJStorage;->a:Ljava/lang/Object; .line 26 new-instance v0, Lcom/moji/storage/helpers/SimpleStorageConfiguration$Builder; invoke-direct {v0}, Lcom/moji/storage/helpers/SimpleStorageConfiguration$Builder;->()V invoke-virtual {v0}, Lcom/moji/storage/helpers/SimpleStorageConfiguration$Builder;->a()Lcom/moji/storage/helpers/SimpleStorageConfiguration; move-result-object v0 sput-object v0, Lcom/moji/storage/MJStorage;->b:Lcom/moji/storage/helpers/SimpleStorageConfiguration; .line 27 new-instance v0, Ljava/util/ArrayList; invoke-direct {v0}, Ljava/util/ArrayList;->()V sput-object v0, Lcom/moji/storage/MJStorage;->c:Ljava/util/List; return-void .end method .method private constructor ()V .locals 0 .line 29 invoke-direct {p0}, Ljava/lang/Object;->()V return-void .end method .method public static a()Lcom/moji/storage/ExternalStorage; .locals 1 .line 73 invoke-static {}, Lcom/moji/storage/MJStorage$ExternalInstanceHolder;->a()Lcom/moji/storage/ExternalStorage; move-result-object v0 return-object v0 .end method .method public static a(I[Ljava/lang/String;[I)V .locals 3 const/16 v0, 0x8b if-eq p0, v0, :cond_0 return-void :cond_0 const/4 p0, 0x0 const/4 v0, 0x0 .line 166 :goto_0 array-length v1, p1 if-ge v0, v1, :cond_2 .line 167 aget-object v1, p1, v0 const-string v2, "android.permission.WRITE_EXTERNAL_STORAGE" .line 168 invoke-virtual {v2, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z move-result v1 if-eqz v1, :cond_1 aget v1, p2, v0 if-nez v1, :cond_1 const/4 p0, 0x1 goto :goto_1 :cond_1 add-int/lit8 v0, v0, 0x1 goto :goto_0 .line 174 :cond_2 :goto_1 sget-object p1, Lcom/moji/storage/MJStorage;->a:Ljava/lang/Object; monitor-enter p1 .line 175 :try_start_0 sget-object p2, Lcom/moji/storage/MJStorage;->c:Ljava/util/List; invoke-interface {p2}, Ljava/util/List;->isEmpty()Z move-result p2 if-eqz p2, :cond_3 .line 176 monitor-exit p1 return-void .line 178 :cond_3 sget-object p2, Lcom/moji/storage/MJStorage;->c:Ljava/util/List; invoke-interface {p2}, Ljava/util/List;->iterator()Ljava/util/Iterator; move-result-object p2 .line 179 :goto_2 invoke-interface {p2}, Ljava/util/Iterator;->hasNext()Z move-result v0 if-eqz v0, :cond_6 .line 180 invoke-interface {p2}, Ljava/util/Iterator;->next()Ljava/lang/Object; move-result-object v0 check-cast v0, Ljava/lang/ref/SoftReference; .line 181 invoke-virtual {v0}, Ljava/lang/ref/SoftReference;->get()Ljava/lang/Object; move-result-object v0 check-cast v0, Lcom/moji/storage/MJStorage$StoragePermissionListener; if-eqz v0, :cond_5 if-eqz p0, :cond_4 .line 184 invoke-static {}, Lcom/moji/storage/MJStorage;->a()Lcom/moji/storage/ExternalStorage; move-result-object v1 invoke-interface {v0, v1}, Lcom/moji/storage/MJStorage$StoragePermissionListener;->a(Lcom/moji/storage/ExternalStorage;)V goto :goto_3 .line 186 :cond_4 invoke-interface {v0}, Lcom/moji/storage/MJStorage$StoragePermissionListener;->a()V .line 189 :cond_5 :goto_3 invoke-interface {p2}, Ljava/util/Iterator;->remove()V goto :goto_2 .line 191 :cond_6 monitor-exit p1 return-void :catchall_0 move-exception p0 monitor-exit p1 :try_end_0 .catchall {:try_start_0 .. :try_end_0} :catchall_0 throw p0 .end method .method public static b()Lcom/moji/storage/helpers/SimpleStorageConfiguration; .locals 1 .line 136 sget-object v0, Lcom/moji/storage/MJStorage;->b:Lcom/moji/storage/helpers/SimpleStorageConfiguration; return-object v0 .end method