Loading src/com/android/settings/wifi/calling/WifiCallingSettingsForSub.java +7 −1 Original line number Diff line number Diff line Loading @@ -156,7 +156,7 @@ public class WifiCallingSettingsForSub extends SettingsPreferenceFragment final SettingsActivity activity = (SettingsActivity) getActivity(); mEmptyView = (TextView) getView().findViewById(android.R.id.empty); mEmptyView = getView().findViewById(android.R.id.empty); setEmptyView(mEmptyView); String emptyViewText = activity.getString(R.string.wifi_calling_off_explanation) + activity.getString(R.string.wifi_calling_off_explanation_2); Loading Loading @@ -216,6 +216,12 @@ public class WifiCallingSettingsForSub extends SettingsPreferenceFragment return MetricsEvent.WIFI_CALLING_FOR_SUB; } @Override public int getHelpResource() { // Return 0 to suppress help icon. The help will be populated by parent page. return 0; } @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); Loading tests/robotests/src/com/android/settings/wifi/calling/WifiCallingSettingsForSubTest.java 0 → 100644 +34 −0 Original line number Diff line number Diff line /* * Copyright (C) 2018 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.android.settings.wifi.calling; import static com.google.common.truth.Truth.assertThat; import com.android.settings.testutils.SettingsRobolectricTestRunner; import org.junit.Test; import org.junit.runner.RunWith; @RunWith(SettingsRobolectricTestRunner.class) public class WifiCallingSettingsForSubTest { @Test public void getHelpResource_shouldReturn0() { assertThat(new WifiCallingSettingsForSub().getHelpResource()) .isEqualTo(0); } } Loading
src/com/android/settings/wifi/calling/WifiCallingSettingsForSub.java +7 −1 Original line number Diff line number Diff line Loading @@ -156,7 +156,7 @@ public class WifiCallingSettingsForSub extends SettingsPreferenceFragment final SettingsActivity activity = (SettingsActivity) getActivity(); mEmptyView = (TextView) getView().findViewById(android.R.id.empty); mEmptyView = getView().findViewById(android.R.id.empty); setEmptyView(mEmptyView); String emptyViewText = activity.getString(R.string.wifi_calling_off_explanation) + activity.getString(R.string.wifi_calling_off_explanation_2); Loading Loading @@ -216,6 +216,12 @@ public class WifiCallingSettingsForSub extends SettingsPreferenceFragment return MetricsEvent.WIFI_CALLING_FOR_SUB; } @Override public int getHelpResource() { // Return 0 to suppress help icon. The help will be populated by parent page. return 0; } @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); Loading
tests/robotests/src/com/android/settings/wifi/calling/WifiCallingSettingsForSubTest.java 0 → 100644 +34 −0 Original line number Diff line number Diff line /* * Copyright (C) 2018 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.android.settings.wifi.calling; import static com.google.common.truth.Truth.assertThat; import com.android.settings.testutils.SettingsRobolectricTestRunner; import org.junit.Test; import org.junit.runner.RunWith; @RunWith(SettingsRobolectricTestRunner.class) public class WifiCallingSettingsForSubTest { @Test public void getHelpResource_shouldReturn0() { assertThat(new WifiCallingSettingsForSub().getHelpResource()) .isEqualTo(0); } }