Misc change about ResetNetworkConfirm
- Modify reset network layout - Merge changes from Qt-dev Fixes:131127455 Test: manual Change-Id: I6d63a821016588ea81a04ef792111c2b96dfe7fe
This commit is contained in:
@@ -19,7 +19,6 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical" >
|
||||
|
||||
<ScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dip"
|
||||
@@ -27,39 +26,33 @@
|
||||
android:layout_marginEnd="@dimen/reset_network_margin_end"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_weight="1">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="18sp"
|
||||
android:textDirection="locale"
|
||||
android:text="@string/reset_network_desc" />
|
||||
|
||||
<include layout="@layout/reset_esim_checkbox"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</ScrollView>
|
||||
|
||||
<Spinner android:id="@+id/reset_network_subscription"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="20dip"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/initiate_reset_network"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="20dip"
|
||||
android:layout_marginBottom="12dip"
|
||||
android:layout_gravity="end"
|
||||
android:layout_marginEnd="@dimen/suc_customization_button_margin_end"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_marginBottom="12dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/reset_network_button_text"
|
||||
android:gravity="center" />
|
||||
|
||||
android:gravity="center"
|
||||
style="@style/ActionPrimaryButton"/>
|
||||
</LinearLayout>
|
||||
|
@@ -17,23 +17,25 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/reset_network_confirm"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="12dp"
|
||||
android:layout_marginEnd="12dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginStart="@dimen/reset_network_margin_start"
|
||||
android:layout_marginEnd="@dimen/reset_network_margin_end"
|
||||
android:layout_marginTop="12dp"
|
||||
android:textSize="20sp"
|
||||
android:textSize="18sp"
|
||||
android:text="@string/reset_network_final_desc" />
|
||||
|
||||
<Button android:id="@+id/execute_reset_network"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="40dip"
|
||||
<Button
|
||||
android:id="@+id/execute_reset_network"
|
||||
android:layout_gravity="end"
|
||||
android:layout_marginEnd="@dimen/suc_customization_button_margin_end"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_marginBottom="12dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/reset_network_final_button_text"
|
||||
android:gravity="center" />
|
||||
|
||||
android:gravity="center"
|
||||
style="@style/ActionPrimaryButton"/>
|
||||
</LinearLayout>
|
||||
|
@@ -72,6 +72,7 @@ public class ResetNetworkConfirm extends InstrumentedFragment {
|
||||
@VisibleForTesting Activity mActivity;
|
||||
private int mSubId = SubscriptionManager.INVALID_SUBSCRIPTION_ID;
|
||||
private ProgressDialog mProgressDialog;
|
||||
private AlertDialog mAlertDialog;
|
||||
|
||||
/**
|
||||
* Async task used to do all reset task. If error happens during
|
||||
@@ -141,7 +142,7 @@ public class ResetNetworkConfirm extends InstrumentedFragment {
|
||||
Toast.makeText(mContext, R.string.reset_network_complete_toast, Toast.LENGTH_SHORT)
|
||||
.show();
|
||||
} else {
|
||||
new AlertDialog.Builder(mContext)
|
||||
mAlertDialog = new AlertDialog.Builder(mContext)
|
||||
.setTitle(R.string.reset_esim_error_title)
|
||||
.setMessage(R.string.reset_esim_error_msg)
|
||||
.setPositiveButton(android.R.string.ok, null /* listener */)
|
||||
@@ -265,6 +266,12 @@ public class ResetNetworkConfirm extends InstrumentedFragment {
|
||||
mResetNetworkTask.cancel(true /* mayInterruptIfRunning */);
|
||||
mResetNetworkTask = null;
|
||||
}
|
||||
if (mProgressDialog != null) {
|
||||
mProgressDialog.dismiss();
|
||||
}
|
||||
if (mAlertDialog != null) {
|
||||
mAlertDialog.dismiss();
|
||||
}
|
||||
super.onDestroy();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user