Set default name when creating a supervised user in fallback activity.
Fallback activity for supervised user creation was creating a supervised user without a name (null), now creates it with a default name. Also put an explanation on the activity stating it's just a placeholder. Bug: 215232217 Bug: 207495450 Test: croot && make RunSettingsRoboTests -j40 ROBOTEST_FILTER="com.android.settings.users.UserSettingsTest" Change-Id: I8090fde38155817ac2b4f88271abe8a0ad1ce747
This commit is contained in:
@@ -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>
|
@@ -13846,4 +13846,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>
|
||||
|
@@ -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))
|
||||
|
Reference in New Issue
Block a user