Fan Zhang | 914afbf | 2016-11-01 15:36:25 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2016 The Android Open Source Project |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
| 17 | package com.android.settingslib.drawer; |
| 18 | |
James Lemieux | 5c50dc1 | 2018-02-12 01:30:32 -0800 | [diff] [blame] | 19 | import static com.google.common.truth.Truth.assertThat; |
| 20 | |
Fan Zhang | fc76ab3 | 2016-11-14 09:48:06 -0800 | [diff] [blame] | 21 | import android.content.ComponentName; |
Fan Zhang | 914afbf | 2016-11-01 15:36:25 -0700 | [diff] [blame] | 22 | import android.content.Context; |
Fan Zhang | fc76ab3 | 2016-11-14 09:48:06 -0800 | [diff] [blame] | 23 | import android.content.Intent; |
Fan Zhang | 914afbf | 2016-11-01 15:36:25 -0700 | [diff] [blame] | 24 | import android.util.Pair; |
| 25 | |
Tony Mantler | 4ca9ebd | 2017-07-31 10:54:20 -0700 | [diff] [blame] | 26 | import com.android.settingslib.SettingsLibRobolectricTestRunner; |
Fan Zhang | 914afbf | 2016-11-01 15:36:25 -0700 | [diff] [blame] | 27 | |
| 28 | import org.junit.Before; |
| 29 | import org.junit.Test; |
| 30 | import org.junit.runner.RunWith; |
Fan Zhang | 914afbf | 2016-11-01 15:36:25 -0700 | [diff] [blame] | 31 | import org.robolectric.shadows.ShadowApplication; |
| 32 | |
| 33 | import java.util.HashMap; |
| 34 | import java.util.Map; |
| 35 | |
Tony Mantler | 4ca9ebd | 2017-07-31 10:54:20 -0700 | [diff] [blame] | 36 | @RunWith(SettingsLibRobolectricTestRunner.class) |
Fan Zhang | 914afbf | 2016-11-01 15:36:25 -0700 | [diff] [blame] | 37 | public class CategoryManagerTest { |
| 38 | |
| 39 | private Context mContext; |
| 40 | private CategoryManager mCategoryManager; |
| 41 | private Map<Pair<String, String>, Tile> mTileByComponentCache; |
| 42 | private Map<String, DashboardCategory> mCategoryByKeyMap; |
| 43 | |
| 44 | @Before |
| 45 | public void setUp() { |
| 46 | mContext = ShadowApplication.getInstance().getApplicationContext(); |
| 47 | mTileByComponentCache = new HashMap<>(); |
| 48 | mCategoryByKeyMap = new HashMap<>(); |
| 49 | mCategoryManager = CategoryManager.get(mContext); |
| 50 | } |
| 51 | |
| 52 | @Test |
| 53 | public void getInstance_shouldBeSingleton() { |
| 54 | assertThat(mCategoryManager).isSameAs(CategoryManager.get(mContext)); |
| 55 | } |
| 56 | |
| 57 | @Test |
| 58 | public void backwardCompatCleanupForCategory_shouldNotChangeCategoryForNewKeys() { |
| 59 | final Tile tile1 = new Tile(); |
| 60 | final Tile tile2 = new Tile(); |
| 61 | tile1.category = CategoryKey.CATEGORY_ACCOUNT; |
| 62 | tile2.category = CategoryKey.CATEGORY_ACCOUNT; |
| 63 | final DashboardCategory category = new DashboardCategory(); |
| 64 | category.addTile(tile1); |
| 65 | category.addTile(tile2); |
| 66 | mCategoryByKeyMap.put(CategoryKey.CATEGORY_ACCOUNT, category); |
| 67 | mTileByComponentCache.put(new Pair<>("PACKAGE", "1"), tile1); |
| 68 | mTileByComponentCache.put(new Pair<>("PACKAGE", "2"), tile2); |
| 69 | |
| 70 | mCategoryManager.backwardCompatCleanupForCategory(mTileByComponentCache, mCategoryByKeyMap); |
| 71 | |
| 72 | assertThat(mCategoryByKeyMap.size()).isEqualTo(1); |
| 73 | assertThat(mCategoryByKeyMap.get(CategoryKey.CATEGORY_ACCOUNT)).isNotNull(); |
| 74 | } |
| 75 | |
| 76 | @Test |
| 77 | public void backwardCompatCleanupForCategory_shouldNotChangeCategoryForMixedKeys() { |
| 78 | final Tile tile1 = new Tile(); |
| 79 | final Tile tile2 = new Tile(); |
| 80 | final String oldCategory = "com.android.settings.category.wireless"; |
| 81 | tile1.category = CategoryKey.CATEGORY_ACCOUNT; |
| 82 | tile2.category = oldCategory; |
| 83 | final DashboardCategory category1 = new DashboardCategory(); |
| 84 | category1.addTile(tile1); |
| 85 | final DashboardCategory category2 = new DashboardCategory(); |
| 86 | category2.addTile(tile2); |
| 87 | mCategoryByKeyMap.put(CategoryKey.CATEGORY_ACCOUNT, category1); |
| 88 | mCategoryByKeyMap.put(oldCategory, category2); |
| 89 | mTileByComponentCache.put(new Pair<>("PACKAGE", "CLASS1"), tile1); |
| 90 | mTileByComponentCache.put(new Pair<>("PACKAGE", "CLASS2"), tile2); |
| 91 | |
| 92 | mCategoryManager.backwardCompatCleanupForCategory(mTileByComponentCache, mCategoryByKeyMap); |
| 93 | |
| 94 | assertThat(mCategoryByKeyMap.size()).isEqualTo(2); |
Doris Ling | b8d2cd4 | 2017-11-27 12:24:09 -0800 | [diff] [blame] | 95 | assertThat( |
| 96 | mCategoryByKeyMap.get(CategoryKey.CATEGORY_ACCOUNT).getTilesCount()).isEqualTo(1); |
| 97 | assertThat(mCategoryByKeyMap.get(oldCategory).getTilesCount()).isEqualTo(1); |
Fan Zhang | 914afbf | 2016-11-01 15:36:25 -0700 | [diff] [blame] | 98 | } |
| 99 | |
| 100 | @Test |
| 101 | public void backwardCompatCleanupForCategory_shouldChangeCategoryForOldKeys() { |
| 102 | final Tile tile1 = new Tile(); |
| 103 | final String oldCategory = "com.android.settings.category.wireless"; |
| 104 | tile1.category = oldCategory; |
| 105 | final DashboardCategory category1 = new DashboardCategory(); |
| 106 | category1.addTile(tile1); |
| 107 | mCategoryByKeyMap.put(oldCategory, category1); |
| 108 | mTileByComponentCache.put(new Pair<>("PACKAGE", "CLASS1"), tile1); |
| 109 | |
| 110 | mCategoryManager.backwardCompatCleanupForCategory(mTileByComponentCache, mCategoryByKeyMap); |
| 111 | |
| 112 | // Added 1 more category to category map. |
| 113 | assertThat(mCategoryByKeyMap.size()).isEqualTo(2); |
| 114 | // The new category map has CATEGORY_NETWORK type now, which contains 1 tile. |
Doris Ling | b8d2cd4 | 2017-11-27 12:24:09 -0800 | [diff] [blame] | 115 | assertThat( |
| 116 | mCategoryByKeyMap.get(CategoryKey.CATEGORY_NETWORK).getTilesCount()).isEqualTo(1); |
Fan Zhang | 914afbf | 2016-11-01 15:36:25 -0700 | [diff] [blame] | 117 | // Old category still exists. |
Doris Ling | b8d2cd4 | 2017-11-27 12:24:09 -0800 | [diff] [blame] | 118 | assertThat(mCategoryByKeyMap.get(oldCategory).getTilesCount()).isEqualTo(1); |
Fan Zhang | 914afbf | 2016-11-01 15:36:25 -0700 | [diff] [blame] | 119 | } |
Fan Zhang | fc76ab3 | 2016-11-14 09:48:06 -0800 | [diff] [blame] | 120 | |
| 121 | @Test |
Doris Ling | ce31159 | 2017-03-13 12:56:10 -0700 | [diff] [blame] | 122 | public void sortCategories_singlePackage_shouldReorderBasedOnPriority() { |
Fan Zhang | fc76ab3 | 2016-11-14 09:48:06 -0800 | [diff] [blame] | 123 | // Create some fake tiles that are not sorted. |
| 124 | final String testPackage = "com.android.test"; |
| 125 | final DashboardCategory category = new DashboardCategory(); |
| 126 | final Tile tile1 = new Tile(); |
| 127 | tile1.intent = |
| 128 | new Intent().setComponent(new ComponentName(testPackage, "class1")); |
| 129 | tile1.priority = 100; |
| 130 | final Tile tile2 = new Tile(); |
| 131 | tile2.intent = |
| 132 | new Intent().setComponent(new ComponentName(testPackage, "class2")); |
| 133 | tile2.priority = 50; |
| 134 | final Tile tile3 = new Tile(); |
| 135 | tile3.intent = |
| 136 | new Intent().setComponent(new ComponentName(testPackage, "class3")); |
| 137 | tile3.priority = 200; |
Doris Ling | b8d2cd4 | 2017-11-27 12:24:09 -0800 | [diff] [blame] | 138 | category.addTile(tile1); |
| 139 | category.addTile(tile2); |
| 140 | category.addTile(tile3); |
Fan Zhang | fc76ab3 | 2016-11-14 09:48:06 -0800 | [diff] [blame] | 141 | mCategoryByKeyMap.put(CategoryKey.CATEGORY_HOMEPAGE, category); |
| 142 | |
Doris Ling | ce31159 | 2017-03-13 12:56:10 -0700 | [diff] [blame] | 143 | // Sort their priorities |
| 144 | mCategoryManager.sortCategories(ShadowApplication.getInstance().getApplicationContext(), |
Fan Zhang | fc76ab3 | 2016-11-14 09:48:06 -0800 | [diff] [blame] | 145 | mCategoryByKeyMap); |
| 146 | |
| 147 | // Verify they are now sorted. |
Doris Ling | b8d2cd4 | 2017-11-27 12:24:09 -0800 | [diff] [blame] | 148 | assertThat(category.getTile(0)).isSameAs(tile3); |
| 149 | assertThat(category.getTile(1)).isSameAs(tile1); |
| 150 | assertThat(category.getTile(2)).isSameAs(tile2); |
Fan Zhang | fc76ab3 | 2016-11-14 09:48:06 -0800 | [diff] [blame] | 151 | } |
| 152 | |
| 153 | @Test |
Doris Ling | ce31159 | 2017-03-13 12:56:10 -0700 | [diff] [blame] | 154 | public void sortCategories_multiPackage_shouldReorderBasedOnPackageAndPriority() { |
Fan Zhang | fc76ab3 | 2016-11-14 09:48:06 -0800 | [diff] [blame] | 155 | // Create some fake tiles that are not sorted. |
| 156 | final String testPackage1 = "com.android.test1"; |
| 157 | final String testPackage2 = "com.android.test2"; |
| 158 | final DashboardCategory category = new DashboardCategory(); |
| 159 | final Tile tile1 = new Tile(); |
| 160 | tile1.intent = |
| 161 | new Intent().setComponent(new ComponentName(testPackage2, "class1")); |
| 162 | tile1.priority = 100; |
| 163 | final Tile tile2 = new Tile(); |
| 164 | tile2.intent = |
| 165 | new Intent().setComponent(new ComponentName(testPackage1, "class2")); |
| 166 | tile2.priority = 100; |
| 167 | final Tile tile3 = new Tile(); |
| 168 | tile3.intent = |
| 169 | new Intent().setComponent(new ComponentName(testPackage1, "class3")); |
| 170 | tile3.priority = 50; |
Doris Ling | b8d2cd4 | 2017-11-27 12:24:09 -0800 | [diff] [blame] | 171 | category.addTile(tile1); |
| 172 | category.addTile(tile2); |
| 173 | category.addTile(tile3); |
Fan Zhang | fc76ab3 | 2016-11-14 09:48:06 -0800 | [diff] [blame] | 174 | mCategoryByKeyMap.put(CategoryKey.CATEGORY_HOMEPAGE, category); |
| 175 | |
Doris Ling | ce31159 | 2017-03-13 12:56:10 -0700 | [diff] [blame] | 176 | // Sort their priorities |
| 177 | mCategoryManager.sortCategories(ShadowApplication.getInstance().getApplicationContext(), |
Fan Zhang | fc76ab3 | 2016-11-14 09:48:06 -0800 | [diff] [blame] | 178 | mCategoryByKeyMap); |
| 179 | |
| 180 | // Verify they are now sorted. |
Doris Ling | b8d2cd4 | 2017-11-27 12:24:09 -0800 | [diff] [blame] | 181 | assertThat(category.getTile(0)).isSameAs(tile2); |
| 182 | assertThat(category.getTile(1)).isSameAs(tile1); |
| 183 | assertThat(category.getTile(2)).isSameAs(tile3); |
Fan Zhang | fc76ab3 | 2016-11-14 09:48:06 -0800 | [diff] [blame] | 184 | } |
| 185 | |
| 186 | @Test |
Doris Ling | ce31159 | 2017-03-13 12:56:10 -0700 | [diff] [blame] | 187 | public void sortCategories_internalPackageTiles_shouldSkipTileForInternalPackage() { |
Fan Zhang | fc76ab3 | 2016-11-14 09:48:06 -0800 | [diff] [blame] | 188 | // Create some fake tiles that are not sorted. |
| 189 | final String testPackage = |
| 190 | ShadowApplication.getInstance().getApplicationContext().getPackageName(); |
| 191 | final DashboardCategory category = new DashboardCategory(); |
| 192 | final Tile tile1 = new Tile(); |
| 193 | tile1.intent = |
| 194 | new Intent().setComponent(new ComponentName(testPackage, "class1")); |
| 195 | tile1.priority = 100; |
| 196 | final Tile tile2 = new Tile(); |
| 197 | tile2.intent = |
| 198 | new Intent().setComponent(new ComponentName(testPackage, "class2")); |
| 199 | tile2.priority = 100; |
| 200 | final Tile tile3 = new Tile(); |
| 201 | tile3.intent = |
| 202 | new Intent().setComponent(new ComponentName(testPackage, "class3")); |
| 203 | tile3.priority = 50; |
Doris Ling | b8d2cd4 | 2017-11-27 12:24:09 -0800 | [diff] [blame] | 204 | category.addTile(tile1); |
| 205 | category.addTile(tile2); |
| 206 | category.addTile(tile3); |
Fan Zhang | fc76ab3 | 2016-11-14 09:48:06 -0800 | [diff] [blame] | 207 | mCategoryByKeyMap.put(CategoryKey.CATEGORY_HOMEPAGE, category); |
| 208 | |
Doris Ling | ce31159 | 2017-03-13 12:56:10 -0700 | [diff] [blame] | 209 | // Sort their priorities |
| 210 | mCategoryManager.sortCategories(ShadowApplication.getInstance().getApplicationContext(), |
Fan Zhang | fc76ab3 | 2016-11-14 09:48:06 -0800 | [diff] [blame] | 211 | mCategoryByKeyMap); |
| 212 | |
| 213 | // Verify the sorting order is not changed |
Doris Ling | b8d2cd4 | 2017-11-27 12:24:09 -0800 | [diff] [blame] | 214 | assertThat(category.getTile(0)).isSameAs(tile1); |
| 215 | assertThat(category.getTile(1)).isSameAs(tile2); |
| 216 | assertThat(category.getTile(2)).isSameAs(tile3); |
Doris Ling | ce31159 | 2017-03-13 12:56:10 -0700 | [diff] [blame] | 217 | } |
| 218 | |
| 219 | @Test |
| 220 | public void sortCategories_internalAndExternalPackageTiles_shouldRetainPriorityOrdering() { |
| 221 | // Inject one external tile among internal tiles. |
| 222 | final String testPackage = |
| 223 | ShadowApplication.getInstance().getApplicationContext().getPackageName(); |
| 224 | final String testPackage2 = "com.google.test2"; |
| 225 | final DashboardCategory category = new DashboardCategory(); |
| 226 | final Tile tile1 = new Tile(); |
| 227 | tile1.intent = new Intent().setComponent(new ComponentName(testPackage, "class1")); |
| 228 | tile1.priority = 2; |
| 229 | final Tile tile2 = new Tile(); |
| 230 | tile2.intent = new Intent().setComponent(new ComponentName(testPackage, "class2")); |
| 231 | tile2.priority = 1; |
| 232 | final Tile tile3 = new Tile(); |
| 233 | tile3.intent = new Intent().setComponent(new ComponentName(testPackage2, "class0")); |
| 234 | tile3.priority = 0; |
| 235 | final Tile tile4 = new Tile(); |
| 236 | tile4.intent = new Intent().setComponent(new ComponentName(testPackage, "class3")); |
| 237 | tile4.priority = -1; |
Doris Ling | b8d2cd4 | 2017-11-27 12:24:09 -0800 | [diff] [blame] | 238 | category.addTile(tile1); |
| 239 | category.addTile(tile2); |
| 240 | category.addTile(tile3); |
| 241 | category.addTile(tile4); |
Doris Ling | ce31159 | 2017-03-13 12:56:10 -0700 | [diff] [blame] | 242 | mCategoryByKeyMap.put(CategoryKey.CATEGORY_HOMEPAGE, category); |
| 243 | |
| 244 | // Sort their priorities |
| 245 | mCategoryManager.sortCategories(ShadowApplication.getInstance().getApplicationContext(), |
| 246 | mCategoryByKeyMap); |
| 247 | |
| 248 | // Verify the sorting order is not changed |
Doris Ling | b8d2cd4 | 2017-11-27 12:24:09 -0800 | [diff] [blame] | 249 | assertThat(category.getTile(0)).isSameAs(tile1); |
| 250 | assertThat(category.getTile(1)).isSameAs(tile2); |
| 251 | assertThat(category.getTile(2)).isSameAs(tile3); |
| 252 | assertThat(category.getTile(3)).isSameAs(tile4); |
Doris Ling | ce31159 | 2017-03-13 12:56:10 -0700 | [diff] [blame] | 253 | } |
| 254 | |
| 255 | @Test |
| 256 | public void sortCategories_samePriority_internalPackageTileShouldTakePrecedence() { |
| 257 | // Inject one external tile among internal tiles with same priority. |
| 258 | final String testPackage = |
| 259 | ShadowApplication.getInstance().getApplicationContext().getPackageName(); |
| 260 | final String testPackage2 = "com.google.test2"; |
| 261 | final String testPackage3 = "com.abcde.test3"; |
| 262 | final DashboardCategory category = new DashboardCategory(); |
| 263 | final Tile tile1 = new Tile(); |
| 264 | tile1.intent = new Intent().setComponent(new ComponentName(testPackage2, "class1")); |
| 265 | tile1.priority = 1; |
| 266 | final Tile tile2 = new Tile(); |
| 267 | tile2.intent = new Intent().setComponent(new ComponentName(testPackage, "class2")); |
| 268 | tile2.priority = 1; |
| 269 | final Tile tile3 = new Tile(); |
| 270 | tile3.intent = new Intent().setComponent(new ComponentName(testPackage3, "class3")); |
| 271 | tile3.priority = 1; |
Doris Ling | b8d2cd4 | 2017-11-27 12:24:09 -0800 | [diff] [blame] | 272 | category.addTile(tile1); |
| 273 | category.addTile(tile2); |
| 274 | category.addTile(tile3); |
Doris Ling | ce31159 | 2017-03-13 12:56:10 -0700 | [diff] [blame] | 275 | mCategoryByKeyMap.put(CategoryKey.CATEGORY_HOMEPAGE, category); |
| 276 | |
| 277 | // Sort their priorities |
| 278 | mCategoryManager.sortCategories(ShadowApplication.getInstance().getApplicationContext(), |
| 279 | mCategoryByKeyMap); |
| 280 | |
| 281 | // Verify the sorting order is internal first, follow by package name ordering |
Doris Ling | b8d2cd4 | 2017-11-27 12:24:09 -0800 | [diff] [blame] | 282 | assertThat(category.getTile(0)).isSameAs(tile2); |
| 283 | assertThat(category.getTile(1)).isSameAs(tile3); |
| 284 | assertThat(category.getTile(2)).isSameAs(tile1); |
Fan Zhang | fc76ab3 | 2016-11-14 09:48:06 -0800 | [diff] [blame] | 285 | } |
Fan Zhang | 5fa4af0 | 2016-11-16 12:40:35 -0800 | [diff] [blame] | 286 | |
| 287 | @Test |
| 288 | public void filterTiles_noDuplicate_noChange() { |
| 289 | // Create some unique tiles |
| 290 | final String testPackage = |
| 291 | ShadowApplication.getInstance().getApplicationContext().getPackageName(); |
| 292 | final DashboardCategory category = new DashboardCategory(); |
| 293 | final Tile tile1 = new Tile(); |
| 294 | tile1.intent = |
| 295 | new Intent().setComponent(new ComponentName(testPackage, "class1")); |
| 296 | tile1.priority = 100; |
| 297 | final Tile tile2 = new Tile(); |
| 298 | tile2.intent = |
| 299 | new Intent().setComponent(new ComponentName(testPackage, "class2")); |
| 300 | tile2.priority = 100; |
| 301 | final Tile tile3 = new Tile(); |
| 302 | tile3.intent = |
| 303 | new Intent().setComponent(new ComponentName(testPackage, "class3")); |
| 304 | tile3.priority = 50; |
Doris Ling | b8d2cd4 | 2017-11-27 12:24:09 -0800 | [diff] [blame] | 305 | category.addTile(tile1); |
| 306 | category.addTile(tile2); |
| 307 | category.addTile(tile3); |
Fan Zhang | 5fa4af0 | 2016-11-16 12:40:35 -0800 | [diff] [blame] | 308 | mCategoryByKeyMap.put(CategoryKey.CATEGORY_HOMEPAGE, category); |
| 309 | |
| 310 | mCategoryManager.filterDuplicateTiles(mCategoryByKeyMap); |
| 311 | |
Doris Ling | b8d2cd4 | 2017-11-27 12:24:09 -0800 | [diff] [blame] | 312 | assertThat(category.getTilesCount()).isEqualTo(3); |
Fan Zhang | 5fa4af0 | 2016-11-16 12:40:35 -0800 | [diff] [blame] | 313 | } |
| 314 | |
| 315 | @Test |
| 316 | public void filterTiles_hasDuplicate_shouldOnlyKeepUniqueTiles() { |
| 317 | // Create tiles pointing to same intent. |
| 318 | final String testPackage = |
| 319 | ShadowApplication.getInstance().getApplicationContext().getPackageName(); |
| 320 | final DashboardCategory category = new DashboardCategory(); |
| 321 | final Tile tile1 = new Tile(); |
| 322 | tile1.intent = |
| 323 | new Intent().setComponent(new ComponentName(testPackage, "class1")); |
| 324 | tile1.priority = 100; |
| 325 | final Tile tile2 = new Tile(); |
| 326 | tile2.intent = |
| 327 | new Intent().setComponent(new ComponentName(testPackage, "class1")); |
| 328 | tile2.priority = 100; |
| 329 | final Tile tile3 = new Tile(); |
| 330 | tile3.intent = |
| 331 | new Intent().setComponent(new ComponentName(testPackage, "class1")); |
| 332 | tile3.priority = 50; |
Doris Ling | b8d2cd4 | 2017-11-27 12:24:09 -0800 | [diff] [blame] | 333 | category.addTile(tile1); |
| 334 | category.addTile(tile2); |
| 335 | category.addTile(tile3); |
Fan Zhang | 5fa4af0 | 2016-11-16 12:40:35 -0800 | [diff] [blame] | 336 | mCategoryByKeyMap.put(CategoryKey.CATEGORY_HOMEPAGE, category); |
| 337 | |
| 338 | mCategoryManager.filterDuplicateTiles(mCategoryByKeyMap); |
| 339 | |
Doris Ling | b8d2cd4 | 2017-11-27 12:24:09 -0800 | [diff] [blame] | 340 | assertThat(category.getTilesCount()).isEqualTo(1); |
Fan Zhang | 5fa4af0 | 2016-11-16 12:40:35 -0800 | [diff] [blame] | 341 | } |
Fan Zhang | 914afbf | 2016-11-01 15:36:25 -0700 | [diff] [blame] | 342 | } |