Merge "[Settings] Hide some Preference entries when no mobile data support" into tm-dev

This commit is contained in:
Bonian Chen
2022-05-10 12:35:30 +00:00
committed by Android (Google) Code Review
4 changed files with 16 additions and 4 deletions

View File

@@ -14,7 +14,7 @@
* limitations under the License
*/
package com.android.settings.network;
package com.android.settings.network.telephony;
import static android.telephony.SubscriptionManager.INVALID_SUBSCRIPTION_ID;
@@ -74,7 +74,10 @@ public class DataDuringCallsPreferenceControllerTest {
when(mTelephonyManager.createForSubscriptionId(anyInt())).thenReturn(mTelephonyManager);
mSwitchPreference = new SwitchPreference(mContext);
when(mPreferenceScreen.findPreference(PREF_KEY)).thenReturn(mSwitchPreference);
mController = new DataDuringCallsPreferenceController(mContext, PREF_KEY);
mController = new DataDuringCallsPreferenceController(mContext, PREF_KEY) {
@Override
protected boolean hasMobileData() { return true; }
};
mController.init(mLifecycle, SUB_ID_1);
}