1<?xml version="1.0" encoding="utf-8"?> 2<!-- Copyright (C) 2016 The Android Open Source Project 3 4 Licensed under the Apache License, Version 2.0 (the "License"); 5 you may not use this file except in compliance with the License. 6 You may obtain a copy of the License at 7 8 http://www.apache.org/licenses/LICENSE-2.0 9 10 Unless required by applicable law or agreed to in writing, software 11 distributed under the License is distributed on an "AS IS" BASIS, 12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 See the License for the specific language governing permissions and 14 limitations under the License. 15--> 16<shortcuts xmlns:android="http://schemas.android.com/apk/res/android" > 17 <!-- Invalid: no ID --> 18 <shortcut 19 android:shortcutShortLabel="@string/label1" 20 > 21 <intent android:action="android.intent.action.VIEW" /> 22 </shortcut> 23 24 <!-- Invalid: no short label --> 25 <shortcut 26 android:shortcutId="x1" 27 > 28 <intent android:action="android.intent.action.VIEW" > 29 </intent> 30 </shortcut> 31 32 <!-- Invalid: no Intent --> 33 <shortcut 34 android:shortcutId="manifest-shortcut-3" 35 android:shortcutShortLabel="@string/label1" 36 /> 37 38 <!-- Invalid: ID must be literal --> 39 <shortcut 40 android:shortcutId="@string/label1" 41 android:shortcutShortLabel="@string/label1" 42 > 43 <intent android:action="android.intent.action.VIEW" /> 44 </shortcut> 45 46 <!-- Valid: disabled shortcut doesn't need an intent --> 47 <shortcut 48 android:shortcutId="disabled1" 49 android:enabled="false" 50 android:shortcutShortLabel="@string/label1" 51 /> 52 53 <!-- Valid, but disabled shortcut's intent will be ignored. --> 54 <shortcut 55 android:shortcutId="disabled2" 56 android:enabled="false" 57 android:shortcutShortLabel="@string/label1" 58 > 59 <intent android:action="action4" /> 60 </shortcut> 61 62 <!-- Invalid, no intent action (if any of the intents is invalid, the entire shortcut will be invalid.) --> 63 <shortcut 64 android:shortcutId="x1" 65 android:shortcutShortLabel="@string/label1" 66 > 67 <intent android:data="x"/> 68 <intent android:action="actionx"/> 69 </shortcut> 70 71 <shortcut 72 android:shortcutId="valid" 73 android:shortcutShortLabel="@string/label1" 74 > 75 <intent android:action="android.intent.action.VIEW" > 76 </intent> 77 </shortcut> 78</shortcuts> 79