Merge "Set default name when creating a supervised user in fallback activity."

This commit is contained in:
Yasin Kilicdere
2022-02-03 19:35:14 +00:00
committed by Android (Google) Code Review
3 changed files with 16 additions and 5 deletions

View File

@@ -15,12 +15,18 @@
~ limitations under the License.
-->
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="16dp"
android:orientation="vertical">
<Button
android:id="@+id/createSupervisedUser"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="@*android:string/supervised_user_creation_label" />
</FrameLayout>
<TextView
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="@string/placeholder_activity" />
</LinearLayout>

View File

@@ -13870,4 +13870,7 @@
<string name="reboot_dialog_reboot_now">Reboot now</string>
<!-- Text on the dialog button to reboot the device later [CHAR LIMIT=50] -->
<string name="reboot_dialog_reboot_later">Reboot later</string>
<!-- Text to explain an activity is a temporary placeholder [CHAR LIMIT=none] -->
<string name="placeholder_activity" translatable="false">*This is a temporary placeholder fallback activity.</string>
</resources>

View File

@@ -65,7 +65,9 @@ public class AddSupervisedUserActivity extends Activity {
}
private void createUser() {
final NewUserRequest request = new NewUserRequest.Builder().build();
final NewUserRequest request = new NewUserRequest.Builder()
.setName(getString(R.string.user_new_user_name))
.build();
final AlertDialog pleaseWaitDialog = new AlertDialog.Builder(this)
.setMessage(getString(R.string.creating_new_user_dialog_message))