OSDN Git Service

Set the default mode to grid view.
authorTomasz Mikolajewski <mtomasz@google.com>
Mon, 28 Dec 2015 08:57:30 +0000 (17:57 +0900)
committerTomasz Mikolajewski <mtomasz@google.com>
Mon, 28 Dec 2015 08:57:30 +0000 (17:57 +0900)
Bug: 26329660
Change-Id: I2445e39dde02549e1f3ca4461558129918aa4bb7

packages/DocumentsUI/src/com/android/documentsui/DirectoryLoader.java
packages/DocumentsUI/src/com/android/documentsui/State.java

index 4eacee5..6719b23 100644 (file)
@@ -114,11 +114,7 @@ public class DirectoryLoader extends AsyncTaskLoader<DirectoryResult> {
         if (userMode != State.MODE_UNKNOWN) {
             result.mode = userMode;
         } else {
-            if ((mDoc.flags & Document.FLAG_DIR_PREFERS_GRID) != 0) {
-                result.mode = State.MODE_GRID;
-            } else {
-                result.mode = State.MODE_LIST;
-            }
+            result.mode = State.MODE_GRID;
         }
 
         if (mUserSortOrder != State.SORT_ORDER_UNKNOWN) {
index c81d4fb..46372c0 100644 (file)
@@ -36,7 +36,7 @@ public class State implements android.os.Parcelable {
     /** Explicit user choice */
     public int userMode = MODE_UNKNOWN;
     /** Derived after loader */
-    public int derivedMode = MODE_LIST;
+    public int derivedMode = MODE_GRID;
 
     /** Explicit user choice */
     public int userSortOrder = SORT_ORDER_UNKNOWN;