Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a6db6c28 authored by Yasin Kilicdere's avatar Yasin Kilicdere
Browse files

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
parent 1900be43
Loading
Loading
Loading
Loading
+10 −4
Original line number Diff line number Diff line
@@ -15,12 +15,18 @@
  ~ limitations under the License.
  -->

<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
              android:layout_width="match_parent"
             android:layout_height="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>
 No newline at end of file
    <TextView
        android:layout_height="wrap_content"
        android:layout_width="wrap_content"
        android:text="@string/placeholder_activity" />
</LinearLayout>
 No newline at end of file
+3 −0
Original line number Diff line number Diff line
@@ -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>
+3 −1
Original line number Diff line number Diff line
@@ -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))