Merge "Improve LogAccessDialogActivity's rotation handling" into tm-dev am: ea71e9e9c4 am: 70b9c5e24a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18164943 Change-Id: I5a2a3699587b26d726af49a4db9cdf98d7817f8f Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -16,77 +16,86 @@
|
||||
** limitations under the License.
|
||||
*/
|
||||
-->
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="380dp"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center"
|
||||
android:paddingLeft="24dp"
|
||||
android:paddingRight="24dp"
|
||||
android:paddingTop="24dp"
|
||||
android:paddingBottom="24dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/log_access_image_view"
|
||||
android:layout_width="32dp"
|
||||
android:layout_height="32dp"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:src="@drawable/ic_doc_document"
|
||||
tools:layout_editor_absoluteX="148dp"
|
||||
tools:layout_editor_absoluteY="35dp"
|
||||
android:gravity="center" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/log_access_dialog_title"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_marginBottom="32dp"
|
||||
android:text="@string/log_access_confirmation_title"
|
||||
android:textAppearance="@style/AllowLogAccess"
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
android:gravity="center" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/log_access_dialog_body"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_marginBottom="40dp"
|
||||
android:text="@string/log_access_confirmation_body"
|
||||
android:textAppearance="@style/PrimaryAllowLogAccess"
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
android:gravity="center" />
|
||||
|
||||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="380dp"
|
||||
android:layout_height="match_parent"
|
||||
android:clipToPadding="false">
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
<Button
|
||||
android:id="@+id/log_access_dialog_allow_button"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/log_access_confirmation_allow"
|
||||
style="@style/PermissionGrantButtonTop"
|
||||
android:textAppearance="@style/PermissionGrantButtonTextAppearance"
|
||||
android:layout_marginBottom="5dp"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:clipToOutline="true"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center"
|
||||
android:paddingLeft="24dp"
|
||||
android:paddingRight="24dp"
|
||||
android:paddingTop="24dp"
|
||||
android:paddingBottom="24dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/log_access_image_view"
|
||||
android:layout_width="32dp"
|
||||
android:layout_height="32dp"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:src="@drawable/ic_doc_document"
|
||||
tools:layout_editor_absoluteX="148dp"
|
||||
tools:layout_editor_absoluteY="35dp"
|
||||
android:gravity="center" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/log_access_dialog_deny_button"
|
||||
android:layout_width="match_parent"
|
||||
<TextView
|
||||
android:id="@+id/log_access_dialog_title"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/log_access_confirmation_deny"
|
||||
style="@style/PermissionGrantButtonBottom"
|
||||
android:textAppearance="@style/PermissionGrantButtonTextAppearance"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:clipToOutline="true"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_marginBottom="32dp"
|
||||
android:text="@string/log_access_confirmation_title"
|
||||
android:textAppearance="@style/AllowLogAccess"
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
android:gravity="center" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/log_access_dialog_body"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_marginBottom="40dp"
|
||||
android:text="@string/log_access_confirmation_body"
|
||||
android:textAppearance="@style/PrimaryAllowLogAccess"
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
android:gravity="center" />
|
||||
|
||||
<Space
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
<Button
|
||||
android:id="@+id/log_access_dialog_allow_button"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/log_access_confirmation_allow"
|
||||
style="@style/PermissionGrantButtonTop"
|
||||
android:textAppearance="@style/PermissionGrantButtonTextAppearance"
|
||||
android:layout_marginBottom="5dp"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:clipToOutline="true"
|
||||
android:gravity="center" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/log_access_dialog_deny_button"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/log_access_confirmation_deny"
|
||||
style="@style/PermissionGrantButtonBottom"
|
||||
android:textAppearance="@style/PermissionGrantButtonTextAppearance"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:clipToOutline="true"
|
||||
android:gravity="center" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
|
||||
@@ -105,7 +105,7 @@ public class LogAccessDialogActivity extends Activity implements
|
||||
@Override
|
||||
protected void onDestroy() {
|
||||
super.onDestroy();
|
||||
if (mAlert != null && mAlert.isShowing()) {
|
||||
if (!isChangingConfigurations() && mAlert != null && mAlert.isShowing()) {
|
||||
mAlert.dismiss();
|
||||
}
|
||||
mAlert = null;
|
||||
|
||||
Reference in New Issue
Block a user