Offset 1, 54 lines modifiedOffset 1, 52 lines modified
  
1 package·com.android.providers.media.scan;1 package·com.android.providers.media.scan;
  
2 import·android.content.ContentProviderOperation$Builder;2 import·android.content.ContentProviderOperation$Builder;
3 import·com.android.providers.media.util.MimeUtils;3 import·com.android.providers.media.util.MimeUtils;
 4 import·com.android.providers.media.util.Metrics;
 5 import·android.os.SystemClock;
4 import·java.nio.file.attribute.BasicFileAttributes;6 import·java.nio.file.attribute.BasicFileAttributes;
5 import·java.nio.file.FileVisitResult;7 import·java.nio.file.FileVisitResult;
6 import·java.io.IOException;8 import·java.io.IOException;
7 import·android.provider.MediaStore$Video$Media;9 import·android.provider.MediaStore$Video$Media;
8 import·android.provider.MediaStore$Audio$Media;10 import·android.provider.MediaStore$Audio$Media;
9 import·android.provider.MediaStore$Images$Media;11 import·android.provider.MediaStore$Images$Media;
 12 import·java.util.Iterator;
10 import·java.util.Collection;13 import·java.util.Collection;
11 import·com.android.providers.media.util.Metrics; 
12 import·android.os.SystemClock; 
13 import·android.database.Cursor;14 import·android.database.Cursor;
14 import·android.content.ContentUris;15 import·android.content.ContentUris;
15 import·android.provider.MediaStore$Audio$Playlists;16 import·android.provider.MediaStore$Audio$Playlists;
16 import·android.net.Uri$Builder;17 import·android.net.Uri$Builder;
17 import·android.util.Log;18 import·android.util.Log;
 19 import·com.android.providers.media.util.DatabaseUtils;
18 import·android.os.Bundle;20 import·android.os.Bundle;
19 import·java.util.Arrays;21 import·java.util.Arrays;
20 import·java.util.Iterator; 
21 import·android.content.ContentProviderOperation;22 import·android.content.ContentProviderOperation;
22 import·com.android.providers.media.util.DatabaseUtils; 
23 import·java.nio.file.Path;23 import·java.nio.file.Path;
24 import·android.provider.MediaStore;24 import·android.provider.MediaStore;
25 import·android.provider.MediaStore$Files;25 import·android.provider.MediaStore$Files;
26 import·com.android.providers.media.util.FileUtils;26 import·com.android.providers.media.util.FileUtils;
27 import·android.os.Trace;27 import·android.os.Trace;
28 import·android.util.ArraySet;28 import·android.util.ArraySet;
29 import·android.os.CancellationSignal;29 import·android.os.CancellationSignal;
30 import·com.android.providers.media.util.LongArray;30 import·com.android.providers.media.util.LongArray;
31 import·java.io.File;31 import·java.io.File;
32 import·android.content.ContentResolver;32 import·android.content.ContentResolver;
33 import·java.util.ArrayList;33 import·java.util.ArrayList;
34 import·android.net.Uri;34 import·android.net.Uri;
35 import·java.util.List; 
36 import·android.content.ContentProviderClient;35 import·android.content.ContentProviderClient;
37 import·java.util.Set;36 import·java.util.Set;
38 import·java.nio.file.FileVisitor;37 import·java.nio.file.FileVisitor;
  
39 class·ModernMediaScanner$Scan·implements·Runnable,·FileVisitor,·AutoCloseable38 class·ModernMediaScanner$Scan·implements·Runnable,·FileVisitor,·AutoCloseable
40 {39 {
41 ····private·final·Set·mAcquiredDirectoryLocks;40 ····private·final·Set·mAcquiredDirectoryLocks;
42 ····private·final·ContentProviderClient·mClient;41 ····private·final·ContentProviderClient·mClient;
43 ····private·int·mDeleteCount;42 ····private·int·mDeleteCount;
44 ····private·final·List·mExcludeDirs; 
45 ····private·int·mFileCount;43 ····private·int·mFileCount;
46 ····private·final·Uri·mFilesUri;44 ····private·final·Uri·mFilesUri;
47 ····private·long·mFirstId;45 ····private·long·mFirstId;
48 ····private·int·mHiddenDirCount;46 ····private·int·mHiddenDirCount;
49 ····private·int·mInsertCount;47 ····private·int·mInsertCount;
50 ····private·final·String·mOwnerPackage;48 ····private·final·String·mOwnerPackage;
51 ····private·final·ArrayList·mPending;49 ····private·final·ArrayList·mPending;
Offset 68, 56 lines modifiedOffset 66, 45 lines modified
68 ········this.this$0·=·this$0;66 ········this.this$0·=·this$0;
69 ········this.mAcquiredDirectoryLocks·=·(Set)new·ArraySet();67 ········this.mAcquiredDirectoryLocks·=·(Set)new·ArraySet();
70 ········this.mPending·=·new·ArrayList();68 ········this.mPending·=·new·ArrayList();
71 ········this.mScannedIds·=·new·LongArray();69 ········this.mScannedIds·=·new·LongArray();
72 ········this.mUnknownIds·=·new·LongArray();70 ········this.mUnknownIds·=·new·LongArray();
73 ········this.mFirstId·=·-1;71 ········this.mFirstId·=·-1;
74 ········Trace.beginSection("ctor");72 ········Trace.beginSection("ctor");
75 ········final·ContentProviderClient·acquireContentProviderClient·=·ModernMediaScanner.access$300(this$0).getContentResolver().acquireContentProviderClient("media");73 ········final·ContentProviderClient·acquireContentProviderClient·=·ModernMediaScanner.access$000(this$0).getContentResolver().acquireContentProviderClient("media");
76 ········this.mClient·=·acquireContentProviderClient;74 ········this.mClient·=·acquireContentProviderClient;
77 ········this.mResolver·=·ContentResolver.wrap(acquireContentProviderClient.getLocalContentProvider());75 ········this.mResolver·=·ContentResolver.wrap(acquireContentProviderClient.getLocalContentProvider());
78 ········this.mRoot·=·mRoot;76 ········this.mRoot·=·mRoot;
79 ········this.mReason·=·mReason;77 ········this.mReason·=·mReason;
80 ········final·String·volumeName·=·FileUtils.getVolumeName(ModernMediaScanner.access$300(this$0),·mRoot);78 ········final·String·volumeName·=·FileUtils.getVolumeName(ModernMediaScanner.access$000(this$0),·mRoot);
81 ········this.mVolumeName·=·volumeName;79 ········this.mVolumeName·=·volumeName;
82 ········this.mFilesUri·=·MediaStore$Files.getContentUri(volumeName);80 ········this.mFilesUri·=·MediaStore$Files.getContentUri(volumeName);
83 ········this.mSignal·=·new·CancellationSignal();81 ········this.mSignal·=·ModernMediaScanner.access$100(this$0,·this.mVolumeName);
84 ········this.mStartGeneration·=·MediaStore.getGeneration(this.mResolver,·this.mVolumeName);82 ········this.mStartGeneration·=·MediaStore.getGeneration(this.mResolver,·this.mVolumeName);
85 ········this.mSingleFile·=·this.mRoot.isFile();83 ········this.mSingleFile·=·this.mRoot.isFile();
86 ········this.mOwnerPackage·=·mOwnerPackage;84 ········this.mOwnerPackage·=·mOwnerPackage;
87 ········this.mExcludeDirs·=·new·ArrayList(); 
88 ········Trace.endSection();85 ········Trace.endSection();
89 ····}86 ····}
90 ····87 ····
91 ····private·void·acquireDirectoryLock(final·Path·path)·{88 ····private·void·acquireDirectoryLock(final·Path·path)·{
92 ········Trace.beginSection("acquireDirectoryLock");89 ········Trace.beginSection("acquireDirectoryLock");
93 ········synchronized·(ModernMediaScanner.access$700(this.this$0))·{90 ········synchronized·(ModernMediaScanner.access$300(this.this$0))·{
94 ············ModernMediaScanner$DirectoryLock·modernMediaScanner$DirectoryLock·=·(ModernMediaScanner$DirectoryLock)ModernMediaScanner.access$700(this.this$0).get(path);91 ············ModernMediaScanner$DirectoryLock·modernMediaScanner$DirectoryLock·=·(ModernMediaScanner$DirectoryLock)ModernMediaScanner.access$300(this.this$0).get(path);
95 ············if·(modernMediaScanner$DirectoryLock·==·null)·{92 ············if·(modernMediaScanner$DirectoryLock·==·null)·{
96 ················modernMediaScanner$DirectoryLock·=·new·ModernMediaScanner$DirectoryLock((ModernMediaScanner$1)null);93 ················modernMediaScanner$DirectoryLock·=·new·ModernMediaScanner$DirectoryLock((ModernMediaScanner$1)null);
97 ················ModernMediaScanner.access$700(this.this$0).put(path,·modernMediaScanner$DirectoryLock);94 ················ModernMediaScanner.access$300(this.this$0).put(path,·modernMediaScanner$DirectoryLock);
98 ············}95 ············}
99 ············++modernMediaScanner$DirectoryLock.count;96 ············++modernMediaScanner$DirectoryLock.count;
100 ············//·monitorexit(ModernMediaScanner.access$700(this.this$0))97 ············//·monitorexit(ModernMediaScanner.access$300(this.this$0))
101 ············modernMediaScanner$DirectoryLock.lock.lock();98 ············modernMediaScanner$DirectoryLock.lock.lock();
102 ············this.mAcquiredDirectoryLocks.add(path);99 ············this.mAcquiredDirectoryLocks.add(path);
103 ············Trace.endSection();100 ············Trace.endSection();
104 ········}101 ········}
105 ····}102 ····}
106 ····103 ····
107 ····private·void·addEscapedAndExpandedPath(String·string,·final·List·list)·{ 
108 ········final·String·escapeForLike·=·DatabaseUtils.escapeForLike(string); 
109 ········final·StringBuilder·sb·=·new·StringBuilder(); 
110 ········sb.append(escapeForLike); 
111 ········sb.append("/%"); 
112 ········string·=·sb.toString(); 
113 ········list.add(string); 
114 ········list.add(escapeForLike); 
115 ····} 
116 ···· 
117 ····private·void·addPending(final·ContentProviderOperation·e)·{104 ····private·void·addPending(final·ContentProviderOperation·e)·{
118 ········this.mPending.add(e);105 ········this.mPending.add(e);
119 ········if·(e.isInsert())·{106 ········if·(e.isInsert())·{
120 ············++this.mInsertCount;107 ············++this.mInsertCount;
121 ········}108 ········}
122 ········if·(e.isUpdate())·{109 ········if·(e.isUpdate())·{
123 ············++this.mUpdateCount;110 ············++this.mUpdateCount;
Offset 165, 15 lines modifiedOffset 152, 15 lines modified
165 ········//····52:·aconst_null····152 ········//····52:·aconst_null····
166 ········//····53:·astore··········4153 ········//····53:·astore··········4
167 ········//····55:·aload_2········154 ········//····55:·aload_2········
168 ········//····56:·arraylength····155 ········//····56:·arraylength····
169 ········//····57:·istore··········7156 ········//····57:·istore··········7
170 ········//····59:·iload···········6157 ········//····59:·iload···········6
171 ········//····61:·iload···········7158 ········//····61:·iload···········7
172 ········//····63:·if_icmpge·······247159 ········//····63:·if_icmpge·······246
173 ········//····66:·aload_2········160 ········//····66:·aload_2········
174 ········//····67:·iload···········6161 ········//····67:·iload···········6
175 ········//····69:·aaload·········162 ········//····69:·aaload·········
176 ········//····70:·astore··········5163 ········//····70:·astore··········5
177 ········//····72:·aload_0········164 ········//····72:·aload_0········
178 ········//····73:·getfield········com/android/providers/media/scan/ModernMediaScanner$Scan.mPending:Ljava/util/ArrayList;165 ········//····73:·getfield········com/android/providers/media/scan/ModernMediaScanner$Scan.mPending:Ljava/util/ArrayList;
179 ········//····76:·astore··········8166 ········//····76:·astore··········8
Offset 184, 170 lines modifiedOffset 171, 170 lines modified
184 ········//····87:·aload···········8171 ········//····87:·aload···········8
185 ········//····89:·checkcast·······Landroid/content/ContentProviderOperation;172 ········//····89:·checkcast·······Landroid/content/ContentProviderOperation;
186 ········//····92:·astore··········8173 ········//····92:·astore··········8
187 ········//····94:·aload···········5174 ········//····94:·aload···········5
188 ········//····96:·getfield········android/content/ContentProviderResult.exception:Ljava/lang/Throwable;175 ········//····96:·getfield········android/content/ContentProviderResult.exception:Ljava/lang/Throwable;
189 ········//····99:·astore··········9176 ········//····99:·astore··········9
190 ········//···101:·aload···········9177 ········//···101:·aload···········9
191 ········//···103:·ifnull··········160178 ········//···103:·ifnull··········159
192 ········//···106:·new·············Ljava/lang/StringBuilder;179 ········//···106:·new·············Ljava/lang/StringBuilder;
193 ········//···109:·astore··········9180 ········//···109:·astore··········9
194 ········//···111:·aload···········9181 ········//···111:·aload···········9
195 ········//···113:·invokespecial···java/lang/StringBuilder.<init>:()V182 ········//···113:·invokespecial···java/lang/StringBuilder.<init>:()V
196 ········//···116:·ldc_w···········"Failed·to·apply·"183 ········//···116:·ldc·············"Failed·to·apply·"
197 ········//···119:·astore··········10184 ········//···118:·astore··········10
198 ········//···121:·aload···········9185 ········//···120:·aload···········9
199 ········//···123:·aload···········10186 ········//···122:·aload···········10
200 ········//···125:·invokevirtual···java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;187 ········//···124:·invokevirtual···java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
201 ········//···128:·pop············188 ········//···127:·pop············
202 ········//···129:·aload···········9189 ········//···128:·aload···········9
203 ········//···131:·aload···········8190 ········//···130:·aload···········8
204 ········//···133:·invokevirtual···java/lang/StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;191 ········//···132:·invokevirtual···java/lang/StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
205 ········//···136:·pop············192 ········//···135:·pop············
206 ········//···137:·aload···········9193 ········//···136:·aload···········9
207 ········//···139:·invokevirtual···java/lang/StringBuilder.toString:()Ljava/lang/String;194 ········//···138:·invokevirtual···java/lang/StringBuilder.toString:()Ljava/lang/String;
208 ········//···142:·astore··········8195 ········//···141:·astore··········8
209 ········//···144:·aload···········5196 ········//···143:·aload···········5
210 ········//···146:·getfield········android/content/ContentProviderResult.exception:Ljava/lang/Throwable;197 ········//···145:·getfield········android/content/ContentProviderResult.exception:Ljava/lang/Throwable;
211 ········//···149:·astore··········9198 ········//···148:·astore··········9
212 ········//···151:·aload_1········199 ········//···150:·aload_1········
213 ········//···152:·aload···········8200 ········//···151:·aload···········8
214 ········//···154:·aload···········9201 ········//···153:·aload···········9
215 ········//···156:·invokestatic····android/util/Log.w:(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I202 ········//···155:·invokestatic····android/util/Log.w:(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
216 ········//···159:·pop············203 ········//···158:·pop············
217 ········//···160:·aload···········5204 ········//···159:·aload···········5
218 ········//···162:·getfield········android/content/ContentProviderResult.uri:Landroid/net/Uri;205 ········//···161:·getfield········android/content/ContentProviderResult.uri:Landroid/net/Uri;
219 ········//···165:·astore··········5206 ········//···164:·astore··········5
220 ········//···167:·aload···········5207 ········//···166:·aload···········5
221 ········//···169:·ifnull··········220208 ········//···168:·ifnull··········219
222 ········//···172:·aload···········5209 ········//···171:·aload···········5
223 ········//···174:·invokestatic····android/content/ContentUris.parseId:(Landroid/net/Uri;)J210 ········//···173:·invokestatic····android/content/ContentUris.parseId:(Landroid/net/Uri;)J
224 ········//···177:·lstore··········11211 ········//···176:·lstore··········11
225 ········//···179:·aload_0········212 ········//···178:·aload_0········
226 ········//···180:·getfield········com/android/providers/media/scan/ModernMediaScanner$Scan.mFirstId:J213 ········//···179:·getfield········com/android/providers/media/scan/ModernMediaScanner$Scan.mFirstId:J
227 ········//···183:·lstore··········13214 ········//···182:·lstore··········13
228 ········//···185:·iconst_m1······215 ········//···184:·iconst_m1······
229 ········//···186:·i2l············216 ········//···185:·i2l············
230 ········//···187:·lstore··········15217 ········//···186:·lstore··········15
231 ········//···189:·lload···········13218 ········//···188:·lload···········13
232 ········//···191:·lload···········15219 ········//···190:·lload···········15
233 ········//···193:·lcmp···········220 ········//···192:·lcmp···········
234 ········//···194:·istore··········17221 ········//···193:·istore··········17
235 ········//···196:·iload···········17222 ········//···195:·iload···········17
236 ········//···198:·ifne············207223 ········//···197:·ifne············206
237 ········//···201:·aload_0········224 ········//···200:·aload_0········
238 ········//···202:·lload···········11225 ········//···201:·lload···········11
239 ········//···204:·putfield········com/android/providers/media/scan/ModernMediaScanner$Scan.mFirstId:J226 ········//···203:·putfield········com/android/providers/media/scan/ModernMediaScanner$Scan.mFirstId:J
240 ········//···207:·aload_0········227 ········//···206:·aload_0········
241 ········//···208:·getfield········com/android/providers/media/scan/ModernMediaScanner$Scan.mScannedIds:Lcom/android/providers/media/util/LongArray;228 ········//···207:·getfield········com/android/providers/media/scan/ModernMediaScanner$Scan.mScannedIds:Lcom/android/providers/media/util/LongArray;
242 ········//···211:·astore··········9229 ········//···210:·astore··········9
243 ········//···213:·aload···········9230 ········//···212:·aload···········9
244 ········//···215:·lload···········11231 ········//···214:·lload···········11
245 ········//···217:·invokevirtual···com/android/providers/media/util/LongArray.add:(J)V232 ········//···216:·invokevirtual···com/android/providers/media/util/LongArray.add:(J)V
246 ········//···220:·iload···········6233 ········//···219:·iload···········6
247 ········//···222:·iconst_1·······234 ········//···221:·iconst_1·······
248 ········//···223:·iadd···········235 ········//···222:·iadd···········
249 ········//···224:·istore··········6236 ········//···223:·istore··········6
250 ········//···226:·goto············55237 ········//···225:·goto············55
251 ········//···229:·astore_1·······238 ········//···228:·astore_1·······
252 ········//···230:·goto············258239 ········//···229:·goto············257
253 ········//···233:·astore_2·······240 ········//···232:·astore_2·······
254 ········//···234:·ldc_w···········"Failed·to·apply"241 ········//···233:·ldc_w···········"Failed·to·apply"
255 ········//···237:·astore··········4242 ········//···236:·astore··········4
256 ········//···239:·aload_1········243 ········//···238:·aload_1········
257 ········//···240:·aload···········4244 ········//···239:·aload···········4
258 ········//···242:·aload_2········245 ········//···241:·aload_2········
259 ········//···243:·invokestatic····android/util/Log.w:(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I246 ········//···242:·invokestatic····android/util/Log.w:(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
260 ········//···246:·pop············247 ········//···245:·pop············
261 ········//···247:·aload_0········248 ········//···246:·aload_0········
262 ········//···248:·getfield········com/android/providers/media/scan/ModernMediaScanner$Scan.mPending:Ljava/util/ArrayList;249 ········//···247:·getfield········com/android/providers/media/scan/ModernMediaScanner$Scan.mPending:Ljava/util/ArrayList;
263 ········//···251:·invokevirtual···java/util/ArrayList.clear:()V250 ········//···250:·invokevirtual···java/util/ArrayList.clear:()V
264 ········//···254:·invokestatic····android/os/Trace.endSection:()V251 ········//···253:·invokestatic····android/os/Trace.endSection:()V
265 ········//···257:·return·········252 ········//···256:·return·········
266 ········//···258:·aload_0········253 ········//···257:·aload_0········
267 ········//···259:·getfield········com/android/providers/media/scan/ModernMediaScanner$Scan.mPending:Ljava/util/ArrayList;254 ········//···258:·getfield········com/android/providers/media/scan/ModernMediaScanner$Scan.mPending:Ljava/util/ArrayList;
268 ········//···262:·invokevirtual···java/util/ArrayList.clear:()V255 ········//···261:·invokevirtual···java/util/ArrayList.clear:()V
269 ········//···265:·invokestatic····android/os/Trace.endSection:()V256 ········//···264:·invokestatic····android/os/Trace.endSection:()V
270 ········//···268:·aload_1········257 ········//···267:·aload_1········
271 ········//···269:·athrow·········258 ········//···268:·athrow·········
272 ········//····Exceptions:259 ········//····Exceptions:
273 ········//··Try···········Handler260 ········//··Try···········Handler
274 ········//··Start··End····Start··End····Type···········································261 ········//··Start··End····Start··End····Type···········································
275 ········//··-----··-----··-----··-----··-----------------------------------------------262 ········//··-----··-----··-----··-----··-----------------------------------------------
276 ········//··25·····29·····233····247····Landroid/os/RemoteException;263 ········//··25·····29·····232····246····Landroid/os/RemoteException;
277 ········//··25·····29·····233····247····Landroid/content/OperationApplicationException;264 ········//··25·····29·····232····246····Landroid/content/OperationApplicationException;
278 ········//··25·····29·····229····233····Any265 ········//··25·····29·····228····232····Any
279 ········//··34·····38·····233····247····Landroid/os/RemoteException;266 ········//··34·····38·····232····246····Landroid/os/RemoteException;
280 ········//··34·····38·····233····247····Landroid/content/OperationApplicationException;267 ········//··34·····38·····232····246····Landroid/content/OperationApplicationException;
281 ········//··34·····38·····229····233····Any268 ········//··34·····38·····228····232····Any
282 ········//··43·····48·····233····247····Landroid/os/RemoteException;269 ········//··43·····48·····232····246····Landroid/os/RemoteException;
283 ········//··43·····48·····233····247····Landroid/content/OperationApplicationException;270 ········//··43·····48·····232····246····Landroid/content/OperationApplicationException;
284 ········//··43·····48·····229····233····Any271 ········//··43·····48·····228····232····Any
285 ········//··55·····57·····233····247····Landroid/os/RemoteException;272 ········//··55·····57·····232····246····Landroid/os/RemoteException;
286 ········//··55·····57·····233····247····Landroid/content/OperationApplicationException;273 ········//··55·····57·····232····246····Landroid/content/OperationApplicationException;
287 ········//··55·····57·····229····233····Any274 ········//··55·····57·····228····232····Any
288 ········//··67·····70·····233····247····Landroid/os/RemoteException;275 ········//··67·····70·····232····246····Landroid/os/RemoteException;
289 ········//··67·····70·····233····247····Landroid/content/OperationApplicationException;276 ········//··67·····70·····232····246····Landroid/content/OperationApplicationException;
290 ········//··67·····70·····229····233····Any277 ········//··67·····70·····228····232····Any
291 ········//··72·····76·····233····247····Landroid/os/RemoteException;278 ········//··72·····76·····232····246····Landroid/os/RemoteException;
292 ········//··72·····76·····233····247····Landroid/content/OperationApplicationException;279 ········//··72·····76·····232····246····Landroid/content/OperationApplicationException;
293 ········//··72·····76·····229····233····Any280 ········//··72·····76·····228····232····Any
294 ········//··80·····85·····233····247····Landroid/os/RemoteException;281 ········//··80·····85·····232····246····Landroid/os/RemoteException;
295 ········//··80·····85·····233····247····Landroid/content/OperationApplicationException;282 ········//··80·····85·····232····246····Landroid/content/OperationApplicationException;
296 ········//··80·····85·····229····233····Any283 ········//··80·····85·····228····232····Any
297 ········//··87·····92·····233····247····Landroid/os/RemoteException;284 ········//··87·····92·····232····246····Landroid/os/RemoteException;
298 ········//··87·····92·····233····247····Landroid/content/OperationApplicationException;285 ········//··87·····92·····232····246····Landroid/content/OperationApplicationException;
299 ········//··87·····92·····229····233····Any286 ········//··87·····92·····228····232····Any
300 ········//··94·····99·····233····247····Landroid/os/RemoteException;287 ········//··94·····99·····232····246····Landroid/os/RemoteException;
301 ········//··94·····99·····233····247····Landroid/content/OperationApplicationException;288 ········//··94·····99·····232····246····Landroid/content/OperationApplicationException;
302 ········//··94·····99·····229····233····Any289 ········//··94·····99·····228····232····Any
303 ········//··106····109····233····247····Landroid/os/RemoteException;290 ········//··106····109····232····246····Landroid/os/RemoteException;
304 ········//··106····109····233····247····Landroid/content/OperationApplicationException;291 ········//··106····109····232····246····Landroid/content/OperationApplicationException;
305 ········//··106····109····229····233····Any292 ········//··106····109····228····232····Any
306 ········//··111····116····233····247····Landroid/os/RemoteException;293 ········//··111····116····232····246····Landroid/os/RemoteException;
307 ········//··111····116····233····247····Landroid/content/OperationApplicationException;294 ········//··111····116····232····246····Landroid/content/OperationApplicationException;
308 ········//··111····116····229····233····Any295 ········//··111····116····228····232····Any
309 ········//··123····129····233····247····Landroid/os/RemoteException;296 ········//··122····128····232····246····Landroid/os/RemoteException;
310 ········//··123····129····233····247····Landroid/content/OperationApplicationException;297 ········//··122····128····232····246····Landroid/content/OperationApplicationException;
311 ········//··123····129····229····233····Any298 ········//··122····128····228····232····Any
312 ········//··131····137····233····247····Landroid/os/RemoteException;299 ········//··130····136····232····246····Landroid/os/RemoteException;
313 ········//··131····137····233····247····Landroid/content/OperationApplicationException;300 ········//··130····136····232····246····Landroid/content/OperationApplicationException;
314 ········//··131····137····229····233····Any301 ········//··130····136····228····232····Any
315 ········//··137····142····233····247····Landroid/os/RemoteException;302 ········//··136····141····232····246····Landroid/os/RemoteException;
316 ········//··137····142····233····247····Landroid/content/OperationApplicationException;303 ········//··136····141····232····246····Landroid/content/OperationApplicationException;
317 ········//··137····142····229····233····Any304 ········//··136····141····228····232····Any
318 ········//··144····149····233····247····Landroid/os/RemoteException;305 ········//··143····148····232····246····Landroid/os/RemoteException;
319 ········//··144····149····233····247····Landroid/content/OperationApplicationException;306 ········//··143····148····232····246····Landroid/content/OperationApplicationException;
320 ········//··144····149····229····233····Any307 ········//··143····148····228····232····Any
 308 ········//··153····159····232····246····Landroid/os/RemoteException;
 309 ········//··153····159····232····246····Landroid/content/OperationApplicationException;
 310 ········//··153····159····228····232····Any
321 ········//··154····160····233····247····Landroid/os/RemoteException;311 ········//··159····164····232····246····Landroid/os/RemoteException;
322 ········//··154····160····233····247····Landroid/content/OperationApplicationException;312 ········//··159····164····232····246····Landroid/content/OperationApplicationException;
323 ········//··154····160····229····233····Any313 ········//··159····164····228····232····Any
324 ········//··160····165····233····247····Landroid/os/RemoteException; 
325 ········//··160····165····233····247····Landroid/content/OperationApplicationException; 
326 ········//··160····165····229····233····Any 
327 ········//··172····177····233····247····Landroid/os/RemoteException;314 ········//··171····176····232····246····Landroid/os/RemoteException;
328 ········//··172····177····233····247····Landroid/content/OperationApplicationException;315 ········//··171····176····232····246····Landroid/content/OperationApplicationException;
329 ········//··172····177····229····233····Any316 ········//··171····176····228····232····Any
330 ········//··179····183····233····247····Landroid/os/RemoteException;317 ········//··178····182····232····246····Landroid/os/RemoteException;
331 ········//··179····183····233····247····Landroid/content/OperationApplicationException;318 ········//··178····182····232····246····Landroid/content/OperationApplicationException;
332 ········//··179····183····229····233····Any319 ········//··178····182····228····232····Any
333 ········//··202····207····233····247····Landroid/os/RemoteException; 
334 ········//··202····207····233····247····Landroid/content/OperationApplicationException; 
335 ········//··202····207····229····233····Any 
336 ········//··207····211····233····247····Landroid/os/RemoteException; 
337 ········//··207····211····233····247····Landroid/content/OperationApplicationException; 
338 ········//··207····211····229····233····Any 
339 ········//··215····220····233····247····Landroid/os/RemoteException;320 ········//··201····206····232····246····Landroid/os/RemoteException;
340 ········//··215····220····233····247····Landroid/content/OperationApplicationException;321 ········//··201····206····232····246····Landroid/content/OperationApplicationException;
 322 ········//··201····206····228····232····Any
 323 ········//··206····210····232····246····Landroid/os/RemoteException;
 324 ········//··206····210····232····246····Landroid/content/OperationApplicationException;
341 ········//··215····220····229····233····Any325 ········//··206····210····228····232····Any
 326 ········//··214····219····232····246····Landroid/os/RemoteException;
 327 ········//··214····219····232····246····Landroid/content/OperationApplicationException;
 328 ········//··214····219····228····232····Any
342 ········//··242····247····229····233····Any329 ········//··241····246····228····232····Any
343 ········//·330 ········//·
344 ········//·The·error·that·occurred·was:331 ········//·The·error·that·occurred·was:
345 ········//·332 ········//·
346 ········//·java.lang.IllegalStateException:·Expression·is·linked·from·several·locations:·Label_0207:333 ········//·java.lang.IllegalStateException:·Expression·is·linked·from·several·locations:·Label_0206:
347 ········//·····at·com.strobel.decompiler.ast.Error.expressionLinkedFromMultipleLocations(Error.java:27)334 ········//·····at·com.strobel.decompiler.ast.Error.expressionLinkedFromMultipleLocations(Error.java:27)
348 ········//·····at·com.strobel.decompiler.ast.AstOptimizer.mergeDisparateObjectInitializations(AstOptimizer.java:2596)335 ········//·····at·com.strobel.decompiler.ast.AstOptimizer.mergeDisparateObjectInitializations(AstOptimizer.java:2596)
349 ········//·····at·com.strobel.decompiler.ast.AstOptimizer.optimize(AstOptimizer.java:235)336 ········//·····at·com.strobel.decompiler.ast.AstOptimizer.optimize(AstOptimizer.java:235)
350 ········//·····at·com.strobel.decompiler.ast.AstOptimizer.optimize(AstOptimizer.java:42)337 ········//·····at·com.strobel.decompiler.ast.AstOptimizer.optimize(AstOptimizer.java:42)
351 ········//·····at·com.strobel.decompiler.languages.java.ast.AstMethodBodyBuilder.createMethodBody(AstMethodBodyBuilder.java:214)338 ········//·····at·com.strobel.decompiler.languages.java.ast.AstMethodBodyBuilder.createMethodBody(AstMethodBodyBuilder.java:214)
352 ········//·····at·com.strobel.decompiler.languages.java.ast.AstMethodBodyBuilder.createMethodBody(AstMethodBodyBuilder.java:99)339 ········//·····at·com.strobel.decompiler.languages.java.ast.AstMethodBodyBuilder.createMethodBody(AstMethodBodyBuilder.java:99)
353 ········//·····at·com.strobel.decompiler.languages.java.ast.AstBuilder.createMethodBody(AstBuilder.java:757)340 ········//·····at·com.strobel.decompiler.languages.java.ast.AstBuilder.createMethodBody(AstBuilder.java:757)
Offset 361, 109 lines modifiedOffset 348, 69 lines modified
361 ········//·····at·com.strobel.decompiler.languages.java.JavaLanguage.decompileType(JavaLanguage.java:59)348 ········//·····at·com.strobel.decompiler.languages.java.JavaLanguage.decompileType(JavaLanguage.java:59)
362 ········//·····at·com.strobel.decompiler.DecompilerDriver.decompileType(DecompilerDriver.java:336)349 ········//·····at·com.strobel.decompiler.DecompilerDriver.decompileType(DecompilerDriver.java:336)
363 ········//·····at·com.strobel.decompiler.DecompilerDriver.main(DecompilerDriver.java:144)350 ········//·····at·com.strobel.decompiler.DecompilerDriver.main(DecompilerDriver.java:144)
364 ········//·351 ········//·
365 ········throw·new·IllegalStateException("An·error·occurred·while·decompiling·this·method.");352 ········throw·new·IllegalStateException("An·error·occurred·while·decompiling·this·method.");
366 ····}353 ····}
367 ····354 ····
368 ····private·String·buildExcludeDirClause(final·int·n)·{ 
369 ········if·(n·==·0)·{ 
370 ············return·""; 
371 ········} 
372 ········final·String·s·=·"_data·NOT·LIKE·?·ESCAPE·'\\'"; 
373 ········final·String·s2·=·"·AND·"; 
374 ········final·StringBuilder·sb·=·new·StringBuilder(); 
375 ········sb.append("("); 
376 ········for·(int·i·=·0;·i·<·n;·++i)·{ 
377 ············sb.append(s); 
378 ············sb.append(s2); 
379 ············sb.append(s); 
380 ············if·(i·!=·n·-·1)·{ 
381 ················sb.append(s2); 
382 ············} 
383 ········} 
384 ········sb.append(")"); 
385 ········return·sb.toString(); 
386 ····} 
387 ···· 
388 ····private·String[]·buildSqlSelectionArgs()·{ 
389 ········final·ArrayList·list·=·new·ArrayList(); 
390 ········this.addEscapedAndExpandedPath(this.mRoot.getAbsolutePath(),·list); 
391 ········final·Iterator<String>·iterator·=·(Iterator<String>)this.mExcludeDirs.iterator(); 
392 ········while·(iterator.hasNext())·{ 
393 ············this.addEscapedAndExpandedPath(iterator.next(),·list); 
394 ········} 
395 ········return·(String[])list.toArray(new·String[0]); 
396 ····} 
397 ···· 
398 ····private·void·maybeApplyPending()·{355 ····private·void·maybeApplyPending()·{
399 ········if·(this.mPending.size()·>·32)·{356 ········if·(this.mPending.size()·>·32)·{
400 ············this.applyPending();357 ············this.applyPending();
401 ········}358 ········}
402 ····}359 ····}
403 ····360 ····
404 ····private·void·reconcileAndClean()·{361 ····private·void·reconcileAndClean()·{
405 ········final·long[]·array·=·this.mScannedIds.toArray();362 ········final·long[]·array·=·this.mScannedIds.toArray();
406 ········Arrays.sort(array);363 ········Arrays.sort(array);
407 ········this.mSignal.throwIfCanceled();364 ········this.mSignal.throwIfCanceled();
408 ········Trace.beginSection("reconcile");365 ········Trace.beginSection("reconcile");
409 ········final·String·buildExcludeDirClause·=·this.buildExcludeDirClause(this.mExcludeDirs.size()); 
410 ········final·StringBuilder·sb·=·new·StringBuilder();366 ········final·StringBuilder·sb·=·new·StringBuilder();
411 ········sb.append("generation_added·<=·");367 ········sb.append("generation_added·<=·");
412 ········sb.append(this.mStartGeneration);368 ········sb.append(this.mStartGeneration);
413 ········final·String·string·=·sb.toString();369 ········final·String·string·=·sb.toString();
 370 ········final·Bundle·bundle·=·new·Bundle();
414 ········final·StringBuilder·sb2·=·new·StringBuilder();371 ········final·StringBuilder·sb2·=·new·StringBuilder();
415 ········sb2.append("ifnull(format,12288)·!=·47621·AND·(_data·LIKE·?·ESCAPE·'\\'·OR·_data·LIKE·?·ESCAPE·'\\')·AND·");372 ········sb2.append("ifnull(format,12288)·!=·47621·AND·(_data·LIKE·?·ESCAPE·'\\'·OR·_data·LIKE·?·ESCAPE·'\\')·AND·");
416 ········sb2.append(string);373 ········sb2.append(string);
 374 ········bundle.putString("android:query-arg-sql-selection",·sb2.toString());
 375 ········final·String·escapeForLike·=·DatabaseUtils.escapeForLike(this.mRoot.getAbsolutePath());
 376 ········final·int·n·=·2;
 377 ········final·String[]·array2·=·new·String[n];
417 ········String·string2; 
418 ········if·(buildExcludeDirClause.isEmpty())·{ 
419 ············string2·=·""; 
420 ········} 
421 ········else·{ 
422 ············final·StringBuilder·sb3·=·new·StringBuilder();378 ········final·StringBuilder·sb3·=·new·StringBuilder();
 379 ········sb3.append(escapeForLike);
423 ············sb3.append("·AND·");380 ········sb3.append("/%");
424 ············sb3.append(buildExcludeDirClause); 
425 ············string2·=·sb3.toString(); 
426 ········} 
427 ········sb2.append(string2); 
428 ········final·String·string3·=·sb2.toString();381 ········final·String·string2·=·sb3.toString();
429 ········final·Bundle·bundle·=·new·Bundle();382 ········int·i·=·0;
 383 ········array2[0]·=·string2;
 384 ········final·int·n2·=·1;
 385 ········array2[n2]·=·escapeForLike;
430 ········bundle.putString("android:query-arg-sql-selection",·string3);386 ········bundle.putStringArray("android:query-arg-sql-selection-args",·array2);
431 ········bundle.putStringArray("android:query-arg-sql-selection-args",·this.buildSqlSelectionArgs()); 
432 ········bundle.putString("android:query-arg-sql-sort-order",·"_id·DESC");387 ········bundle.putString("android:query-arg-sql-sort-order",·"_id·DESC");
433 ········bundle.putInt("android:query-arg-match-pending",·2);388 ········bundle.putInt("android:query-arg-match-pending",·n);
434 ········final·int·n·=·1; 
435 ········bundle.putInt("android:query-arg-match-trashed",·n);389 ········bundle.putInt("android:query-arg-match-trashed",·n2);
436 ········bundle.putInt("android:query-arg-match-favorite",·n);390 ········bundle.putInt("android:query-arg-match-favorite",·n2);
437 ········try·{391 ········try·{
438 ············Object·query·=·this.mResolver.query(this.mFilesUri,·new·String[]·{·"_id"·},·bundle,·this.mSignal);392 ············Object·query·=·this.mResolver.query(this.mFilesUri,·new·String[]·{·"_id"·},·bundle,·this.mSignal);
439 ············try·{393 ············try·{
 394 ················while·(((Cursor)query).moveToNext())·{
440 ················int·i; 
441 ················while·(true)·{ 
442 ····················final·boolean·moveToNext·=·((Cursor)query).moveToNext(); 
443 ····················i·=·0; 
444 ····················if·(!moveToNext)·{ 
445 ························break; 
446 ····················} 
447 ····················final·long·long1·=·((Cursor)query).getLong(0);395 ····················final·long·long1·=·((Cursor)query).getLong(0);
448 ····················if·(Arrays.binarySearch(array,·long1)·>=·0)·{396 ····················if·(Arrays.binarySearch(array,·long1)·<·0)·{
449 ························continue;397 ························this.mUnknownIds.add(long1);
450 ····················}398 ····················}
451 ····················this.mUnknownIds.add(long1); 
452 ················}399 ················}
453 ················if·(query·!=·null)·{400 ················if·(query·!=·null)·{
454 ····················((Cursor)query).close();401 ····················((Cursor)query).close();
455 ················}402 ················}
456 ················Trace.endSection();403 ················Trace.endSection();
457 ················this.mSignal.throwIfCanceled();404 ················this.mSignal.throwIfCanceled();
458 ················Trace.beginSection("clean");405 ················Trace.beginSection("clean");
459 ················try·{406 ················try·{
460 ····················while·(i·<·this.mUnknownIds.size())·{407 ····················while·(i·<·this.mUnknownIds.size())·{
461 ························final·long·value·=·this.mUnknownIds.get(i);408 ························final·long·value·=·this.mUnknownIds.get(i);
462 ························if·(ModernMediaScanner.access$600())·{409 ························if·(ModernMediaScanner.access$200())·{
463 ····························final·String·s·=·"ModernMediaScanner";410 ····························final·String·s·=·"ModernMediaScanner";
464 ····························final·StringBuilder·sb4·=·new·StringBuilder();411 ····························final·StringBuilder·sb4·=·new·StringBuilder();
465 ····························sb4.append("Cleaning·");412 ····························sb4.append("Cleaning·");
466 ····························sb4.append(value);413 ····························sb4.append(value);
467 ····························Log.v(s,·sb4.toString());414 ····························Log.v(s,·sb4.toString());
468 ························}415 ························}
469 ························final·Uri$Builder·buildUpon·=·MediaStore$Files.getContentUri(this.mVolumeName,·value).buildUpon();416 ························final·Uri$Builder·buildUpon·=·MediaStore$Files.getContentUri(this.mVolumeName,·value).buildUpon();
Offset 494, 21 lines modifiedOffset 441, 21 lines modified
494 ········finally·{441 ········finally·{
495 ············Trace.endSection();442 ············Trace.endSection();
496 ········}443 ········}
497 ····}444 ····}
498 ····445 ····
499 ····private·void·releaseDirectoryLock(final·Path·path)·{446 ····private·void·releaseDirectoryLock(final·Path·path)·{
500 ········Trace.beginSection("releaseDirectoryLock");447 ········Trace.beginSection("releaseDirectoryLock");
501 ········synchronized·(ModernMediaScanner.access$700(this.this$0))·{448 ········synchronized·(ModernMediaScanner.access$300(this.this$0))·{
502 ············final·ModernMediaScanner$DirectoryLock·modernMediaScanner$DirectoryLock·=·(ModernMediaScanner$DirectoryLock)ModernMediaScanner.access$700(this.this$0).get(path);449 ············final·ModernMediaScanner$DirectoryLock·modernMediaScanner$DirectoryLock·=·(ModernMediaScanner$DirectoryLock)ModernMediaScanner.access$300(this.this$0).get(path);
503 ············if·(modernMediaScanner$DirectoryLock·!=·null)·{450 ············if·(modernMediaScanner$DirectoryLock·!=·null)·{
504 ················if·(--modernMediaScanner$DirectoryLock.count·==·0)·{451 ················if·(--modernMediaScanner$DirectoryLock.count·==·0)·{
505 ····················ModernMediaScanner.access$700(this.this$0).remove(path);452 ····················ModernMediaScanner.access$300(this.this$0).remove(path);
506 ················}453 ················}
507 ················//·monitorexit(ModernMediaScanner.access$700(this.this$0))454 ················//·monitorexit(ModernMediaScanner.access$300(this.this$0))
508 ················modernMediaScanner$DirectoryLock.lock.unlock();455 ················modernMediaScanner$DirectoryLock.lock.unlock();
509 ················this.mAcquiredDirectoryLocks.remove(path);456 ················this.mAcquiredDirectoryLocks.remove(path);
510 ················Trace.endSection();457 ················Trace.endSection();
511 ················return;458 ················return;
512 ············}459 ············}
513 ············throw·new·IllegalStateException();460 ············throw·new·IllegalStateException();
514 ········}461 ········}
Offset 549, 26 lines modifiedOffset 496, 14 lines modified
549 ············}496 ············}
550 ········}497 ········}
551 ········finally·{498 ········finally·{
552 ············Trace.endSection();499 ············Trace.endSection();
553 ········}500 ········}
554 ····}501 ····}
555 ····502 ····
556 ····private·void·runInternal()·{ 
557 ········final·long·elapsedRealtime·=·SystemClock.elapsedRealtime(); 
558 ········this.walkFileTree(); 
559 ········if·(!this.mSingleFile·||·this.mScannedIds.size()·!=·1)·{ 
560 ············this.reconcileAndClean(); 
561 ········} 
562 ········this.resolvePlaylists(); 
563 ········if·(!this.mSingleFile)·{ 
564 ············Metrics.logScan(this.mVolumeName,·this.mReason,·(long)this.mFileCount,·SystemClock.elapsedRealtime()·-·elapsedRealtime,·this.mInsertCount,·this.mUpdateCount,·this.mDeleteCount); 
565 ········} 
566 ····} 
567 ···· 
568 ····private·void·walkFileTree()·{503 ····private·void·walkFileTree()·{
569 ········//·504 ········//·
570 ········//·This·method·could·not·be·decompiled.505 ········//·This·method·could·not·be·decompiled.
571 ········//·506 ········//·
572 ········//·Original·Bytecode:507 ········//·Original·Bytecode:
573 ········//·508 ········//·
574 ········//·····1:·getfield········com/android/providers/media/scan/ModernMediaScanner$Scan.mSignal:Landroid/os/CancellationSignal;509 ········//·····1:·getfield········com/android/providers/media/scan/ModernMediaScanner$Scan.mSignal:Landroid/os/CancellationSignal;
Offset 725, 19 lines modifiedOffset 660, 23 lines modified
725 ········//·····at·com.strobel.decompiler.DecompilerDriver.decompileType(DecompilerDriver.java:336)660 ········//·····at·com.strobel.decompiler.DecompilerDriver.decompileType(DecompilerDriver.java:336)
726 ········//·····at·com.strobel.decompiler.DecompilerDriver.main(DecompilerDriver.java:144)661 ········//·····at·com.strobel.decompiler.DecompilerDriver.main(DecompilerDriver.java:144)
727 ········//·662 ········//·
728 ········throw·new·IllegalStateException("An·error·occurred·while·decompiling·this·method.");663 ········throw·new·IllegalStateException("An·error·occurred·while·decompiling·this·method.");
729 ····}664 ····}
730 ····665 ····
731 ····public·void·close()·{666 ····public·void·close()·{
 667 ········if·(this.mPending.isEmpty())·{
732 ········final·Iterator·iterator·=·new·ArraySet((Collection)this.mAcquiredDirectoryLocks).iterator();668 ············final·Iterator·iterator·=·new·ArraySet((Collection)this.mAcquiredDirectoryLocks).iterator();
733 ········while·(iterator.hasNext())·{669 ············while·(iterator.hasNext())·{
734 ············this.releaseDirectoryLock(iterator.next());670 ················this.releaseDirectoryLock(iterator.next());
 671 ············}
 672 ············this.mClient.close();
 673 ············return;
735 ········}674 ········}
736 ········this.mClient.close();675 ········throw·new·IllegalStateException();
737 ····}676 ····}
738 ····677 ····
739 ····public·Uri·getFirstResult()·{678 ····public·Uri·getFirstResult()·{
740 ········final·long·mFirstId·=·this.mFirstId;679 ········final·long·mFirstId·=·this.mFirstId;
741 ········if·(mFirstId·==·-1)·{680 ········if·(mFirstId·==·-1)·{
742 ············return·null;681 ············return·null;
743 ········}682 ········}
Offset 796, 73 lines modifiedOffset 735, 46 lines modified
796 ····735 ····
797 ····public·FileVisitResult·postVisitDirectory(final·Path·path,·final·IOException·ex)·{736 ····public·FileVisitResult·postVisitDirectory(final·Path·path,·final·IOException·ex)·{
798 ········this.applyPending();737 ········this.applyPending();
799 ········if·(FileUtils.isDirectoryHidden(path.toFile()))·{738 ········if·(FileUtils.isDirectoryHidden(path.toFile()))·{
800 ············--this.mHiddenDirCount;739 ············--this.mHiddenDirCount;
801 ········}740 ········}
802 ········this.releaseDirectoryLock(path);741 ········this.releaseDirectoryLock(path);
803 ········synchronized·(ModernMediaScanner.access$900(this.this$0))·{ 
804 ············if·(ModernMediaScanner.access$900(this.this$0).remove(path.toFile().getPath()))·{ 
805 ················FileUtils.setDirectoryDirty(path.toFile(),·false); 
806 ············} 
807 ············return·FileVisitResult.CONTINUE;742 ········return·FileVisitResult.CONTINUE;
808 ········} 
809 ····}743 ····}
810 ····744 ····
811 ····public·FileVisitResult·preVisitDirectory(final·Path·path,·final·BasicFileAttributes·basicFileAttributes)·{745 ····public·FileVisitResult·preVisitDirectory(final·Path·path,·final·BasicFileAttributes·basicFileAttributes)·{
812 ········this.mSignal.throwIfCanceled();746 ········this.mSignal.throwIfCanceled();
813 ········if·(!ModernMediaScanner.shouldScanDirectory(path.toFile()))·{747 ········if·(!ModernMediaScanner.shouldScanDirectory(path.toFile()))·{
814 ············return·FileVisitResult.SKIP_SUBTREE;748 ············return·FileVisitResult.SKIP_SUBTREE;
815 ········}749 ········}
816 ········Object·o·=·ModernMediaScanner.access$900(this.this$0); 
817 ········synchronized·(o)·{ 
818 ············if·(FileUtils.isDirectoryDirty(path.toFile()))·{ 
819 ················ModernMediaScanner.access$900(this.this$0).add(path.toFile().getPath()); 
820 ············} 
821 ············else·{ 
822 ················final·String·s·=·"ModernMediaScanner"; 
823 ················final·StringBuilder·sb·=·new·StringBuilder(); 
824 ················sb.append("Skipping·preVisitDirectory·"); 
825 ················sb.append(path.toFile()); 
826 ················Log.d(s,·sb.toString()); 
827 ················if·(this.mExcludeDirs.size()·<=·450)·{ 
828 ····················this.mExcludeDirs.add(path.toFile().getPath()); 
829 ····················return·FileVisitResult.SKIP_SUBTREE; 
830 ················} 
831 ················final·String·s2·=·"ModernMediaScanner"; 
832 ················final·StringBuilder·sb2·=·new·StringBuilder(); 
833 ················sb2.append("ExcludeDir·size·exceeded,·not·skipping·preVisitDirectory·"); 
834 ················sb2.append(path.toFile()); 
835 ················Log.w(s2,·sb2.toString()); 
836 ············} 
837 ············//·monitorexit(o) 
838 ············this.acquireDirectoryLock(path);750 ········this.acquireDirectoryLock(path);
839 ············o·=·path.toFile(); 
840 ············if·(FileUtils.isDirectoryHidden((File)o))·{751 ········if·(FileUtils.isDirectoryHidden(path.toFile()))·{
841 ················++this.mHiddenDirCount;752 ············++this.mHiddenDirCount;
842 ············} 
843 ············return·this.visitFile(path,·basicFileAttributes); 
844 ········}753 ········}
 754 ········return·this.visitFile(path,·basicFileAttributes);
845 ····}755 ····}
846 ····756 ····
847 ····public·void·run()·{757 ····public·void·run()·{
848 ········ModernMediaScanner.access$400(this.this$0,·this); 
849 ········try·{ 
850 ············this.runInternal();758 ········final·long·elapsedRealtime·=·SystemClock.elapsedRealtime();
 759 ········this.walkFileTree();
 760 ········if·(!this.mSingleFile·||·this.mScannedIds.size()·!=·1)·{
 761 ············this.reconcileAndClean();
851 ········}762 ········}
852 ········finally·{ 
853 ············ModernMediaScanner.access$500(this.this$0,·this);763 ········this.resolvePlaylists();
 764 ········if·(!this.mSingleFile)·{
 765 ············Metrics.logScan(this.mVolumeName,·this.mReason,·(long)this.mFileCount,·SystemClock.elapsedRealtime()·-·elapsedRealtime,·this.mInsertCount,·this.mUpdateCount,·this.mDeleteCount);
854 ········}766 ········}
855 ····}767 ····}
856 ····768 ····
857 ····public·FileVisitResult·visitFile(final·Path·path,·final·BasicFileAttributes·basicFileAttributes)·{769 ····public·FileVisitResult·visitFile(final·Path·path,·final·BasicFileAttributes·basicFileAttributes)·{
858 ········final·ModernMediaScanner$Scan·modernMediaScanner$Scan·=·this;770 ········final·ModernMediaScanner$Scan·modernMediaScanner$Scan·=·this;
859 ········final·boolean·access$600·=·ModernMediaScanner.access$600();771 ········final·boolean·access$200·=·ModernMediaScanner.access$200();
860 ········final·String·s·=·"ModernMediaScanner";772 ········final·String·s·=·"ModernMediaScanner";
861 ········if·(access$600)·{773 ········if·(access$200)·{
862 ············final·StringBuilder·sb·=·new·StringBuilder();774 ············final·StringBuilder·sb·=·new·StringBuilder();
863 ············sb.append("Visiting·");775 ············sb.append("Visiting·");
864 ············sb.append(path);776 ············sb.append(path);
865 ············Log.v(s,·sb.toString());777 ············Log.v(s,·sb.toString());
866 ········}778 ········}
867 ········final·int·mFileCount·=·modernMediaScanner$Scan.mFileCount;779 ········final·int·mFileCount·=·modernMediaScanner$Scan.mFileCount;
868 ········final·int·n·=·1;780 ········final·int·n·=·1;
Offset 871, 32 lines modifiedOffset 783, 32 lines modified
871 ········String·s2;783 ········String·s2;
872 ········if·(basicFileAttributes.isDirectory())·{784 ········if·(basicFileAttributes.isDirectory())·{
873 ············s2·=·null;785 ············s2·=·null;
874 ········}786 ········}
875 ········else·{787 ········else·{
876 ············s2·=·MimeUtils.resolveMimeType(file);788 ············s2·=·MimeUtils.resolveMimeType(file);
877 ········}789 ········}
878 ········final·boolean·contains·=·ModernMediaScanner.access$1000(modernMediaScanner$Scan.this$0).contains(s2);790 ········final·boolean·contains·=·ModernMediaScanner.access$500(modernMediaScanner$Scan.this$0).contains(s2);
879 ········if·(contains)·{791 ········if·(contains)·{
880 ············s2·=·ModernMediaScanner.access$1100(modernMediaScanner$Scan.this$0).getOriginalMimeType(file.getPath());792 ············s2·=·ModernMediaScanner.access$600(modernMediaScanner$Scan.this$0).getOriginalMimeType(file.getPath());
881 ········}793 ········}
882 ········final·String·anotherString·=·s2;794 ········final·String·anotherString·=·s2;
883 ········int·access$601;795 ········int·access$201;
884 ········if·(anotherString·!=·null)·{796 ········if·(anotherString·!=·null)·{
885 ············int·n2;797 ············int·n2;
886 ············if·(modernMediaScanner$Scan.mHiddenDirCount·>·0)·{798 ············if·(modernMediaScanner$Scan.mHiddenDirCount·>·0)·{
887 ················n2·=·n;799 ················n2·=·n;
888 ············}800 ············}
889 ············else·{801 ············else·{
890 ················n2·=·0;802 ················n2·=·0;
891 ············}803 ············}
892 ············access$601·=·ModernMediaScanner.access$1200(file,·anotherString,·(boolean)(n2·!=·0));804 ············access$201·=·ModernMediaScanner.access$700(file,·anotherString,·(boolean)(n2·!=·0));
893 ········}805 ········}
894 ········else·{806 ········else·{
895 ············access$601·=·0;807 ············access$201·=·0;
896 ········}808 ········}
897 ········Trace.beginSection("checkChanged");809 ········Trace.beginSection("checkChanged");
898 ········final·Bundle·bundle·=·new·Bundle();810 ········final·Bundle·bundle·=·new·Bundle();
899 ········bundle.putString("android:query-arg-sql-selection",·"_data=?");811 ········bundle.putString("android:query-arg-sql-selection",·"_data=?");
900 ········final·String[]·array·=·new·String[n];812 ········final·String[]·array·=·new·String[n];
901 ········array[0]·=·file.getAbsolutePath();813 ········array[0]·=·file.getAbsolutePath();
902 ········bundle.putStringArray("android:query-arg-sql-selection-args",·array);814 ········bundle.putStringArray("android:query-arg-sql-selection-args",·array);
Offset 938, 21 lines modifiedOffset 850, 21 lines modified
938 ································boolean·equalsIgnoreCase;850 ································boolean·equalsIgnoreCase;
939 ································if·(string·==·null)·{851 ································if·(string·==·null)·{
940 ····································equalsIgnoreCase·=·(anotherString·==·null);852 ····································equalsIgnoreCase·=·(anotherString·==·null);
941 ································}853 ································}
942 ································else·{854 ································else·{
943 ····································equalsIgnoreCase·=·string.equalsIgnoreCase(anotherString);855 ····································equalsIgnoreCase·=·string.equalsIgnoreCase(anotherString);
944 ································}856 ································}
945 ································final·boolean·b5·=·access$601·==·int1;857 ································final·boolean·b5·=·access$201·==·int1;
946 ································final·boolean·b6·=·b3·&&·b4·&&·b5·&&·equalsIgnoreCase·&&·!b2;858 ································final·boolean·b6·=·b3·&&·b4·&&·b5·&&·equalsIgnoreCase·&&·!b2;
947 ································if·(!basicFileAttributes.isDirectory()·&&·!b6)·{859 ································if·(!basicFileAttributes.isDirectory()·&&·!b6)·{
948 ····································n3·=·long1;860 ····································n3·=·long1;
949 ····································break·Label_0884;861 ····································break·Label_0884;
950 ································}862 ································}
951 ································if·(ModernMediaScanner.access$600())·{863 ································if·(ModernMediaScanner.access$200())·{
952 ····································final·StringBuilder·sb2·=·new·StringBuilder();864 ····································final·StringBuilder·sb2·=·new·StringBuilder();
953 ····································sb2.append("Skipping·unchanged·");865 ····································sb2.append("Skipping·unchanged·");
954 ····································sb2.append(path);866 ····································sb2.append(path);
955 ····································Log.v(s,·sb2.toString());867 ····································Log.v(s,·sb2.toString());
956 ································}868 ································}
957 ································final·FileVisitResult·continue1·=·FileVisitResult.CONTINUE;869 ································final·FileVisitResult·continue1·=·FileVisitResult.CONTINUE;
958 ································if·(cursor·!=·null)·{870 ································if·(cursor·!=·null)·{
Offset 969, 27 lines modifiedOffset 881, 27 lines modified
969 ····················}881 ····················}
970 ····················if·(cursor·!=·null)·{882 ····················if·(cursor·!=·null)·{
971 ························cursor.close();883 ························cursor.close();
972 ····················}884 ····················}
973 ····················Trace.endSection();885 ····················Trace.endSection();
974 ····················Trace.beginSection("scanItem");886 ····················Trace.beginSection("scanItem");
975 ····················try·{887 ····················try·{
976 ························final·ContentProviderOperation$Builder·access$602·=·ModernMediaScanner.access$1300(n3,·file,·basicFileAttributes,·anotherString,·access$601,·modernMediaScanner$Scan.mVolumeName);888 ························final·ContentProviderOperation$Builder·access$202·=·ModernMediaScanner.access$800(n3,·file,·basicFileAttributes,·anotherString,·access$201,·modernMediaScanner$Scan.mVolumeName);
977 ························Trace.endSection();889 ························Trace.endSection();
978 ························if·(access$602·!=·null)·{890 ························if·(access$202·!=·null)·{
979 ····························if·(access$602.build().isInsert()·&&·!basicFileAttributes.isDirectory())·{891 ····························if·(access$202.build().isInsert()·&&·!basicFileAttributes.isDirectory())·{
980 ································final·String·mOwnerPackage·=·modernMediaScanner$Scan.mOwnerPackage;892 ································final·String·mOwnerPackage·=·modernMediaScanner$Scan.mOwnerPackage;
981 ································if·(mOwnerPackage·!=·null)·{893 ································if·(mOwnerPackage·!=·null)·{
982 ····································access$602.withValue("owner_package_name",·(Object)mOwnerPackage);894 ····································access$202.withValue("owner_package_name",·(Object)mOwnerPackage);
983 ································}895 ································}
984 ····························}896 ····························}
985 ····························if·(contains)·{897 ····························if·(contains)·{
986 ································access$602.withValue("is_drm",·(Object)1);898 ································access$202.withValue("is_drm",·(Object)1);
987 ····························}899 ····························}
988 ····························modernMediaScanner$Scan.addPending(access$602.build());900 ····························modernMediaScanner$Scan.addPending(access$202.build());
989 ····························this.maybeApplyPending();901 ····························this.maybeApplyPending();
990 ························}902 ························}
991 ························return·FileVisitResult.CONTINUE;903 ························return·FileVisitResult.CONTINUE;
992 ····················}904 ····················}
993 ····················finally·{905 ····················finally·{
994 ························Trace.endSection();906 ························Trace.endSection();
995 ····················}907 ····················}