Merge "Go to the correct subscription in WifiCallingSettings" into qt-dev

This commit is contained in:
TreeHugger Robot
2019-04-10 20:01:32 +00:00
committed by Android (Google) Code Review
4 changed files with 163 additions and 6 deletions

View File

@@ -22,6 +22,7 @@ import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
import android.os.Looper;
import android.os.PersistableBundle;
import android.provider.Settings;
import android.telecom.PhoneAccountHandle;
import android.telecom.TelecomManager;
import android.telephony.CarrierConfigManager;
@@ -96,6 +97,10 @@ public class WifiCallingPreferenceController extends TelephonyBasePreferenceCont
public void displayPreference(PreferenceScreen screen) {
super.displayPreference(screen);
mPreference = screen.findPreference(getPreferenceKey());
Intent intent = mPreference.getIntent();
if (intent != null) {
intent.putExtra(Settings.EXTRA_SUB_ID, mSubId);
}
if (!isAvailable()) {
// Set category as invisible
final Preference preferenceCateogry = screen.findPreference(KEY_PREFERENCE_CATEGORY);