DiskLruCache$1.smali 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  1. .class Lokhttp3/internal/cache/DiskLruCache$1;
  2. .super Ljava/lang/Object;
  3. .source ""
  4. # interfaces
  5. .implements Ljava/lang/Runnable;
  6. # annotations
  7. .annotation system Ldalvik/annotation/EnclosingClass;
  8. value = Lokhttp3/internal/cache/DiskLruCache;
  9. .end annotation
  10. .annotation system Ldalvik/annotation/InnerClass;
  11. accessFlags = 0x0
  12. name = null
  13. .end annotation
  14. # instance fields
  15. .field final synthetic this$0:Lokhttp3/internal/cache/DiskLruCache;
  16. # direct methods
  17. .method constructor <init>(Lokhttp3/internal/cache/DiskLruCache;)V
  18. .locals 0
  19. iput-object p1, p0, Lokhttp3/internal/cache/DiskLruCache$1;->this$0:Lokhttp3/internal/cache/DiskLruCache;
  20. invoke-direct {p0}, Ljava/lang/Object;-><init>()V
  21. return-void
  22. .end method
  23. # virtual methods
  24. .method public run()V
  25. .locals 5
  26. iget-object v0, p0, Lokhttp3/internal/cache/DiskLruCache$1;->this$0:Lokhttp3/internal/cache/DiskLruCache;
  27. monitor-enter v0
  28. :try_start_0
  29. iget-object v1, p0, Lokhttp3/internal/cache/DiskLruCache$1;->this$0:Lokhttp3/internal/cache/DiskLruCache;
  30. iget-boolean v1, v1, Lokhttp3/internal/cache/DiskLruCache;->initialized:Z
  31. const/4 v2, 0x0
  32. const/4 v3, 0x1
  33. if-nez v1, :cond_0
  34. const/4 v1, 0x1
  35. goto :goto_0
  36. :cond_0
  37. const/4 v1, 0x0
  38. :goto_0
  39. iget-object v4, p0, Lokhttp3/internal/cache/DiskLruCache$1;->this$0:Lokhttp3/internal/cache/DiskLruCache;
  40. iget-boolean v4, v4, Lokhttp3/internal/cache/DiskLruCache;->closed:Z
  41. or-int/2addr v1, v4
  42. if-eqz v1, :cond_1
  43. monitor-exit v0
  44. :try_end_0
  45. .catchall {:try_start_0 .. :try_end_0} :catchall_0
  46. return-void
  47. :cond_1
  48. :try_start_1
  49. iget-object v1, p0, Lokhttp3/internal/cache/DiskLruCache$1;->this$0:Lokhttp3/internal/cache/DiskLruCache;
  50. invoke-virtual {v1}, Lokhttp3/internal/cache/DiskLruCache;->trimToSize()V
  51. :try_end_1
  52. .catch Ljava/io/IOException; {:try_start_1 .. :try_end_1} :catch_0
  53. .catchall {:try_start_1 .. :try_end_1} :catchall_0
  54. goto :goto_1
  55. :catch_0
  56. :try_start_2
  57. iget-object v1, p0, Lokhttp3/internal/cache/DiskLruCache$1;->this$0:Lokhttp3/internal/cache/DiskLruCache;
  58. iput-boolean v3, v1, Lokhttp3/internal/cache/DiskLruCache;->mostRecentTrimFailed:Z
  59. :try_end_2
  60. .catchall {:try_start_2 .. :try_end_2} :catchall_0
  61. :goto_1
  62. :try_start_3
  63. iget-object v1, p0, Lokhttp3/internal/cache/DiskLruCache$1;->this$0:Lokhttp3/internal/cache/DiskLruCache;
  64. invoke-virtual {v1}, Lokhttp3/internal/cache/DiskLruCache;->journalRebuildRequired()Z
  65. move-result v1
  66. if-eqz v1, :cond_2
  67. iget-object v1, p0, Lokhttp3/internal/cache/DiskLruCache$1;->this$0:Lokhttp3/internal/cache/DiskLruCache;
  68. invoke-virtual {v1}, Lokhttp3/internal/cache/DiskLruCache;->rebuildJournal()V
  69. iget-object v1, p0, Lokhttp3/internal/cache/DiskLruCache$1;->this$0:Lokhttp3/internal/cache/DiskLruCache;
  70. iput v2, v1, Lokhttp3/internal/cache/DiskLruCache;->redundantOpCount:I
  71. :try_end_3
  72. .catch Ljava/io/IOException; {:try_start_3 .. :try_end_3} :catch_1
  73. .catchall {:try_start_3 .. :try_end_3} :catchall_0
  74. goto :goto_2
  75. :catch_1
  76. :try_start_4
  77. iget-object v1, p0, Lokhttp3/internal/cache/DiskLruCache$1;->this$0:Lokhttp3/internal/cache/DiskLruCache;
  78. iput-boolean v3, v1, Lokhttp3/internal/cache/DiskLruCache;->mostRecentRebuildFailed:Z
  79. iget-object v1, p0, Lokhttp3/internal/cache/DiskLruCache$1;->this$0:Lokhttp3/internal/cache/DiskLruCache;
  80. invoke-static {}, Lokio/Okio;->blackhole()Lokio/Sink;
  81. move-result-object v2
  82. invoke-static {v2}, Lokio/Okio;->buffer(Lokio/Sink;)Lokio/BufferedSink;
  83. move-result-object v2
  84. iput-object v2, v1, Lokhttp3/internal/cache/DiskLruCache;->journalWriter:Lokio/BufferedSink;
  85. :cond_2
  86. :goto_2
  87. monitor-exit v0
  88. return-void
  89. :catchall_0
  90. move-exception v1
  91. monitor-exit v0
  92. :try_end_4
  93. .catchall {:try_start_4 .. :try_end_4} :catchall_0
  94. throw v1
  95. .end method