Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Side by Side Diff: chrome/android/java/src/org/chromium/chrome/browser/preferences/SearchEnginePreference.java

Issue 2670623003: Speculative fixes for search engine crashes. (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/android/java/src/org/chromium/chrome/browser/preferences/SearchEngineAdapter.java ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package org.chromium.chrome.browser.preferences; 5 package org.chromium.chrome.browser.preferences;
6 6
7 import android.os.Bundle; 7 import android.os.Bundle;
8 import android.preference.PreferenceFragment; 8 import android.preference.PreferenceFragment;
9 import android.view.ViewGroup.MarginLayoutParams; 9 import android.view.ViewGroup.MarginLayoutParams;
10 import android.widget.ListView; 10 import android.widget.ListView;
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 int marginTop = getActivity().getResources().getDimensionPixelSize( 49 int marginTop = getActivity().getResources().getDimensionPixelSize(
50 R.dimen.search_engine_list_margin_top); 50 R.dimen.search_engine_list_margin_top);
51 MarginLayoutParams layoutParams = (MarginLayoutParams) mListView.getLayo utParams(); 51 MarginLayoutParams layoutParams = (MarginLayoutParams) mListView.getLayo utParams();
52 layoutParams.setMargins(0, marginTop, 0, 0); 52 layoutParams.setMargins(0, marginTop, 0, 0);
53 mListView.setLayoutParams(layoutParams); 53 mListView.setLayoutParams(layoutParams);
54 mListView.setAdapter(mSearchEngineAdapter); 54 mListView.setAdapter(mSearchEngineAdapter);
55 mListView.setDivider(null); 55 mListView.setDivider(null);
56 } 56 }
57 57
58 @Override 58 @Override
59 public void onResume() { 59 public void onStart() {
60 super.onResume(); 60 super.onStart();
61 /** 61 mSearchEngineAdapter.start();
62 * Handle UI update when location setting for a search engine is changed . 62 }
63 */ 63
64 mSearchEngineAdapter.notifyDataSetChanged(); 64 @Override
65 public void onStop() {
66 super.onStop();
67 mSearchEngineAdapter.stop();
65 } 68 }
66 } 69 }
OLDNEW
« no previous file with comments | « chrome/android/java/src/org/chromium/chrome/browser/preferences/SearchEngineAdapter.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698