IntentCompat.java revision 1935ed3af7c6545bc38adfdc6026d87a3249222f
1/* 2 * Copyright (C) 2011 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 17package android.support.v4.content; 18 19/** 20 * Helper for accessing newer features in Intent. 21 */ 22public class IntentCompat { 23 24 private IntentCompat() { 25 /* Hide constructor */ 26 } 27 28 /** 29 * Broadcast Action: Resources for a set of packages (which were 30 * previously unavailable) are currently 31 * available since the media on which they exist is available. 32 * The extra data {@link #EXTRA_CHANGED_PACKAGE_LIST} contains a 33 * list of packages whose availability changed. 34 * The extra data {@link #EXTRA_CHANGED_UID_LIST} contains a 35 * list of uids of packages whose availability changed. 36 * Note that the 37 * packages in this list do <em>not</em> receive this broadcast. 38 * The specified set of packages are now available on the system. 39 * <p>Includes the following extras: 40 * <ul> 41 * <li> {@link #EXTRA_CHANGED_PACKAGE_LIST} is the set of packages 42 * whose resources(were previously unavailable) are currently available. 43 * {@link #EXTRA_CHANGED_UID_LIST} is the set of uids of the 44 * packages whose resources(were previously unavailable) 45 * are currently available. 46 * </ul> 47 * 48 * <p class="note">This is a protected intent that can only be sent 49 * by the system. 50 */ 51 public static final String ACTION_EXTERNAL_APPLICATIONS_AVAILABLE = 52 "android.intent.action.EXTERNAL_APPLICATIONS_AVAILABLE"; 53 54 /** 55 * Broadcast Action: Resources for a set of packages are currently 56 * unavailable since the media on which they exist is unavailable. 57 * The extra data {@link #EXTRA_CHANGED_PACKAGE_LIST} contains a 58 * list of packages whose availability changed. 59 * The extra data {@link #EXTRA_CHANGED_UID_LIST} contains a 60 * list of uids of packages whose availability changed. 61 * The specified set of packages can no longer be 62 * launched and are practically unavailable on the system. 63 * <p>Inclues the following extras: 64 * <ul> 65 * <li> {@link #EXTRA_CHANGED_PACKAGE_LIST} is the set of packages 66 * whose resources are no longer available. 67 * {@link #EXTRA_CHANGED_UID_LIST} is the set of packages 68 * whose resources are no longer available. 69 * </ul> 70 * 71 * <p class="note">This is a protected intent that can only be sent 72 * by the system. 73 */ 74 public static final String ACTION_EXTERNAL_APPLICATIONS_UNAVAILABLE = 75 "android.intent.action.EXTERNAL_APPLICATIONS_UNAVAILABLE"; 76 77 /** 78 * This field is part of 79 * {@link android.content.Intent#ACTION_EXTERNAL_APPLICATIONS_AVAILABLE}, 80 * {@link android.content.Intent#ACTION_EXTERNAL_APPLICATIONS_UNAVAILABLE} 81 * and contains a string array of all of the components that have changed. 82 */ 83 public static final String EXTRA_CHANGED_PACKAGE_LIST = 84 "android.intent.extra.changed_package_list"; 85 86 /** 87 * This field is part of 88 * {@link android.content.Intent#ACTION_EXTERNAL_APPLICATIONS_AVAILABLE}, 89 * {@link android.content.Intent#ACTION_EXTERNAL_APPLICATIONS_UNAVAILABLE} 90 * and contains an integer array of uids of all of the components 91 * that have changed. 92 */ 93 public static final String EXTRA_CHANGED_UID_LIST = 94 "android.intent.extra.changed_uid_list"; 95} 96