summaryrefslogtreecommitdiff
path: root/SetupWizard/res/xml
diff options
context:
space:
mode:
Diffstat (limited to 'SetupWizard/res/xml')
-rw-r--r--SetupWizard/res/xml/items_bluetooth.xml44
-rw-r--r--SetupWizard/res/xml/wizard_script_setup_as_new_flow.xml191
-rw-r--r--SetupWizard/res/xml/wizard_script_user.xml163
3 files changed, 398 insertions, 0 deletions
diff --git a/SetupWizard/res/xml/items_bluetooth.xml b/SetupWizard/res/xml/items_bluetooth.xml
new file mode 100644
index 0000000..ed538c8
--- /dev/null
+++ b/SetupWizard/res/xml/items_bluetooth.xml
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (c) 2017 Google Inc.
+
+ 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.
+-->
+<ItemGroup xmlns:android="http://schemas.android.com/apk/res/android">
+
+ <Item
+ android:id="@+id/bluetooth_description"
+ android:enabled="false"
+ android:layout="@layout/suw_items_description" />
+
+ <Item
+ android:id="@+id/bluetooth_dont_connect"
+ android:icon="@drawable/ic_skip"
+ android:title="@string/bluetooth_dont_connect" />
+
+ <Item
+ android:id="@+id/bluetooth_scanning"
+ android:icon="@drawable/ic_bluetooth_scanning"
+ android:layout="@layout/items_greyed_out"
+ android:title="@string/bluetooth_scanning" />
+
+ <Item
+ android:id="@+id/bluetooth_rescan"
+ android:icon="@drawable/ic_refresh"
+ android:title="@string/bluetooth_rescan"
+ android:visible="false" />
+
+ <com.android.car.setupwizard.bluetooth.BluetoothDeviceHierarchy
+ android:id="@+id/bluetooth_device_list" />
+
+</ItemGroup>
diff --git a/SetupWizard/res/xml/wizard_script_setup_as_new_flow.xml b/SetupWizard/res/xml/wizard_script_setup_as_new_flow.xml
new file mode 100644
index 0000000..c55bebc
--- /dev/null
+++ b/SetupWizard/res/xml/wizard_script_setup_as_new_flow.xml
@@ -0,0 +1,191 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (C) 2017 Google Inc.
+
+ 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.
+-->
+
+<!--
+ The wizard:uris recorded here have the inconvenience of being generated by hand, but they allow
+ for the full spread of launch flags (we need FLAG_ACTIVITY_NEW_TASK [0x10000000]), where the
+ <intent> tag processed by Intent.parseIntent() does not.
+
+ adb shell am to-intent-uri -a com.android.setupwizard.WELCOME -f 0x10000000 \-\-ez firstRun true
+-->
+<WizardScript xmlns:wizard="http://schemas.android.com/apk/res/com.android.car.setupwizard"
+ wizard:firstAction="device_owner_warning">
+
+ <!-- Security warning [RECOMMENDED] -->
+ <WizardAction id="device_owner_warning"
+ wizard:uri="intent:#Intent;action=com.google.android.setupwizard.DEVICE_OWNER_WARNING;end">
+ <result wizard:name="skip"
+ wizard:resultCode="1"
+ wizard:action="check_frp" />
+ <result wizard:action="factory_reset" />
+ </WizardAction>
+
+ <WizardAction id="factory_reset"
+ wizard:uri="intent:#Intent;action=com.google.android.setupwizard.FACTORY_RESET;end">
+ <!-- Factory reset should cause a reboot, but if it returns unexpectedly,
+ continue on to check_frp -->
+ <result wizard:action="check_frp" />
+ </WizardAction>
+
+
+ <!-- Wait to check factory reset protection status [RECOMMENDED] -->
+ <WizardAction id="check_frp"
+ wizard:uri="intent:#Intent;action=com.google.android.setupwizard.CHECK_FRP;end">
+ <result wizard:action="bluetooth_settings" />
+ </WizardAction>
+
+ <!-- Bluetooth selection [REQUIRED, CUSTOMIZABLE] -->
+ <WizardAction id="bluetooth_settings"
+ wizard:uri="intent:#Intent;action=com.android.setupwizard.BLUETOOTH_SETTINGS;end">
+ <result wizard:action="network_settings" />
+ </WizardAction>
+
+
+ <!-- Users must be given the opportunity to set up an internet connection, using the given
+ screens or a custom flow. -->
+ <!-- Network selection [REQUIRED, CUSTOMIZABLE] -->
+ <WizardAction id="network_settings"
+ wizard:uri="intent:#Intent;action=com.android.setupwizard.NETWORK_SETTINGS;end">
+ <result wizard:name="see_all_wifi"
+ wizard:resultCode="101"
+ wizard:action="wifi_settings" />
+ <result wizard:name="use_cellular"
+ wizard:resultCode="102"
+ wizard:action="activate_mobile_data" />
+ <result wizard:name="skip"
+ wizard:resultCode="1"
+ wizard:action="no_network_flow" />
+ <result wizard:action="captive_portal" />
+ </WizardAction>
+
+ <!-- Mobile data activation -->
+ <WizardAction id="activate_mobile_data"
+ wizard:uri="intent:#Intent;action=com.android.setupwizard.ACTIVATE_MOBILE_DATA;end">
+ <result wizard:action="captive_portal" />
+ </WizardAction>
+
+ <!-- Wi-Fi setup -->
+ <WizardAction id="wifi_settings"
+ wizard:uri="intent:#Intent;action=com.android.setupwizard.WIFI_SETTINGS;end">
+ <result wizard:action="captive_portal" />
+ </WizardAction>
+
+
+ <!-- Resolve captive portal access, and wait for check-in [REQUIRED] -->
+ <WizardAction id="captive_portal"
+ wizard:uri="intent:#Intent;action=com.android.setupwizard.CAPTIVE_PORTAL;end">
+ <result wizard:action="gms_checkin" />
+ </WizardAction>
+ <WizardAction id="gms_checkin"
+ wizard:uri="intent:#Intent;action=com.google.android.setupwizard.GMS_CHECKIN;end">
+ <result wizard:action="ota_update" />
+ </WizardAction>
+
+
+ <!-- Update system packages [REQUIRED] -->
+ <WizardAction id="ota_update"
+ wizard:uri="intent:#Intent;action=com.google.android.setupwizard.OTA_UPDATE;end">
+ <result wizard:name="skip"
+ wizard:resultCode="1"
+ wizard:action="early_update" />
+ <result wizard:action="system_update" />
+ </WizardAction>
+
+ <WizardAction id="system_update"
+ wizard:uri="intent:#Intent;action=android.settings.SYSTEM_UPDATE_SETTINGS;end">
+ <!-- System update should cause a reboot, but if it returns unexpectedly, continue on to
+ early update -->
+ <result wizard:action="early_update" />
+ </WizardAction>
+
+
+ <!-- Update other important packages [REQUIRED] -->
+ <WizardAction id="early_update"
+ wizard:uri="intent:#Intent;action=com.google.android.setupwizard.EARLY_UPDATE;end">
+ <result wizard:action="zero_touch" />
+ </WizardAction>
+
+
+ <!-- Zero touch provisioning (for enterprise) [RECOMMENDED] -->
+ <WizardAction id="zero_touch"
+ wizard:script="android.resource://com.google.android.setupwizard/xml/wizard_script_zero_touch_flow" >
+ <result wizard:name="dpm_user_complete"
+ wizard:resultCode="111" />
+ <result wizard:action="load_account_intent" />
+ </WizardAction>
+
+
+ <!-- Add an account [REQUIRED] -->
+ <WizardAction id="load_account_intent"
+ wizard:uri="intent:#Intent;action=com.google.android.setupwizard.LOAD_ADD_ACCOUNT_INTENT;B.showTapAndGo=false;end">
+ <result wizard:action="account_setup" />
+ </WizardAction>
+
+ <WizardAction id="account_setup"
+ wizard:uri="intent:#Intent;action=com.google.android.setupwizard.ACCOUNT_SETUP;end">
+ <result wizard:name="skip"
+ wizard:resultCode="1"
+ wizard:action="no_account_flow" />
+ <!-- Alternate flow if managed provisioning already set the user up (for enterprise) [RECOMMENDED] -->
+ <result wizard:name="dpm_user_complete"
+ wizard:resultCode="111" />
+ <result wizard:action="gms_account_checkin" />
+ </WizardAction>
+
+
+ <!-- Checkin with Gservices using account. If it fails, VPA will not be available. [REQUIRED] -->
+ <WizardAction id="gms_account_checkin"
+ wizard:uri="intent:#Intent;action=com.google.android.setupwizard.GMS_ACCOUNT_CHECKIN;end">
+ <result wizard:name="skip"
+ wizard:resultCode="1"
+ wizard:action="mfm_check" />
+ <result wizard:action="start_vpa" />
+ </WizardAction>
+
+
+ <!-- Initiate VPA (required for Play Auto-Installs) [RECOMMENDED] -->
+ <WizardAction id="start_vpa"
+ wizard:uri="intent:#Intent;action=com.google.android.setupwizard.START_VPA;end">
+ <result wizard:action="mfm_check" />
+ </WizardAction>
+
+
+ <!-- Branch to script for setting up with or without an account [REQUIRED] -->
+ <WizardAction id="mfm_check"
+ wizard:uri="intent:#Intent;action=com.google.android.setupwizard.ACCOUNT_CHECK;end">
+ <result wizard:name="skip"
+ wizard:resultCode="1"
+ wizard:action="no_account_flow" />
+ <result wizard:action="account_flow" />
+ </WizardAction>
+
+
+ <!-- Set up with an account [REQUIRED] -->
+ <WizardAction id="account_flow"
+ wizard:script="android.resource://com.google.android.setupwizard/xml/wizard_script_new_device_account_flow" />
+
+
+ <!-- Set up without an account [REQUIRED] -->
+ <WizardAction id="no_account_flow"
+ wizard:script="android.resource://com.google.android.setupwizard/xml/wizard_script_no_account_flow" />
+
+
+ <!-- Set up without a network connection [RECOMMENDED] -->
+ <WizardAction id="no_network_flow"
+ wizard:script="android.resource://com.google.android.setupwizard/xml/wizard_script_no_network_flow" />
+
+</WizardScript>
diff --git a/SetupWizard/res/xml/wizard_script_user.xml b/SetupWizard/res/xml/wizard_script_user.xml
new file mode 100644
index 0000000..10c91a7
--- /dev/null
+++ b/SetupWizard/res/xml/wizard_script_user.xml
@@ -0,0 +1,163 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (c) 2014 Google Inc.
+
+ 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.
+-->
+
+<!--
+ The wizard:uris recorded here have the inconvenience of being generated by hand, but they allow
+ for the full spread of launch flags (we need FLAG_ACTIVITY_NEW_TASK [0x10000000]), where the
+ <intent> tag processed by Intent.parseIntent() does not.
+
+ adb shell am to-intent-uri -a com.android.setupwizard.WELCOME -f 0x10000000 \-\-ez firstRun true
+-->
+<WizardScript xmlns:wizard="http://schemas.android.com/apk/res/com.android.car.setupwizard"
+ wizard:firstAction="oem_pre_setup">
+
+ <!-- Preliminary setup for OEMs [CUSTOMIZABLE] -->
+ <WizardAction id="oem_pre_setup"
+ wizard:uri="intent:#Intent;action=com.android.setupwizard.OEM_PRE_SETUP;end">
+ <result wizard:action="secondary_user_warning" />
+ </WizardAction>
+
+
+ <!-- Secondary user warning [RECOMMENDED, CUSTOMIZABLE] -->
+ <WizardAction id="secondary_user_warning"
+ wizard:uri="intent:#Intent;action=com.android.setupwizard.USER_WARNING;end">
+ <result wizard:name="dpm_user_complete"
+ wizard:resultCode="111"
+ wizard:action="check_user_unlock_dpm_user_complete" />
+ <result wizard:action="check_user_unlock" />
+ </WizardAction>
+
+ <WizardAction id="check_user_unlock_dpm_user_complete"
+ wizard:uri="intent:#Intent;action=com.android.setupwizard.CHECK_USER_UNLOCK;end">
+ <result wizard:action="oem_post_setup" />
+ </WizardAction>
+
+ <WizardAction id="check_user_unlock"
+ wizard:uri="intent:#Intent;action=com.android.setupwizard.CHECK_USER_UNLOCK;end">
+ <result wizard:action="bluetooth_settings" />
+ </WizardAction>
+
+ <!-- Bluetooth selection [REQUIRED, CUSTOMIZABLE] -->
+ <WizardAction id="bluetooth_settings"
+ wizard:uri="intent:#Intent;action=com.android.setupwizard.BLUETOOTH_SETTINGS;end">
+ <result wizard:action="network_settings" />
+ </WizardAction>
+
+ <!-- Network selection [REQUIRED, CUSTOMIZABLE] -->
+ <WizardAction id="network_settings"
+ wizard:uri="intent:#Intent;action=com.android.setupwizard.NETWORK_SETTINGS;end">
+ <result wizard:name="see_all_wifi"
+ wizard:resultCode="101"
+ wizard:action="wifi_settings" />
+ <result wizard:name="skip"
+ wizard:resultCode="1"
+ wizard:action="no_account_flow" />
+ <result wizard:action="captive_portal" />
+ </WizardAction>
+
+
+ <!-- Wi-Fi setup [REQUIRED, CUSTOMIZABLE] -->
+ <WizardAction id="wifi_settings"
+ wizard:uri="intent:#Intent;action=com.android.setupwizard.WIFI_SETTINGS;end">
+ <result wizard:action="captive_portal" />
+ </WizardAction>
+
+
+ <!-- Resolve captive portal access, and wait for check-in [REQUIRED] -->
+ <WizardAction id="captive_portal"
+ wizard:uri="intent:#Intent;action=com.android.setupwizard.CAPTIVE_PORTAL;end">
+ <result wizard:action="gms_checkin" />
+ </WizardAction>
+
+ <WizardAction id="gms_checkin"
+ wizard:uri="intent:#Intent;action=com.google.android.setupwizard.GMS_CHECKIN;end">
+ <result wizard:action="load_account_intent" />
+ </WizardAction>
+
+
+ <!-- Add an account [REQUIRED] -->
+ <WizardAction id="load_account_intent"
+ wizard:uri="intent:#Intent;action=com.google.android.setupwizard.LOAD_ADD_ACCOUNT_INTENT;end">
+ <result wizard:action="account_setup" />
+ </WizardAction>
+
+ <WizardAction id="account_setup"
+ wizard:uri="intent:#Intent;action=com.google.android.setupwizard.ACCOUNT_SETUP;end">
+ <result wizard:name="skip"
+ wizard:resultCode="1"
+ wizard:action="no_account_flow" />
+ <!-- Alternate flow if managed provisioning already set the user up (for enterprise) [RECOMMENDED] -->
+ <result wizard:name="dpm_user_complete"
+ wizard:resultCode="111"
+ wizard:action="oem_post_setup" />
+ <result wizard:action="gms_account_checkin" />
+ </WizardAction>
+
+
+ <!-- Checkin with Gservices using account. If it fails, VPA will not be available. [REQUIRED] -->
+ <WizardAction id="gms_account_checkin"
+ wizard:uri="intent:#Intent;action=com.google.android.setupwizard.GMS_ACCOUNT_CHECKIN;end">
+ <result wizard:name="skip"
+ wizard:resultCode="1"
+ wizard:action="mfm_check" />
+ <result wizard:action="start_vpa" />
+ </WizardAction>
+
+
+ <!-- Initiate VPA (required for Play Auto-Installs) [RECOMMENDED] -->
+ <WizardAction id="start_vpa"
+ wizard:uri="intent:#Intent;action=com.google.android.setupwizard.START_VPA;end">
+ <result wizard:action="mfm_check" />
+ </WizardAction>
+
+
+ <!-- Branch to script for setting up with or without an account [REQUIRED] -->
+ <WizardAction id="mfm_check"
+ wizard:uri="intent:#Intent;action=com.google.android.setupwizard.ACCOUNT_CHECK;end">
+ <result wizard:name="skip"
+ wizard:resultCode="1"
+ wizard:action="no_account_flow" />
+ <result wizard:action="account_flow" />
+ </WizardAction>
+
+
+ <!-- Set up with an account [REQUIRED] -->
+ <WizardAction id="account_flow"
+ wizard:script="android.resource://com.google.android.setupwizard/xml/wizard_script_user_account_flow">
+ <result wizard:action="oem_post_setup" />
+ </WizardAction>
+
+
+ <!-- Set up without an account [REQUIRED] -->
+ <WizardAction id="no_account_flow"
+ wizard:script="android.resource://com.google.android.setupwizard/xml/wizard_script_user_no_account_flow">
+ <result wizard:action="oem_post_setup" />
+ </WizardAction>
+
+
+ <!-- OEM completion [CUSTOMIZABLE] -->
+ <WizardAction id="oem_post_setup"
+ wizard:uri="intent:#Intent;action=com.android.setupwizard.OEM_POST_SETUP;end">
+ <result wizard:action="exit" />
+ </WizardAction>
+
+
+ <!-- Leave Setup Wizard [REQUIRED] -->
+ <WizardAction id="exit"
+ wizard:uri="intent:#Intent;action=com.android.setupwizard.EXIT;end" />
+
+</WizardScript>