This will be shown when a system priv-app tries to add a profile owner to a device that's already been through setupwizard. Refactored the Add Device Admin dialog to also be used for this purpose with additional warning text. Also, make sure that profile owners cannot be deactivated. Bug: 16207721 Change-Id: I25499a22718b2219a5a56b158ca2681243751549
160 lines
6.7 KiB
XML
160 lines
6.7 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- Copyright (C) 2010 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.
|
|
-->
|
|
|
|
<LinearLayout
|
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
android:id="@+id/active_layout"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:orientation="vertical">
|
|
|
|
<ScrollView
|
|
android:layout_width="match_parent"
|
|
android:layout_height="0dip"
|
|
android:layout_weight="1.0"
|
|
android:paddingStart="16dip"
|
|
android:paddingEnd="16dip"
|
|
android:scrollbarStyle="outsideOverlay"
|
|
android:gravity="top">
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="vertical">
|
|
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="horizontal"
|
|
android:layout_marginTop="16dip">
|
|
|
|
<ImageView android:id="@+id/admin_icon"
|
|
android:layout_width="@android:dimen/app_icon_size"
|
|
android:layout_height="@android:dimen/app_icon_size"
|
|
android:layout_marginEnd="16dip"
|
|
android:layout_gravity="center_vertical"
|
|
android:scaleType="fitCenter"
|
|
android:contentDescription="@null" />
|
|
|
|
<TextView android:id="@+id/admin_name"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="1"
|
|
android:layout_marginBottom="2dip"
|
|
android:layout_gravity="center_vertical"
|
|
android:textAppearance="?android:attr/textAppearanceMedium"
|
|
android:textStyle="bold"
|
|
android:singleLine="true"
|
|
android:ellipsize="marquee" />
|
|
</LinearLayout>
|
|
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="vertical">
|
|
|
|
<TextView android:id="@+id/profile_owner_warning"
|
|
android:layout_width="fill_parent"
|
|
android:layout_height="wrap_content"
|
|
android:padding="0dp"
|
|
android:visibility="gone"
|
|
android:text="@string/adding_profile_owner_warning" />
|
|
|
|
<TextView android:id="@+id/admin_description"
|
|
android:layout_width="fill_parent"
|
|
android:layout_height="0dip"
|
|
android:layout_weight="0"
|
|
android:padding="0dip" />
|
|
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="horizontal"
|
|
android:gravity="center_vertical">
|
|
|
|
<ImageView android:id="@+id/add_msg_expander"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:gravity="center_vertical"
|
|
android:contentDescription="@null" />
|
|
|
|
<TextView android:id="@+id/add_msg"
|
|
android:layout_width="fill_parent"
|
|
android:layout_height="wrap_content"
|
|
android:gravity="center_vertical"
|
|
android:padding="10dip" />
|
|
</LinearLayout>
|
|
|
|
<TextView android:id="@+id/admin_warning"
|
|
android:layout_width="fill_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="1"
|
|
android:padding="10dip" />
|
|
<LinearLayout android:id="@+id/admin_policies"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="1"
|
|
android:orientation="vertical"
|
|
android:paddingStart="16dip"
|
|
android:paddingEnd="12dip" />
|
|
</LinearLayout>
|
|
|
|
</LinearLayout>
|
|
</ScrollView>
|
|
|
|
<LinearLayout android:id="@+id/buttonPanel"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="vertical"
|
|
android:divider="?android:attr/dividerHorizontal"
|
|
android:showDividers="beginning">
|
|
<LinearLayout
|
|
style="?android:attr/buttonBarStyle"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="horizontal"
|
|
android:measureWithLargestChild="true">
|
|
<LinearLayout android:id="@+id/leftSpacer"
|
|
android:layout_weight="0.25"
|
|
android:layout_width="0dip"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="horizontal"
|
|
android:visibility="gone" />
|
|
<Button android:id="@+id/cancel_button"
|
|
android:layout_width="0dip"
|
|
android:layout_gravity="end"
|
|
android:layout_weight="1"
|
|
android:maxLines="2"
|
|
android:text="@string/cancel"
|
|
style="?android:attr/buttonBarButtonStyle"
|
|
android:layout_height="wrap_content" />
|
|
<Button android:id="@+id/action_button"
|
|
android:layout_width="0dip"
|
|
android:layout_gravity="start"
|
|
android:layout_weight="1"
|
|
android:maxLines="2"
|
|
style="?android:attr/buttonBarButtonStyle"
|
|
android:layout_height="wrap_content" />
|
|
<LinearLayout android:id="@+id/rightSpacer"
|
|
android:layout_width="0dip"
|
|
android:layout_weight="0.25"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="horizontal"
|
|
android:visibility="gone" />
|
|
</LinearLayout>
|
|
</LinearLayout>
|
|
|
|
</LinearLayout>
|