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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/preferences/autofill/AutofillPreferences.java

Issue 1394003005: AutofillPreferences: Modify UI only when it's available. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/android/java/src/org/chromium/chrome/browser/preferences/autofill/AutofillPreferences.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/autofill/AutofillPreferences.java b/chrome/android/java/src/org/chromium/chrome/browser/preferences/autofill/AutofillPreferences.java
index 0602f73cedb3d1887e436d8d7b5067657617d360..b1efafe6f12c188f4d060c947ca4d9b1196957c0 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/preferences/autofill/AutofillPreferences.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/preferences/autofill/AutofillPreferences.java
@@ -4,8 +4,6 @@
package org.chromium.chrome.browser.preferences.autofill;
-import android.app.Activity;
-import android.content.Context;
import android.graphics.PorterDuff;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
@@ -177,22 +175,14 @@ public class AutofillPreferences extends PreferenceFragment
}
@Override
- public void onDestroy() {
- super.onDestroy();
- PersonalDataManager.getInstance().unregisterDataObserver(this);
- }
-
- // TODO: remove this than we only support Build.VERSION_CODES.M and newer.
- @SuppressWarnings("deprecation")
- @Override
- public void onAttach(Activity activity) {
- super.onAttach(activity);
+ public void onActivityCreated(Bundle savedInstanceState) {
+ super.onActivityCreated(savedInstanceState);
PersonalDataManager.getInstance().registerDataObserver(this);
}
@Override
- public void onAttach(Context context) {
- super.onAttach(context);
- PersonalDataManager.getInstance().registerDataObserver(this);
+ public void onDestroyView() {
+ PersonalDataManager.getInstance().unregisterDataObserver(this);
+ super.onDestroyView();
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698