Merge "Rephrase the see more button of Internet panel when ProviderModel is enabled"
This commit is contained in:
committed by
Android (Google) Code Review
commit
91c03a3254
@@ -34,10 +34,6 @@ import java.util.List;
|
||||
|
||||
/**
|
||||
* Represents the Internet Connectivity Panel.
|
||||
*
|
||||
* <p>
|
||||
* Displays Wifi (full Slice) and Airplane mode.
|
||||
* </p>
|
||||
*/
|
||||
public class InternetConnectivityPanel implements PanelContent {
|
||||
|
||||
@@ -78,6 +74,21 @@ public class InternetConnectivityPanel implements PanelContent {
|
||||
.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isCustomizedButtonUsed() {
|
||||
return Utils.isProviderModelEnabled(mContext);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CharSequence getCustomizedButtonTitle() {
|
||||
return mContext.getText(R.string.settings_button);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onClickCustomizedButton() {
|
||||
mContext.startActivity(getSeeMoreIntent());
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMetricsCategory() {
|
||||
return SettingsEnums.PANEL_INTERNET_CONNECTIVITY;
|
||||
|
@@ -452,13 +452,13 @@ public class PanelFragment extends Fragment {
|
||||
View.OnClickListener getSeeMoreListener() {
|
||||
return (v) -> {
|
||||
mPanelClosedKey = PanelClosedKeys.KEY_SEE_MORE;
|
||||
final FragmentActivity activity = getActivity();
|
||||
if (mPanel.isCustomizedButtonUsed()) {
|
||||
mPanel.onClickCustomizedButton();
|
||||
} else {
|
||||
final FragmentActivity activity = getActivity();
|
||||
activity.startActivityForResult(mPanel.getSeeMoreIntent(), 0);
|
||||
activity.finish();
|
||||
}
|
||||
activity.finish();
|
||||
};
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user