Loading packages/Keyguard/test/SampleTrustAgent/Android.mk 0 → 100644 +33 −0 Original line number Diff line number Diff line # Copyright (C) 2014 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. # LOCAL_PATH:= $(call my-dir) include $(CLEAR_VARS) LOCAL_SRC_FILES := $(call all-java-files-under, src) LOCAL_PACKAGE_NAME := SampleTrustAgent # Remove these to verify permission checks are working correctly #LOCAL_CERTIFICATE := platform #LOCAL_PRIVILEGED_MODULE := true LOCAL_MODULE_TAGS := tests # LOCAL_PROGUARD_FLAG_FILES := proguard.flags LOCAL_STATIC_JAVA_LIBRARIES := android-support-v4 include $(BUILD_PACKAGE) packages/Keyguard/test/SampleTrustAgent/AndroidManifest.xml 0 → 100644 +41 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- ~ Copyright (C) 2014 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 --> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.android.trustagent.test"> <uses-sdk android:minSdkVersion="10" android:targetSdkVersion="17"/> <uses-permission android:name="android.permission.CONTROL_KEYGUARD" /> <application android:label="@string/app_name"> <service android:name=".SampleTrustAgent" android:label="@string/app_name" android:exported="true"> <intent-filter> <action android:name="android.service.trust.TrustAgentService" /> <category android:name="android.intent.category.DEFAULT" /> </intent-filter> <meta-data android:name="android.service.trust.trustagent" android:resource="@xml/sample_trust_agent"/> </service> <activity android:name=".SampleTrustAgentSettings" android:label="@string/app_name" android:exported="true" android:launchMode="singleInstance" > </activity> </application> </manifest> packages/Keyguard/test/SampleTrustAgent/res/layout/sample_trust_agent_settings.xml 0 → 100644 +35 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- ~ Copyright (C) 2014 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"> <Button android:id="@+id/enable_trust" android:layout_width="match_parent" android:layout_height="wrap_content" android:text="Grant trust for 30 seconds" /> <Button android:id="@+id/revoke_trust" android:layout_width="match_parent" android:layout_height="wrap_content" android:text="Revoke trust" /> <CheckBox android:id="@+id/report_unlock_attempts" android:layout_width="match_parent" android:layout_height="wrap_content" android:text="Report unlock attempts" /> </LinearLayout> No newline at end of file packages/Keyguard/test/SampleTrustAgent/res/values/strings.xml 0 → 100644 +20 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- ~ Copyright (C) 2014 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">Sample Trust Agent</string> </resources> No newline at end of file packages/Keyguard/test/SampleTrustAgent/res/xml/sample_trust_agent.xml 0 → 100644 +18 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- ~ Copyright (C) 2014 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 --> <trust_agent xmlns:android="http://schemas.android.com/apk/res/android" android:settingsActivity=".SampleTrustAgentSettings" /> Loading
packages/Keyguard/test/SampleTrustAgent/Android.mk 0 → 100644 +33 −0 Original line number Diff line number Diff line # Copyright (C) 2014 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. # LOCAL_PATH:= $(call my-dir) include $(CLEAR_VARS) LOCAL_SRC_FILES := $(call all-java-files-under, src) LOCAL_PACKAGE_NAME := SampleTrustAgent # Remove these to verify permission checks are working correctly #LOCAL_CERTIFICATE := platform #LOCAL_PRIVILEGED_MODULE := true LOCAL_MODULE_TAGS := tests # LOCAL_PROGUARD_FLAG_FILES := proguard.flags LOCAL_STATIC_JAVA_LIBRARIES := android-support-v4 include $(BUILD_PACKAGE)
packages/Keyguard/test/SampleTrustAgent/AndroidManifest.xml 0 → 100644 +41 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- ~ Copyright (C) 2014 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 --> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.android.trustagent.test"> <uses-sdk android:minSdkVersion="10" android:targetSdkVersion="17"/> <uses-permission android:name="android.permission.CONTROL_KEYGUARD" /> <application android:label="@string/app_name"> <service android:name=".SampleTrustAgent" android:label="@string/app_name" android:exported="true"> <intent-filter> <action android:name="android.service.trust.TrustAgentService" /> <category android:name="android.intent.category.DEFAULT" /> </intent-filter> <meta-data android:name="android.service.trust.trustagent" android:resource="@xml/sample_trust_agent"/> </service> <activity android:name=".SampleTrustAgentSettings" android:label="@string/app_name" android:exported="true" android:launchMode="singleInstance" > </activity> </application> </manifest>
packages/Keyguard/test/SampleTrustAgent/res/layout/sample_trust_agent_settings.xml 0 → 100644 +35 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- ~ Copyright (C) 2014 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"> <Button android:id="@+id/enable_trust" android:layout_width="match_parent" android:layout_height="wrap_content" android:text="Grant trust for 30 seconds" /> <Button android:id="@+id/revoke_trust" android:layout_width="match_parent" android:layout_height="wrap_content" android:text="Revoke trust" /> <CheckBox android:id="@+id/report_unlock_attempts" android:layout_width="match_parent" android:layout_height="wrap_content" android:text="Report unlock attempts" /> </LinearLayout> No newline at end of file
packages/Keyguard/test/SampleTrustAgent/res/values/strings.xml 0 → 100644 +20 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- ~ Copyright (C) 2014 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">Sample Trust Agent</string> </resources> No newline at end of file
packages/Keyguard/test/SampleTrustAgent/res/xml/sample_trust_agent.xml 0 → 100644 +18 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- ~ Copyright (C) 2014 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 --> <trust_agent xmlns:android="http://schemas.android.com/apk/res/android" android:settingsActivity=".SampleTrustAgentSettings" />