Fix issue that the wifi calling text cannot be customized based on sim
Some carriers have requirements that the wifi calling text should be customizable. However, the resources for the wifi calling text are not obtained based on sim. So it cannot be customized per sim for multi sim device. To solve this issue, obtain the resources with specified sim. Test: manual - Checked that the wifi calling text could be customized based on sim. Bug: 117257109 Change-Id: I6b3f6b06c9cc984ee6a68a19ae317b5d1d4e48e2
This commit is contained in:
committed by
Youming Ye
parent
12cec79889
commit
af5c05392b
@@ -23,6 +23,7 @@ import android.content.ComponentName;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.IntentFilter;
|
||||
import android.content.res.Resources;
|
||||
import android.os.Bundle;
|
||||
import android.os.PersistableBundle;
|
||||
import android.telephony.CarrierConfigManager;
|
||||
@@ -160,8 +161,9 @@ public class WifiCallingSettingsForSub extends SettingsPreferenceFragment
|
||||
|
||||
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);
|
||||
final Resources res = SubscriptionManager.getResourcesForSubId(getActivity(), mSubId);
|
||||
String emptyViewText = res.getString(R.string.wifi_calling_off_explanation,
|
||||
res.getString(R.string.wifi_calling_off_explanation_2));
|
||||
mEmptyView.setText(emptyViewText);
|
||||
|
||||
mSwitchBar = getView().findViewById(R.id.switch_bar);
|
||||
|
Reference in New Issue
Block a user