Merge "[MEP] The progress dialog use the same string for psim and esim cases" into tm-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
64a9a9f069
27
res/drawable/sim_progress_dialog_rounded_bg.xml
Normal file
27
res/drawable/sim_progress_dialog_rounded_bg.xml
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!--
|
||||||
|
Copyright (C) 2022 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.
|
||||||
|
-->
|
||||||
|
<inset xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:insetLeft="24dp"
|
||||||
|
android:insetRight="24dp">
|
||||||
|
<shape
|
||||||
|
android:shape="rectangle">
|
||||||
|
<solid android:color="?android:attr/colorBackground"/>
|
||||||
|
<corners
|
||||||
|
android:radius="@*android:dimen/config_dialogCornerRadius"
|
||||||
|
/>
|
||||||
|
</shape>
|
||||||
|
</inset>
|
@@ -26,6 +26,8 @@ import android.os.Bundle;
|
|||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
import android.view.KeyEvent;
|
import android.view.KeyEvent;
|
||||||
|
|
||||||
|
import com.android.settings.R;
|
||||||
|
|
||||||
/** Fragment to show a progress dialog. */
|
/** Fragment to show a progress dialog. */
|
||||||
public class ProgressDialogFragment extends DialogFragment {
|
public class ProgressDialogFragment extends DialogFragment {
|
||||||
private static final String ARG_TITLE = "title";
|
private static final String ARG_TITLE = "title";
|
||||||
@@ -83,6 +85,7 @@ public class ProgressDialogFragment extends DialogFragment {
|
|||||||
@SuppressWarnings("deprecation") // ProgressDialog is deprecated but is intended UX for now
|
@SuppressWarnings("deprecation") // ProgressDialog is deprecated but is intended UX for now
|
||||||
public Dialog onCreateDialog(Bundle savedInstanceState) {
|
public Dialog onCreateDialog(Bundle savedInstanceState) {
|
||||||
ProgressDialog dialog = new ProgressDialog(getActivity());
|
ProgressDialog dialog = new ProgressDialog(getActivity());
|
||||||
|
dialog.getWindow().setBackgroundDrawableResource(R.drawable.sim_progress_dialog_rounded_bg);
|
||||||
dialog.setCancelable(false);
|
dialog.setCancelable(false);
|
||||||
dialog.setCanceledOnTouchOutside(false);
|
dialog.setCanceledOnTouchOutside(false);
|
||||||
dialog.setMessage(getArguments().getString(ARG_TITLE));
|
dialog.setMessage(getArguments().getString(ARG_TITLE));
|
||||||
|
@@ -217,19 +217,17 @@ public class ToggleSubscriptionDialogActivity extends SubscriptionActionDialogAc
|
|||||||
}
|
}
|
||||||
case DIALOG_TAG_ENABLE_SIM_CONFIRMATION:
|
case DIALOG_TAG_ENABLE_SIM_CONFIRMATION:
|
||||||
Log.i(TAG, "User confirmed to enable the subscription.");
|
Log.i(TAG, "User confirmed to enable the subscription.");
|
||||||
|
showProgressDialog(
|
||||||
|
getString(
|
||||||
|
R.string.sim_action_switch_sub_dialog_progress,
|
||||||
|
SubscriptionUtil.getUniqueSubscriptionDisplayName(
|
||||||
|
mSubInfo, this)));
|
||||||
if (mIsEsimOperation) {
|
if (mIsEsimOperation) {
|
||||||
showProgressDialog(
|
|
||||||
getString(
|
|
||||||
R.string.sim_action_switch_sub_dialog_progress,
|
|
||||||
SubscriptionUtil.getUniqueSubscriptionDisplayName(
|
|
||||||
mSubInfo, this)));
|
|
||||||
mSwitchToEuiccSubscriptionSidecar.run(mSubInfo.getSubscriptionId(),
|
mSwitchToEuiccSubscriptionSidecar.run(mSubInfo.getSubscriptionId(),
|
||||||
UiccSlotUtil.INVALID_PORT_ID,
|
UiccSlotUtil.INVALID_PORT_ID,
|
||||||
removedSubInfo);
|
removedSubInfo);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
showProgressDialog(
|
|
||||||
getString(R.string.sim_action_enabling_sim_without_carrier_name));
|
|
||||||
mSwitchToRemovableSlotSidecar.run(UiccSlotUtil.INVALID_PHYSICAL_SLOT_ID,
|
mSwitchToRemovableSlotSidecar.run(UiccSlotUtil.INVALID_PHYSICAL_SLOT_ID,
|
||||||
removedSubInfo);
|
removedSubInfo);
|
||||||
break;
|
break;
|
||||||
|
Reference in New Issue
Block a user