| Index: chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDirectoryManager.java
|
| diff --git a/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDirectoryManager.java b/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDirectoryManager.java
|
| index a811afa4918e42d2b33e6f504c6c7b9f95db5b45..5d7631d768e53ba848ad7f6351e4fcf923aa3072 100644
|
| --- a/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDirectoryManager.java
|
| +++ b/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDirectoryManager.java
|
| @@ -111,28 +111,24 @@ public class WebappDirectoryManager {
|
| }
|
| }
|
|
|
| - if (webappBaseDirectory != null) {
|
| - // Delete all web app directories in the main directory, which were for pre-L web apps.
|
| - File appDirectory = new File(context.getApplicationInfo().dataDir);
|
| - String webappDirectoryAppBaseName = webappBaseDirectory.getName();
|
| - File[] files = appDirectory.listFiles();
|
| - if (files != null) {
|
| - for (File file : files) {
|
| - String filename = file.getName();
|
| - if (!filename.startsWith(webappDirectoryAppBaseName)) continue;
|
| - if (filename.length() == webappDirectoryAppBaseName.length()) continue;
|
| - directoriesToDelete.add(file);
|
| - }
|
| + // Delete all web app directories in the main directory, which were for pre-L web apps.
|
| + File appDirectory = new File(context.getApplicationInfo().dataDir);
|
| + String webappDirectoryAppBaseName = webappBaseDirectory.getName();
|
| + File[] files = appDirectory.listFiles();
|
| + if (files != null) {
|
| + for (File file : files) {
|
| + String filename = file.getName();
|
| + if (!filename.startsWith(webappDirectoryAppBaseName)) continue;
|
| + if (filename.length() == webappDirectoryAppBaseName.length()) continue;
|
| + directoriesToDelete.add(file);
|
| }
|
| + }
|
|
|
| - // Clean out web app directories no longer corresponding to tasks in Recents.
|
| - if (webappBaseDirectory.exists()) {
|
| - files = webappBaseDirectory.listFiles();
|
| - if (files != null) {
|
| - for (File file : files) {
|
| - if (!liveWebapps.contains(file.getName())) directoriesToDelete.add(file);
|
| - }
|
| - }
|
| + // Clean out web app directories no longer corresponding to tasks in Recents.
|
| + files = webappBaseDirectory.listFiles();
|
| + if (files != null) {
|
| + for (File file : files) {
|
| + if (!liveWebapps.contains(file.getName())) directoriesToDelete.add(file);
|
| }
|
| }
|
| }
|
|
|