aboutsummaryrefslogtreecommitdiff
path: root/TrustAgent/res
diff options
context:
space:
mode:
authorRakesh Iyer <rni@google.com>2017-03-03 11:45:31 -0800
committerRakesh Iyer <rni@google.com>2017-03-07 10:12:59 -0800
commit452ad74f4c25e153c00d94c3db674deab8efb1ac (patch)
tree426d6b8c99fab1c3c5c4b1585407fbe1b64da873 /TrustAgent/res
parent8b1d4ed9d5c8b835ca46622fcd9be17549abfd14 (diff)
downloadCar-452ad74f4c25e153c00d94c3db674deab8efb1ac.tar.gz
Partial cleanup of Ble trust agent.
First pass, added licenses and log guards, will make another pass soon. Test: Manually verified. Change-Id: I31fcf1783fb4cb9c3d5617d9f31f840196ca49ac
Diffstat (limited to 'TrustAgent/res')
-rw-r--r--TrustAgent/res/layout/car_client.xml62
-rw-r--r--TrustAgent/res/layout/main_app.xml47
-rw-r--r--TrustAgent/res/layout/phone_client.xml60
-rw-r--r--TrustAgent/res/values/strings.xml47
4 files changed, 135 insertions, 81 deletions
diff --git a/TrustAgent/res/layout/car_client.xml b/TrustAgent/res/layout/car_client.xml
index 45567b74c9..c5a27f0bd6 100644
--- a/TrustAgent/res/layout/car_client.xml
+++ b/TrustAgent/res/layout/car_client.xml
@@ -1,31 +1,47 @@
<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2017 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:orientation="vertical"
- android:layout_width="match_parent"
- android:layout_height="match_parent" android:weightSum="1">
+ android:orientation="vertical"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:weightSum="1">
<ScrollView
- android:id="@+id/scroll"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:scrollbars="vertical"
- android:layout_weight="0.70"
- android:fillViewport="true">
+ android:id="@+id/scroll"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:scrollbars="vertical"
+ android:layout_weight="0.70"
+ android:fillViewport="true">
+
<TextView
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:id="@+id/textfield"/>
- </ScrollView>
- <Button
- android:id="@+id/start_button"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:text="Start Advertising"
- android:layout_weight="0.15"/>
+ android:id="@+id/textfield"/>
+ </ScrollView>
<Button
- android:id="@+id/revoke_trust_button"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:text="Revoke Trust"
- android:layout_weight="0.15"/>
-</LinearLayout> \ No newline at end of file
+ android:id="@+id/start_button"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:text="@string/start_advertising"
+ android:layout_weight="0.15"/>
+ <Button
+ android:id="@+id/revoke_trust_button"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:text="@string/revoke_trust"
+ android:layout_weight="0.15"/>
+</LinearLayout>
diff --git a/TrustAgent/res/layout/main_app.xml b/TrustAgent/res/layout/main_app.xml
index e2336807b6..5153ca89dd 100644
--- a/TrustAgent/res/layout/main_app.xml
+++ b/TrustAgent/res/layout/main_app.xml
@@ -1,22 +1,37 @@
<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2017 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:orientation="vertical"
- android:layout_width="match_parent"
- android:layout_height="match_parent" android:weightSum="1">
+ android:orientation="vertical"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:weightSum="1">
<Button android:id="@+id/car_button"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_weight="0.20"
- android:text="Car"/>
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_weight="0.20"
+ android:text="@string/car"/>
<Button android:id="@+id/phone_enrolment_button"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_weight="0.20"
- android:text="Phone Enrolment Client"/>
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_weight="0.20"
+ android:text="@string/enrollment_client"/>
<Button android:id="@+id/phone_unlock_button"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_weight="0.20"
- android:text="Phone Unlock Client"/>
-</LinearLayout> \ No newline at end of file
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_weight="0.20"
+ android:text="@string/unlock_client"/>
+</LinearLayout>
diff --git a/TrustAgent/res/layout/phone_client.xml b/TrustAgent/res/layout/phone_client.xml
index 60b4eb931f..41ead63ebf 100644
--- a/TrustAgent/res/layout/phone_client.xml
+++ b/TrustAgent/res/layout/phone_client.xml
@@ -1,29 +1,45 @@
<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2017 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:orientation="vertical"
- android:layout_width="match_parent"
- android:layout_height="match_parent" android:weightSum="1">
+ android:orientation="vertical"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:weightSum="1">
<ScrollView
- android:id="@+id/scroll"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:scrollbars="vertical"
- android:layout_weight="0.60"
- android:fillViewport="true">
+ android:id="@+id/scroll"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:scrollbars="vertical"
+ android:layout_weight="0.60"
+ android:fillViewport="true">
+
<TextView
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:id="@+id/output"/>
- </ScrollView>
- <Button
- android:id="@+id/ble_scan_btn"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:text="Start Scanning"
- android:layout_weight="0.20"/>
+ android:id="@+id/output"/>
+ </ScrollView>
<Button
- android:id="@+id/action_button"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_weight="0.20"/>
-</LinearLayout> \ No newline at end of file
+ android:id="@+id/ble_scan_btn"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:text="@string/start_scanning"
+ android:layout_weight="0.20"/>
+ <Button
+ android:id="@+id/action_button"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_weight="0.20"/>
+</LinearLayout>
diff --git a/TrustAgent/res/values/strings.xml b/TrustAgent/res/values/strings.xml
index bf37eb9e0b..d23a4b3bb9 100644
--- a/TrustAgent/res/values/strings.xml
+++ b/TrustAgent/res/values/strings.xml
@@ -1,19 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
-<!--
- ~ Copyright (C) 2016 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
- -->
+<!-- Copyright (C) 2017 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.
+-->
<resources>
<string name="app_name">CarBleTrustAgent</string>
<string name="trust_granted_explanation">Unlock via escrow token, now granting trust</string>
@@ -24,13 +23,21 @@
<string name="unlock_handle_uiid">5e2a68a3-27be-43f9-8d1e-4546976fabd7</string>
<!-- service/characteristics uuid for adding new escrow token -->
- <string name="enrolment_service_uuid">5e2a68a4-27be-43f9-8d1e-4546976fabd7</string>
- <string name="enrolment_handle_uuid">5e2a68a5-27be-43f9-8d1e-4546976fabd7</string>
- <string name="enrolment_token_uuid">5e2a68a6-27be-43f9-8d1e-4546976fabd7</string>
+ <string name="enrollment_service_uuid">5e2a68a4-27be-43f9-8d1e-4546976fabd7</string>
+ <string name="enrollment_handle_uuid">5e2a68a5-27be-43f9-8d1e-4546976fabd7</string>
+ <string name="enrollment_token_uuid">5e2a68a6-27be-43f9-8d1e-4546976fabd7</string>
<string name="pref_key_token_handle">token-handle-key</string>
<string name="pref_key_escrow_token">escrow-token-key</string>
<string name="unlock_button">Unlock Car</string>
- <string name="enrol_button">Enrol New Token</string>
-</resources> \ No newline at end of file
+ <string name="enroll_button">Enroll New Token</string>
+
+ <string name="start_advertising">Start Advertising</string>
+ <string name="revoke_trust">Revoke Trust</string>
+
+ <string name="car">Car</string>
+ <string name="enrollment_client">Phone Enrolment Client</string>
+ <string name="unlock_client">Phone Unlock Client</string>
+ <string name="start_scanning">Start Scanning</string>
+</resources>