Commit 19afa81d authored by Natalie Chouinard's avatar Natalie Chouinard Committed by Commit Bot

Keep empty constructor for all Fragments

An empty public constructor should be kept for all Fragments, not just
those in Settings. This change also allows us to move settings code
alongside respective feature code (see bug).

Bug: 1047357
Change-Id: I9e776766be4a693622150b58db5e057447118fe2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2036872
Commit-Queue: Natalie Chouinard <chouinard@chromium.org>
Reviewed-by: default avatarSam Maier <smaier@chromium.org>
Cr-Commit-Position: refs/heads/master@{#738265}
parent 83c98d10
...@@ -311,10 +311,9 @@ ...@@ -311,10 +311,9 @@
# Use of this source code is governed by a BSD-style license that can be # Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file. # found in the LICENSE file.
# Fragments loaded by name via Fragment.instantiate(Context,String) # Every fragment must have an empty constructor, so it can be instantiated when
# Not all fragments in this package are PreferenceFragments. E.g. HomepageEditor # restoring its activity's state.
# is a normal Fragment. -keep public class org.chromium.chrome.browser.** extends android.support.v4.app.Fragment {
-keep public class org.chromium.chrome.browser.settings.** extends android.support.v4.app.Fragment {
public <init>(); public <init>();
} }
......
...@@ -2,10 +2,9 @@ ...@@ -2,10 +2,9 @@
# Use of this source code is governed by a BSD-style license that can be # Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file. # found in the LICENSE file.
# Fragments loaded by name via Fragment.instantiate(Context,String) # Every fragment must have an empty constructor, so it can be instantiated when
# Not all fragments in this package are PreferenceFragments. E.g. HomepageEditor # restoring its activity's state.
# is a normal Fragment. -keep public class org.chromium.chrome.browser.** extends android.support.v4.app.Fragment {
-keep public class org.chromium.chrome.browser.settings.** extends android.support.v4.app.Fragment {
public <init>(); public <init>();
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment