File tree Expand file tree Collapse file tree
shell/platform/android/io/flutter/view Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -101,6 +101,11 @@ private String checkTimestamp(File dataDir) {
101101 TIMESTAMP_PREFIX + packageInfo .versionCode + "-" + packageInfo .lastUpdateTime ;
102102
103103 final String [] existingTimestamps = getExistingTimestamps (dataDir );
104+
105+ if (existingTimestamps == null ) {
106+ return null ;
107+ }
108+
104109 if (existingTimestamps .length != 1
105110 || !expectedTimestamp .equals (existingTimestamps [0 ])) {
106111 return expectedTimestamp ;
@@ -173,7 +178,11 @@ private void deleteFiles() {
173178 file .delete ();
174179 }
175180 }
176- for (String timestamp : getExistingTimestamps (dataDir )) {
181+ final String [] existingTimestamps = getExistingTimestamps (dataDir );
182+ if (existingTimestamps == null ) {
183+ return ;
184+ }
185+ for (String timestamp : existingTimestamps ) {
177186 new File (dataDir , timestamp ).delete ();
178187 }
179188 }
You can’t perform that action at this time.
0 commit comments