summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/java/android/app/ActivityThread.java14
-rw-r--r--core/java/android/app/ContextImpl.java4
-rw-r--r--core/java/android/appwidget/AppWidgetManager.java13
-rw-r--r--core/java/android/content/SyncStorageEngine.java61
-rw-r--r--core/java/android/content/pm/RegisteredServicesCache.java53
-rw-r--r--core/java/android/server/search/SearchManagerService.java2
-rw-r--r--core/java/android/service/dreams/DreamService.java11
-rw-r--r--core/java/android/widget/CompoundButton.java9
-rw-r--r--core/java/android/widget/TextView.java18
-rw-r--r--core/java/com/android/internal/appwidget/IAppWidgetService.aidl2
-rw-r--r--core/java/com/android/internal/content/PackageHelper.java2
-rw-r--r--core/res/AndroidManifest.xml24
-rw-r--r--core/res/res/values/arrays.xml6
-rw-r--r--docs/html/distribute/googleplay/promote/brand.jd2
-rw-r--r--docs/html/google/play-services/maps.jd115
-rw-r--r--docs/html/google/play-services/plus.jd102
-rw-r--r--docs/html/images/google/gps-googleplus.pngbin0 -> 21182 bytes
-rw-r--r--docs/html/images/google/gps-maps.pngbin0 -> 126253 bytes
-rw-r--r--docs/html/sdk/images/4.0/folders.xcfbin259819 -> 0 bytes
-rw-r--r--docs/html/shareables/README.txt (renamed from docs/html/shareables/README)0
-rw-r--r--docs/html/tools/sdk/images/4.0/folders.xcfbin259819 -> 0 bytes
-rw-r--r--docs/image_sources/activity_lifecycle.graffle (renamed from docs/html/images/activity_lifecycle.graffle)0
-rw-r--r--docs/image_sources/brand/Android_Robot_outlined.ai (renamed from docs/html/images/brand/Android_Robot_outlined.ai)0
-rw-r--r--docs/image_sources/brand/Google_Play_Store.ai (renamed from docs/html/images/brand/Google_Play_Store.ai)0
-rw-r--r--docs/image_sources/brand/en_app_rgb_wo.ai (renamed from docs/html/images/brand/en_app_rgb_wo.ai)0
-rw-r--r--docs/image_sources/brand/en_generic_rgb_wo.ai (renamed from docs/html/images/brand/en_generic_rgb_wo.ai)0
-rwxr-xr-xdocs/image_sources/fundamentals/fragments.graffle (renamed from docs/html/images/fundamentals/fragments.graffle)0
-rw-r--r--docs/image_sources/fundamentals/restore_instance.graffle (renamed from docs/html/images/fundamentals/restore_instance.graffle)0
-rw-r--r--docs/image_sources/fundamentals/service_lifecycle.graffle (renamed from docs/html/images/fundamentals/service_lifecycle.graffle)0
-rw-r--r--docs/image_sources/providers/datamodel.graffle (renamed from docs/html/images/providers/datamodel.graffle)0
-rw-r--r--docs/image_sources/resources/res-selection-flowchart.graffle (renamed from docs/html/images/resources/res-selection-flowchart.graffle)0
-rw-r--r--docs/image_sources/resources/resource_devices_diagram.graffle (renamed from docs/html/images/resources/resource_devices_diagram.graffle)0
-rw-r--r--docs/image_sources/rs_compute.graffle (renamed from docs/html/images/rs_compute.graffle)0
-rw-r--r--docs/image_sources/rs_graphics.graffle (renamed from docs/html/images/rs_graphics.graffle)0
-rw-r--r--docs/image_sources/rs_overview.graffle (renamed from docs/html/images/rs_overview.graffle)0
-rw-r--r--docs/image_sources/training/basics/basic-lifecycle.graffle/QuickLook/Preview.pdf (renamed from docs/html/images/training/basics/basic-lifecycle.graffle/QuickLook/Preview.pdf)bin49980 -> 49980 bytes
-rw-r--r--docs/image_sources/training/basics/basic-lifecycle.graffle/QuickLook/Thumbnail.tiff (renamed from docs/html/images/training/basics/basic-lifecycle.graffle/QuickLook/Thumbnail.tiff)bin8168 -> 8168 bytes
-rw-r--r--docs/image_sources/training/basics/basic-lifecycle.graffle/data.plist (renamed from docs/html/images/training/basics/basic-lifecycle.graffle/data.plist)0
-rw-r--r--docs/image_sources/training/basics/basic-lifecycle.graffle/image1.png (renamed from docs/html/images/training/basics/basic-lifecycle.graffle/image1.png)bin16087 -> 16087 bytes
-rw-r--r--docs/image_sources/training/basics/basic-simple-screen-mock.graffle/QuickLook/Preview.pdf (renamed from docs/html/images/training/basic-simple-screen-mock.graffle/QuickLook/Preview.pdf)bin25152 -> 25152 bytes
-rw-r--r--docs/image_sources/training/basics/basic-simple-screen-mock.graffle/QuickLook/Thumbnail.tiff (renamed from docs/html/images/training/basic-simple-screen-mock.graffle/QuickLook/Thumbnail.tiff)bin5432 -> 5432 bytes
-rw-r--r--docs/image_sources/training/basics/basic-simple-screen-mock.graffle/data.plist (renamed from docs/html/images/training/basic-simple-screen-mock.graffle/data.plist)0
-rw-r--r--docs/image_sources/training/basics/basic-simple-screen-mock.graffle/image1.png (renamed from docs/html/images/training/basic-simple-screen-mock.graffle/image1.png)bin28173 -> 28173 bytes
-rw-r--r--docs/image_sources/training/basics/basic-simple-screen-mock.graffle/image2.png (renamed from docs/html/images/training/basic-simple-screen-mock.graffle/image2.png)bin12453 -> 12453 bytes
-rw-r--r--docs/image_sources/training/fragments-screen-mock.graffle/QuickLook/Preview.pdf (renamed from docs/html/images/training/basics/fragments-screen-mock.graffle/QuickLook/Preview.pdf)bin52394 -> 52394 bytes
-rw-r--r--docs/image_sources/training/fragments-screen-mock.graffle/QuickLook/Thumbnail.tiff (renamed from docs/html/images/training/basics/fragments-screen-mock.graffle/QuickLook/Thumbnail.tiff)bin9292 -> 9292 bytes
-rw-r--r--docs/image_sources/training/fragments-screen-mock.graffle/data.plist (renamed from docs/html/images/training/basics/fragments-screen-mock.graffle/data.plist)0
-rw-r--r--docs/image_sources/training/fragments-screen-mock.graffle/image1.png (renamed from docs/html/images/training/basics/fragments-screen-mock.graffle/image1.png)bin28173 -> 28173 bytes
-rw-r--r--docs/image_sources/training/fragments-screen-mock.graffle/image2.png (renamed from docs/html/images/training/basics/fragments-screen-mock.graffle/image2.png)bin12453 -> 12453 bytes
-rw-r--r--docs/image_sources/ui/actionbar-navigate-up.xcf (renamed from docs/html/images/ui/actionbar-navigate-up.xcf)bin262000 -> 262000 bytes
-rw-r--r--graphics/java/android/graphics/drawable/LayerDrawable.java4
-rw-r--r--packages/DefaultContainerService/src/com/android/defcontainer/DefaultContainerService.java2
-rw-r--r--packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java4
-rw-r--r--packages/SystemUI/src/com/android/systemui/usb/StorageNotification.java10
-rw-r--r--policy/src/com/android/internal/policy/impl/keyguard/FaceUnlock.java19
-rw-r--r--policy/src/com/android/internal/policy/impl/keyguard/KeyguardCircleFramedDrawable.java1
-rw-r--r--policy/src/com/android/internal/policy/impl/keyguard/KeyguardTransportControlView.java2
-rw-r--r--services/java/com/android/server/AppWidgetService.java5
-rw-r--r--services/java/com/android/server/AppWidgetServiceImpl.java6
-rwxr-xr-xservices/java/com/android/server/BluetoothManagerService.java66
-rw-r--r--services/java/com/android/server/DevicePolicyManagerService.java15
-rw-r--r--services/java/com/android/server/MountService.java6
-rw-r--r--services/java/com/android/server/SystemServer.java2
-rw-r--r--services/java/com/android/server/TelephonyRegistry.java2
-rw-r--r--services/java/com/android/server/am/ActivityManagerService.java7
-rw-r--r--services/java/com/android/server/display/WifiDisplayController.java11
-rw-r--r--services/java/com/android/server/dreams/DreamManagerService.java6
-rw-r--r--services/java/com/android/server/pm/PackageManagerService.java11
68 files changed, 386 insertions, 231 deletions
diff --git a/core/java/android/app/ActivityThread.java b/core/java/android/app/ActivityThread.java
index 456d757909c2..d8808173497e 100644
--- a/core/java/android/app/ActivityThread.java
+++ b/core/java/android/app/ActivityThread.java
@@ -4421,12 +4421,14 @@ public final class ActivityThread {
new ArrayList<IActivityManager.ContentProviderHolder>();
for (ProviderInfo cpi : providers) {
- StringBuilder buf = new StringBuilder(128);
- buf.append("Pub ");
- buf.append(cpi.authority);
- buf.append(": ");
- buf.append(cpi.name);
- Log.i(TAG, buf.toString());
+ if (DEBUG_PROVIDER) {
+ StringBuilder buf = new StringBuilder(128);
+ buf.append("Pub ");
+ buf.append(cpi.authority);
+ buf.append(": ");
+ buf.append(cpi.name);
+ Log.i(TAG, buf.toString());
+ }
IActivityManager.ContentProviderHolder cph = installProvider(context, null, cpi,
false /*noisy*/, true /*noReleaseNeeded*/, true /*stable*/);
if (cph != null) {
diff --git a/core/java/android/app/ContextImpl.java b/core/java/android/app/ContextImpl.java
index 95b6bed3dfb8..f895cccbe25e 100644
--- a/core/java/android/app/ContextImpl.java
+++ b/core/java/android/app/ContextImpl.java
@@ -168,7 +168,7 @@ class ReceiverRestrictedContext extends ContextWrapper {
* context object for Activity and other application components.
*/
class ContextImpl extends Context {
- private final static String TAG = "ApplicationContext";
+ private final static String TAG = "ContextImpl";
private final static boolean DEBUG = false;
private static final HashMap<String, SharedPreferencesImpl> sSharedPrefs =
@@ -1715,7 +1715,7 @@ class ContextImpl extends Context {
private void warnIfCallingFromSystemProcess() {
if (Process.myUid() == Process.SYSTEM_UID) {
Slog.w(TAG, "Calling a method in the system process without a qualified user: "
- + Debug.getCallers(3));
+ + Debug.getCallers(5));
}
}
diff --git a/core/java/android/appwidget/AppWidgetManager.java b/core/java/android/appwidget/AppWidgetManager.java
index 3dd640c151bc..77315f902048 100644
--- a/core/java/android/appwidget/AppWidgetManager.java
+++ b/core/java/android/appwidget/AppWidgetManager.java
@@ -544,8 +544,19 @@ public class AppWidgetManager {
* Return a list of the AppWidget providers that are currently installed.
*/
public List<AppWidgetProviderInfo> getInstalledProviders() {
+ return getInstalledProviders(AppWidgetProviderInfo.WIDGET_CATEGORY_HOME_SCREEN);
+ }
+
+ /**
+ * Return a list of the AppWidget providers that are currently installed.
+ *
+ * @param categoryFilter Will only return providers which register as any of the specified
+ * specified categories. See {@link AppWidgetProviderInfo#widgetCategory}.
+ * @hide
+ */
+ public List<AppWidgetProviderInfo> getInstalledProviders(int categoryFilter) {
try {
- List<AppWidgetProviderInfo> providers = sService.getInstalledProviders();
+ List<AppWidgetProviderInfo> providers = sService.getInstalledProviders(categoryFilter);
for (AppWidgetProviderInfo info : providers) {
// Converting complex to dp.
info.minWidth =
diff --git a/core/java/android/content/SyncStorageEngine.java b/core/java/android/content/SyncStorageEngine.java
index bdc5a3feff34..1ecab097594c 100644
--- a/core/java/android/content/SyncStorageEngine.java
+++ b/core/java/android/content/SyncStorageEngine.java
@@ -64,6 +64,7 @@ import java.util.List;
public class SyncStorageEngine extends Handler {
private static final String TAG = "SyncManager";
+ private static final boolean DEBUG = false;
private static final boolean DEBUG_FILE = false;
private static final String XML_ATTR_NEXT_AUTHORITY_ID = "nextAuthorityId";
@@ -443,7 +444,7 @@ public class SyncStorageEngine extends Handler {
mChangeListeners.finishBroadcast();
}
- if (Log.isLoggable(TAG, Log.VERBOSE)) {
+ if (DEBUG) {
Log.v(TAG, "reportChange " + which + " to: " + reports);
}
@@ -484,13 +485,17 @@ public class SyncStorageEngine extends Handler {
public void setSyncAutomatically(Account account, int userId, String providerName,
boolean sync) {
- Log.d(TAG, "setSyncAutomatically: " + /* account + */" provider " + providerName
- + ", user " + userId + " -> " + sync);
+ if (DEBUG) {
+ Log.d(TAG, "setSyncAutomatically: " + /* account + */" provider " + providerName
+ + ", user " + userId + " -> " + sync);
+ }
synchronized (mAuthorities) {
AuthorityInfo authority = getOrCreateAuthorityLocked(account, userId, providerName, -1,
false);
if (authority.enabled == sync) {
- Log.d(TAG, "setSyncAutomatically: already set to " + sync + ", doing nothing");
+ if (DEBUG) {
+ Log.d(TAG, "setSyncAutomatically: already set to " + sync + ", doing nothing");
+ }
return;
}
authority.enabled = sync;
@@ -532,13 +537,17 @@ public class SyncStorageEngine extends Handler {
} else if (syncable < -1) {
syncable = -1;
}
- Log.d(TAG, "setIsSyncable: " + account + ", provider " + providerName
- + ", user " + userId + " -> " + syncable);
+ if (DEBUG) {
+ Log.d(TAG, "setIsSyncable: " + account + ", provider " + providerName
+ + ", user " + userId + " -> " + syncable);
+ }
synchronized (mAuthorities) {
AuthorityInfo authority = getOrCreateAuthorityLocked(account, userId, providerName, -1,
false);
if (authority.syncable == syncable) {
- Log.d(TAG, "setIsSyncable: already set to " + syncable + ", doing nothing");
+ if (DEBUG) {
+ Log.d(TAG, "setIsSyncable: already set to " + syncable + ", doing nothing");
+ }
return;
}
authority.syncable = syncable;
@@ -564,7 +573,7 @@ public class SyncStorageEngine extends Handler {
public void setBackoff(Account account, int userId, String providerName,
long nextSyncTime, long nextDelay) {
- if (Log.isLoggable(TAG, Log.VERBOSE)) {
+ if (DEBUG) {
Log.v(TAG, "setBackoff: " + account + ", provider " + providerName
+ ", user " + userId
+ " -> nextSyncTime " + nextSyncTime + ", nextDelay " + nextDelay);
@@ -615,7 +624,7 @@ public class SyncStorageEngine extends Handler {
for (AuthorityInfo authorityInfo : accountInfo.authorities.values()) {
if (authorityInfo.backoffTime != NOT_IN_BACKOFF_MODE
|| authorityInfo.backoffDelay != NOT_IN_BACKOFF_MODE) {
- if (Log.isLoggable(TAG, Log.VERBOSE)) {
+ if (DEBUG) {
Log.v(TAG, "clearAllBackoffs:"
+ " authority:" + authorityInfo.authority
+ " account:" + accountInfo.accountAndUser.account.name
@@ -641,7 +650,7 @@ public class SyncStorageEngine extends Handler {
public void setDelayUntilTime(Account account, int userId, String providerName,
long delayUntil) {
- if (Log.isLoggable(TAG, Log.VERBOSE)) {
+ if (DEBUG) {
Log.v(TAG, "setDelayUntil: " + account + ", provider " + providerName
+ ", user " + userId + " -> delayUntil " + delayUntil);
}
@@ -677,7 +686,7 @@ public class SyncStorageEngine extends Handler {
if (extras == null) {
extras = new Bundle();
}
- if (Log.isLoggable(TAG, Log.VERBOSE)) {
+ if (DEBUG) {
Log.v(TAG, "addOrRemovePeriodicSync: " + account + ", user " + userId
+ ", provider " + providerName
+ " -> period " + period + ", extras " + extras);
@@ -833,7 +842,7 @@ public class SyncStorageEngine extends Handler {
public PendingOperation insertIntoPending(PendingOperation op) {
synchronized (mAuthorities) {
- if (Log.isLoggable(TAG, Log.VERBOSE)) {
+ if (DEBUG) {
Log.v(TAG, "insertIntoPending: account=" + op.account
+ " user=" + op.userId
+ " auth=" + op.authority
@@ -865,7 +874,7 @@ public class SyncStorageEngine extends Handler {
public boolean deleteFromPending(PendingOperation op) {
boolean res = false;
synchronized (mAuthorities) {
- if (Log.isLoggable(TAG, Log.VERBOSE)) {
+ if (DEBUG) {
Log.v(TAG, "deleteFromPending: account=" + op.account
+ " user=" + op.userId
+ " auth=" + op.authority
@@ -884,7 +893,7 @@ public class SyncStorageEngine extends Handler {
AuthorityInfo authority = getAuthorityLocked(op.account, op.userId, op.authority,
"deleteFromPending");
if (authority != null) {
- if (Log.isLoggable(TAG, Log.VERBOSE)) Log.v(TAG, "removing - " + authority);
+ if (DEBUG) Log.v(TAG, "removing - " + authority);
final int N = mPendingOperations.size();
boolean morePending = false;
for (int i=0; i<N; i++) {
@@ -898,7 +907,7 @@ public class SyncStorageEngine extends Handler {
}
if (!morePending) {
- if (Log.isLoggable(TAG, Log.VERBOSE)) Log.v(TAG, "no more pending!");
+ if (DEBUG) Log.v(TAG, "no more pending!");
SyncStatusInfo status = getOrCreateSyncStatusLocked(authority.ident);
status.pending = false;
}
@@ -938,7 +947,7 @@ public class SyncStorageEngine extends Handler {
*/
public void doDatabaseCleanup(Account[] accounts, int userId) {
synchronized (mAuthorities) {
- if (Log.isLoggable(TAG, Log.VERBOSE)) Log.w(TAG, "Updating for new accounts...");
+ if (DEBUG) Log.v(TAG, "Updating for new accounts...");
SparseArray<AuthorityInfo> removing = new SparseArray<AuthorityInfo>();
Iterator<AccountInfo> accIt = mAccounts.values().iterator();
while (accIt.hasNext()) {
@@ -946,8 +955,8 @@ public class SyncStorageEngine extends Handler {
if (!ArrayUtils.contains(accounts, acc.accountAndUser.account)
&& acc.accountAndUser.userId == userId) {
// This account no longer exists...
- if (Log.isLoggable(TAG, Log.VERBOSE)) {
- Log.w(TAG, "Account removed: " + acc.accountAndUser);
+ if (DEBUG) {
+ Log.v(TAG, "Account removed: " + acc.accountAndUser);
}
for (AuthorityInfo auth : acc.authorities.values()) {
removing.put(auth.ident, auth);
@@ -993,7 +1002,7 @@ public class SyncStorageEngine extends Handler {
public SyncInfo addActiveSync(SyncManager.ActiveSyncContext activeSyncContext) {
final SyncInfo syncInfo;
synchronized (mAuthorities) {
- if (Log.isLoggable(TAG, Log.VERBOSE)) {
+ if (DEBUG) {
Log.v(TAG, "setActiveSync: account="
+ activeSyncContext.mSyncOperation.account
+ " auth=" + activeSyncContext.mSyncOperation.authority
@@ -1021,7 +1030,7 @@ public class SyncStorageEngine extends Handler {
*/
public void removeActiveSync(SyncInfo syncInfo, int userId) {
synchronized (mAuthorities) {
- if (Log.isLoggable(TAG, Log.VERBOSE)) {
+ if (DEBUG) {
Log.v(TAG, "removeActiveSync: account=" + syncInfo.account
+ " user=" + userId
+ " auth=" + syncInfo.authority);
@@ -1046,7 +1055,7 @@ public class SyncStorageEngine extends Handler {
long now, int source, boolean initialization) {
long id;
synchronized (mAuthorities) {
- if (Log.isLoggable(TAG, Log.VERBOSE)) {
+ if (DEBUG) {
Log.v(TAG, "insertStartSyncEvent: account=" + accountName + "user=" + userId
+ " auth=" + authorityName + " source=" + source);
}
@@ -1068,7 +1077,7 @@ public class SyncStorageEngine extends Handler {
mSyncHistory.remove(mSyncHistory.size()-1);
}
id = item.historyId;
- if (Log.isLoggable(TAG, Log.VERBOSE)) Log.v(TAG, "returning historyId " + id);
+ if (DEBUG) Log.v(TAG, "returning historyId " + id);
}
reportChange(ContentResolver.SYNC_OBSERVER_TYPE_STATUS);
@@ -1096,7 +1105,7 @@ public class SyncStorageEngine extends Handler {
public void stopSyncEvent(long historyId, long elapsedTime, String resultMessage,
long downstreamActivity, long upstreamActivity) {
synchronized (mAuthorities) {
- if (Log.isLoggable(TAG, Log.VERBOSE)) {
+ if (DEBUG) {
Log.v(TAG, "stopSyncEvent: historyId=" + historyId);
}
SyncHistoryItem item = null;
@@ -1358,7 +1367,7 @@ public class SyncStorageEngine extends Handler {
AccountInfo accountInfo = mAccounts.get(au);
if (accountInfo == null) {
if (tag != null) {
- if (Log.isLoggable(TAG, Log.VERBOSE)) {
+ if (DEBUG) {
Log.v(TAG, tag + ": unknown account " + au);
}
}
@@ -1367,7 +1376,7 @@ public class SyncStorageEngine extends Handler {
AuthorityInfo authority = accountInfo.authorities.get(authorityName);
if (authority == null) {
if (tag != null) {
- if (Log.isLoggable(TAG, Log.VERBOSE)) {
+ if (DEBUG) {
Log.v(TAG, tag + ": unknown authority " + authorityName);
}
}
@@ -1392,7 +1401,7 @@ public class SyncStorageEngine extends Handler {
mNextAuthorityId++;
doWrite = true;
}
- if (Log.isLoggable(TAG, Log.VERBOSE)) {
+ if (DEBUG) {
Log.v(TAG, "created a new AuthorityInfo for " + accountName
+ ", user " + userId
+ ", provider " + authorityName);
diff --git a/core/java/android/content/pm/RegisteredServicesCache.java b/core/java/android/content/pm/RegisteredServicesCache.java
index a07a865c7b0e..aaa0917c70da 100644
--- a/core/java/android/content/pm/RegisteredServicesCache.java
+++ b/core/java/android/content/pm/RegisteredServicesCache.java
@@ -69,6 +69,7 @@ import java.util.Map;
*/
public abstract class RegisteredServicesCache<V> {
private static final String TAG = "PackageManager";
+ private static final boolean DEBUG = false;
public final Context mContext;
private final String mInterfaceName;
@@ -195,7 +196,7 @@ public abstract class RegisteredServicesCache<V> {
}
private void notifyListener(final V type, final int userId, final boolean removed) {
- if (Log.isLoggable(TAG, Log.VERBOSE)) {
+ if (DEBUG) {
Log.d(TAG, "notifyListener: " + type + " is " + (removed ? "removed" : "added"));
}
RegisteredServicesCacheListener<V> listener;
@@ -291,7 +292,9 @@ public abstract class RegisteredServicesCache<V> {
* given {@link UserHandle}.
*/
private void generateServicesMap(int userId) {
- Slog.d(TAG, "generateServicesMap() for " + userId);
+ if (DEBUG) {
+ Slog.d(TAG, "generateServicesMap() for " + userId);
+ }
final PackageManager pm = mContext.getPackageManager();
final ArrayList<ServiceInfo<V>> serviceInfos = new ArrayList<ServiceInfo<V>>();
@@ -322,6 +325,7 @@ public abstract class RegisteredServicesCache<V> {
}
StringBuilder changes = new StringBuilder();
+ boolean changed = false;
for (ServiceInfo<V> info : serviceInfos) {
// four cases:
// - doesn't exist yet
@@ -334,33 +338,41 @@ public abstract class RegisteredServicesCache<V> {
// - add, notify user that it was added
Integer previousUid = user.persistentServices.get(info.type);
if (previousUid == null) {
- changes.append(" New service added: ").append(info).append("\n");
+ if (DEBUG) {
+ changes.append(" New service added: ").append(info).append("\n");
+ }
+ changed = true;
user.services.put(info.type, info);
user.persistentServices.put(info.type, info.uid);
if (!(mPersistentServicesFileDidNotExist && firstScan)) {
notifyListener(info.type, userId, false /* removed */);
}
} else if (previousUid == info.uid) {
- if (Log.isLoggable(TAG, Log.VERBOSE)) {
+ if (DEBUG) {
changes.append(" Existing service (nop): ").append(info).append("\n");
}
user.services.put(info.type, info);
} else if (inSystemImage(info.uid)
|| !containsTypeAndUid(serviceInfos, info.type, previousUid)) {
- if (inSystemImage(info.uid)) {
- changes.append(" System service replacing existing: ").append(info)
- .append("\n");
- } else {
- changes.append(" Existing service replacing a removed service: ")
- .append(info).append("\n");
+ if (DEBUG) {
+ if (inSystemImage(info.uid)) {
+ changes.append(" System service replacing existing: ").append(info)
+ .append("\n");
+ } else {
+ changes.append(" Existing service replacing a removed service: ")
+ .append(info).append("\n");
+ }
}
+ changed = true;
user.services.put(info.type, info);
user.persistentServices.put(info.type, info.uid);
notifyListener(info.type, userId, false /* removed */);
} else {
// ignore
- changes.append(" Existing service with new uid ignored: ").append(info)
- .append("\n");
+ if (DEBUG) {
+ changes.append(" Existing service with new uid ignored: ").append(info)
+ .append("\n");
+ }
}
}
@@ -371,22 +383,25 @@ public abstract class RegisteredServicesCache<V> {
}
}
for (V v1 : toBeRemoved) {
+ if (DEBUG) {
+ changes.append(" Service removed: ").append(v1).append("\n");
+ }
+ changed = true;
user.persistentServices.remove(v1);
- changes.append(" Service removed: ").append(v1).append("\n");
notifyListener(v1, userId, true /* removed */);
}
- if (changes.length() > 0) {
- if (Log.isLoggable(TAG, Log.VERBOSE)) {
+ if (DEBUG) {
+ if (changes.length() > 0) {
Log.d(TAG, "generateServicesMap(" + mInterfaceName + "): " +
serviceInfos.size() + " services:\n" + changes);
- }
- writePersistentServicesLocked();
- } else {
- if (Log.isLoggable(TAG, Log.VERBOSE)) {
+ } else {
Log.d(TAG, "generateServicesMap(" + mInterfaceName + "): " +
serviceInfos.size() + " services unchanged");
}
}
+ if (changed) {
+ writePersistentServicesLocked();
+ }
}
}
diff --git a/core/java/android/server/search/SearchManagerService.java b/core/java/android/server/search/SearchManagerService.java
index 4a2137461801..46f27234a851 100644
--- a/core/java/android/server/search/SearchManagerService.java
+++ b/core/java/android/server/search/SearchManagerService.java
@@ -92,7 +92,7 @@ public class SearchManagerService extends ISearchManager.Stub {
Searchables searchables = mSearchables.get(userId);
if (searchables == null) {
- Log.i(TAG, "Building list of searchable activities for userId=" + userId);
+ //Log.i(TAG, "Building list of searchable activities for userId=" + userId);
searchables = new Searchables(mContext, userId);
searchables.buildSearchableList();
mSearchables.append(userId, searchables);
diff --git a/core/java/android/service/dreams/DreamService.java b/core/java/android/service/dreams/DreamService.java
index 6c9290bf99ff..f6b6c89cbd48 100644
--- a/core/java/android/service/dreams/DreamService.java
+++ b/core/java/android/service/dreams/DreamService.java
@@ -44,13 +44,13 @@ import android.view.accessibility.AccessibilityEvent;
import com.android.internal.policy.PolicyManager;
/**
- * Extend this class to implement a custom Dream (displayed to the user as a "Sleep Mode").
+ * Extend this class to implement a custom dream (available to the user as a "Daydream").
*
* <p>Dreams are interactive screensavers launched when a charging device is idle, or docked in a
* desk dock. Dreams provide another modality for apps to express themselves, tailored for
* an exhibition/lean-back experience.</p>
*
- * <p>The Dream lifecycle is as follows:</p>
+ * <p>The {@code DreamService} lifecycle is as follows:</p>
* <ol>
* <li>{@link #onAttachedToWindow}
* <p>Use this for initial setup, such as calling {@link #setContentView setContentView()}.</li>
@@ -59,14 +59,15 @@ import com.android.internal.policy.PolicyManager;
* <li>{@link #onDreamingStopped}
* <p>Use this to stop the things you started in {@link #onDreamingStarted}.</li>
* <li>{@link #onDetachedFromWindow}
- * <p>Use this to dismantle resources your dream set up. For example, detach from handlers
- * and listeners.</li>
+ * <p>Use this to dismantle resources (for example, detach from handlers
+ * and listeners).</li>
* </ol>
*
* <p>In addition, onCreate and onDestroy (from the Service interface) will also be called, but
* initialization and teardown should be done by overriding the hooks above.</p>
*
- * <p>To be available to the system, Dreams should be declared in the manifest as follows:</p>
+ * <p>To be available to the system, your {@code DreamService} should be declared in the
+ * manifest as follows:</p>
* <pre>
* &lt;service
* android:name=".MyDream"
diff --git a/core/java/android/widget/CompoundButton.java b/core/java/android/widget/CompoundButton.java
index 421a3247e8c5..452ad1bd3e6f 100644
--- a/core/java/android/widget/CompoundButton.java
+++ b/core/java/android/widget/CompoundButton.java
@@ -248,6 +248,15 @@ public abstract class CompoundButton extends Button implements Checkable {
return padding;
}
+ /**
+ * @hide
+ */
+ @Override
+ public int getHorizontalOffsetForDrawables() {
+ final Drawable buttonDrawable = mButtonDrawable;
+ return (buttonDrawable != null) ? buttonDrawable.getIntrinsicWidth() : 0;
+ }
+
@Override
protected void onDraw(Canvas canvas) {
super.onDraw(canvas);
diff --git a/core/java/android/widget/TextView.java b/core/java/android/widget/TextView.java
index 0a16a663f086..22bfadb3811c 100644
--- a/core/java/android/widget/TextView.java
+++ b/core/java/android/widget/TextView.java
@@ -4863,6 +4863,13 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
return highlight;
}
+ /**
+ * @hide
+ */
+ public int getHorizontalOffsetForDrawables() {
+ return 0;
+ }
+
@Override
protected void onDraw(Canvas canvas) {
restartMarqueeIfNeeded();
@@ -4880,6 +4887,10 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
final int left = mLeft;
final int bottom = mBottom;
final int top = mTop;
+ final boolean isLayoutRtl = isLayoutRtl();
+ final int offset = getHorizontalOffsetForDrawables();
+ final int leftOffset = isLayoutRtl ? 0 : offset;
+ final int rightOffset = isLayoutRtl ? offset : 0 ;
final Drawables dr = mDrawables;
if (dr != null) {
@@ -4895,7 +4906,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
// Make sure to update invalidateDrawable() when changing this code.
if (dr.mDrawableLeft != null) {
canvas.save();
- canvas.translate(scrollX + mPaddingLeft,
+ canvas.translate(scrollX + mPaddingLeft + leftOffset,
scrollY + compoundPaddingTop +
(vspace - dr.mDrawableHeightLeft) / 2);
dr.mDrawableLeft.draw(canvas);
@@ -4906,7 +4917,8 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
// Make sure to update invalidateDrawable() when changing this code.
if (dr.mDrawableRight != null) {
canvas.save();
- canvas.translate(scrollX + right - left - mPaddingRight - dr.mDrawableSizeRight,
+ canvas.translate(scrollX + right - left - mPaddingRight
+ - dr.mDrawableSizeRight - rightOffset,
scrollY + compoundPaddingTop + (vspace - dr.mDrawableHeightRight) / 2);
dr.mDrawableRight.draw(canvas);
canvas.restore();
@@ -4991,8 +5003,6 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
}
canvas.translate(compoundPaddingLeft, extendedPaddingTop + voffsetText);
- final boolean isLayoutRtl = isLayoutRtl();
-
final int layoutDirection = getLayoutDirection();
final int absoluteGravity = Gravity.getAbsoluteGravity(mGravity, layoutDirection);
if (mEllipsize == TextUtils.TruncateAt.MARQUEE &&
diff --git a/core/java/com/android/internal/appwidget/IAppWidgetService.aidl b/core/java/com/android/internal/appwidget/IAppWidgetService.aidl
index b63ad62c0588..e81d38984618 100644
--- a/core/java/com/android/internal/appwidget/IAppWidgetService.aidl
+++ b/core/java/com/android/internal/appwidget/IAppWidgetService.aidl
@@ -49,7 +49,7 @@ interface IAppWidgetService {
void partiallyUpdateAppWidgetIds(in int[] appWidgetIds, in RemoteViews views);
void updateAppWidgetProvider(in ComponentName provider, in RemoteViews views);
void notifyAppWidgetViewDataChanged(in int[] appWidgetIds, int viewId);
- List<AppWidgetProviderInfo> getInstalledProviders();
+ List<AppWidgetProviderInfo> getInstalledProviders(int categoryFilter);
AppWidgetProviderInfo getAppWidgetInfo(int appWidgetId);
boolean hasBindAppWidgetPermission(in String packageName);
void setBindAppWidgetPermission(in String packageName, in boolean permission);
diff --git a/core/java/com/android/internal/content/PackageHelper.java b/core/java/com/android/internal/content/PackageHelper.java
index c5e7d9de3716..1a4835b2b7b4 100644
--- a/core/java/com/android/internal/content/PackageHelper.java
+++ b/core/java/com/android/internal/content/PackageHelper.java
@@ -51,7 +51,7 @@ public class PackageHelper {
public static final int RECOMMEND_FAILED_INVALID_URI = -6;
public static final int RECOMMEND_FAILED_VERSION_DOWNGRADE = -7;
- private static final boolean localLOGV = true;
+ private static final boolean localLOGV = false;
private static final String TAG = "PackageHelper";
// App installation location settings values
public static final int APP_INSTALL_AUTO = 0;
diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml
index 7971ccb9bf4b..316de5067b75 100644
--- a/core/res/AndroidManifest.xml
+++ b/core/res/AndroidManifest.xml
@@ -143,6 +143,30 @@
<protected-broadcast android:name="android.intent.action.DREAMING_STARTED" />
<protected-broadcast android:name="android.intent.action.DREAMING_STOPPED" />
+ <protected-broadcast android:name="android.intent.action.ANY_DATA_STATE" />
+
+ <protected-broadcast android:name="com.android.server.WifiManager.action.START_SCAN" />
+ <protected-broadcast android:name="com.android.server.WifiManager.action.DELAYED_DRIVER_STOP" />
+ <protected-broadcast android:name="android.net.wifi.WIFI_STATE_CHANGED" />
+ <protected-broadcast android:name="android.net.wifi.WIFI_AP_STATE_CHANGED" />
+ <protected-broadcast android:name="android.net.wifi.SCAN_RESULTS" />
+ <protected-broadcast android:name="android.net.wifi.RSSI_CHANGED" />
+ <protected-broadcast android:name="android.net.wifi.STATE_CHANGE" />
+ <protected-broadcast android:name="android.net.wifi.LINK_CONFIGURATION_CHANGED" />
+ <protected-broadcast android:name="android.net.wifi.CONFIGURED_NETWORKS_CHANGE" />
+ <protected-broadcast android:name="android.net.wifi.supplicant.CONNECTION_CHANGE" />
+ <protected-broadcast android:name="android.net.wifi.supplicant.STATE_CHANGE" />
+ <protected-broadcast android:name="android.net.wifi.p2p.STATE_CHANGED" />
+ <protected-broadcast android:name="android.net.wifi.p2p.DISCOVERY_STATE_CHANGE" />
+ <protected-broadcast android:name="android.net.wifi.p2p.THIS_DEVICE_CHANGED" />
+ <protected-broadcast android:name="android.net.wifi.p2p.PEERS_CHANGED" />
+ <protected-broadcast android:name="android.net.wifi.p2p.CONNECTION_STATE_CHANGE" />
+ <protected-broadcast android:name="android.net.wifi.p2p.PERSISTENT_GROUPS_CHANGED" />
+ <protected-broadcast android:name="android.net.conn.TETHER_STATE_CHANGED" />
+ <protected-broadcast android:name="android.net.conn.INET_CONDITION_ACTION" />
+
+
+
<!-- ====================================== -->
<!-- Permissions for things that cost money -->
diff --git a/core/res/res/values/arrays.xml b/core/res/res/values/arrays.xml
index 1e966f7cc508..f7ff77bfee8b 100644
--- a/core/res/res/values/arrays.xml
+++ b/core/res/res/values/arrays.xml
@@ -143,10 +143,6 @@
<item>@drawable/menu_dropdown_panel_holo_dark</item>
<item>@drawable/overscroll_edge</item>
<item>@drawable/overscroll_glow</item>
- <item>@drawable/popup_inline_error_above_holo_dark</item>
- <item>@drawable/popup_inline_error_above_holo_light</item>
- <item>@drawable/popup_inline_error_holo_dark</item>
- <item>@drawable/popup_inline_error_holo_light</item>
<item>@drawable/spinner_16_outer_holo</item>
<item>@drawable/spinner_16_inner_holo</item>
<item>@drawable/spinner_48_outer_holo</item>
@@ -257,8 +253,6 @@
<item>@drawable/ab_solid_shadow_holo</item>
<item>@drawable/item_background_holo_dark</item>
<item>@drawable/item_background_holo_light</item>
- <item>@drawable/ic_ab_back_holo_dark</item>
- <item>@drawable/ic_ab_back_holo_light</item>
<item>@drawable/fastscroll_thumb_holo</item>
<item>@drawable/fastscroll_thumb_pressed_holo</item>
<item>@drawable/fastscroll_thumb_default_holo</item>
diff --git a/docs/html/distribute/googleplay/promote/brand.jd b/docs/html/distribute/googleplay/promote/brand.jd
index cb6bf48c0fd6..834f8a910dbb 100644
--- a/docs/html/distribute/googleplay/promote/brand.jd
+++ b/docs/html/distribute/googleplay/promote/brand.jd
@@ -51,7 +51,7 @@ Instead use "for Android."
<p style="text-align:center">
<a href="{@docRoot}images/brand/Android_Robot_100.png">100x118</a> |
<a href="{@docRoot}images/brand/Android_Robot_200.png">200x237</a><br>
- <a href="{@docRoot}images/brand/Android_Robot_outlined.ai">Illustrator (.ai)</a></p>
+ <a href="{@docRoot}downloads/brand/Android_Robot_outlined.ai">Illustrator (.ai)</a></p>
</div>
<p>The Android robot can be used, reproduced, and modified freely in marketing
diff --git a/docs/html/google/play-services/maps.jd b/docs/html/google/play-services/maps.jd
index eea17e9bd406..85a745db2627 100644
--- a/docs/html/google/play-services/maps.jd
+++ b/docs/html/google/play-services/maps.jd
@@ -1,73 +1,86 @@
page.title=Google Maps
-page.landing=true
-page.landing.intro=Add Google maps to your Android apps and let your users explore the world. Give your users all of the benefits of the Google Maps, but with the customizations that you need for your app and users.
-page.landing.link=https://developers.google.com/maps/documentation/android/
-page.landing.link.text=developers.google.com/maps
-page.landing.image=images/gps-maps.png
+header.hide=1
@jd:body
+
+<div class="landing-banner">
+
+<div class="col-6">
+ <img src="{@docRoot}images/google/gps-maps.png" alt="">
+</div>
+<div class="col-6">
+
+ <h1 itemprop="name" style="margin-bottom:0;">Google Maps</h1>
+ <p itemprop="description">Allow your users explore the world with rich maps provided by
+ Google. Identify locations with <b>custom markers</b>, augment the map data
+ with <b>image overlays</b>, embed <b>one or more maps</b> as fragments,
+ and much more.</p>
+ <p>The <a
+href="{@docRoot}google/play-services/reference/com/google/android/gms/maps/package-summary.html"
+>Google Maps Android API reference</a> is available here on developer.android.com, but for more
+information about adding maps to your app, visit:</p>
+ <p><a class="external-link"
+href="https://developers.google.com/maps/documentation/android/">developers.google.com/maps</a></p>
+</div>
+</div>
+
+
+
<div class="landing-docs">
- <div class="col-6">
+ <div class="col-6 normal-links">
<h3 style="clear:left">Key Developer Features</h3>
- <a href="https://developers.google.com/maps/documentation/android/map">
- <h4>Bring Maps to your Mobile Apps</h4>
- The Google Maps APIs let you embed Google Maps into an Activity with a simple XML snippet
- in the form of a fragment. With MapFragment, you can take advantage of exciting features such as 3D maps;
- indoor, satellite, terrain, and hybrid maps; and vector-based tiles for efficient caching and drawing.
- </a>
+ <h4>Add Maps in a fragment</h4>
+ <p>With version 2 of the Google Maps Android API, you can embed maps into an activity
+ as a fragment with a simple XML snippet. The new Maps offer exciting features such as 3D maps;
+ indoor, satellite, terrain, and hybrid maps;
+ vector-based tiles for efficient caching and drawing; animated transitions; and much more.
+ <a class="external-link" href="https://developers.google.com/maps/documentation/android/map">Add
+ a map object</a>.</p>
- <a href="https://developers.google.com/maps/documentation/android/marker">
- <h4>Highlight important places and routes</h4>
- <p>
- Overlay markers onto your maps to highlight places your users are interested
- in. You can also define custom colors or icons for your map markers to
- coincide with the look and feel of your app.</p>
-
- <p>In addition, you can draw polylines, a set of connected line segments on a map
- and polygons, a set of polylines in a closed loop.</p>
+ <h4>Customize the map</h4>
+ <p>Add markers onto the map to indicate special points of interest for your users.
+ You can define custom colors or icons for your map markers to
+ match your app's look and feel. To further enhance the app, draw polylines
+ and polygons to indicate paths or regions, or provide complete image overlays.
+ <a class="external-link" href="https://developers.google.com/maps/documentation/android/marker">Draw
+ markers</a>.</p>
</a>
-
- <a href="https://developers.google.com/maps/documentation/android/views">
- <h4>Change views and perspectives</h4>
- Give your users a different view of the world with the ability to control rotation, tilting,
- zooming, and panning properties of the maps you are displaying. Show 3D views of maps,
- zoom in on terrain maps, allow users to swipe across areas, and much more.
- </a>
-
+
+ <h4>Control the user's view</h4>
+ <p>Give your users a different view of the world with the ability to control the rotation, tilt,
+ zoom, and pan properties of the "camera" perspective of the map.
+ <a class="external-link" href="https://developers.google.com/maps/documentation/android/views">Change
+ the view</a>.</p>
</div>
+
<div class="col-6 normal-links">
<h3 style="clear:left">Getting Started</h3>
- <h4>Configure Maps</h4>
+ <h4>1. Get the Google Play services SDK</h4>
<p>The Google Maps Android APIs are part of the Google Play services platform.</p>
<p>To use Google Maps, <a href="{@docRoot}google/play-services/download.html">download and configure</a>
- the Google Play services SDK and see the <a href="https://developers.google.com/maps/documentation/android/start#installing_the_google_maps_android_v2_api">
- Getting Started guide</a> on how to configure Google Maps for your app.
+ the Google Play services SDK from the SDK Manager. Then see the <a class="external-link"
+ href="https://developers.google.com/maps/documentation/android/start#installing_the_google_maps_android_v2_api">
+ Getting Started guide</a> to get your API key for Maps and set up your app.
</p>
- <h4>Run the sample</h4>
- <p>
- The Google Maps sample is located in <code>&lt;android-sdk&gt;/extras/google-play-services/samples/maps</code>
- and shows you how to use the major components of the Google Maps Android APIs.
+ <h4>2. Run the sample</h4>
+ <p>Once you've installed the Google Play services package, the Google Maps sample is located in
+ <code>&lt;android-sdk&gt;/extras/google-play-services/samples/maps</code> and shows you
+ how to use the major components of the Google Maps Android APIs.
</p>
- <h4>Visit the Google Maps developer site</h4>
- <p>
- For instructions on how to fully integrate Google+ into your app, with code snippets, visit the
- <a href="https://developers.google.com/maps/documentation/android/intro">Google Maps developer documentation</a>
- located at developers.google.com.
- </p>
-
- <h4>See the reference documentation</h4>
- <p>
- The <a href="{@docRoot}google/play-services/reference/com/google/android/gms/maps/package-summary.html">Google Maps API reference</a>
- is provided for you on this site and is also available at <a href="https://developers.google.com/maps/documentation/android/reference/com/google/android/gms/maps/package-summary">developers.google.com</a> if you
- prefer to read them there.</p>
- <p>
- In addition, the entire <a href="{@docRoot}google/play-services/reference/packages.html">Google Play
- services platform reference</a> is hosted on this site for your convenience.
+ <h4>3. Read the documentation</h4>
+ <p>For quick access while developing your Android apps, the
+ <a href="{@docRoot}google/play-services/reference/com/google/android/gms/maps/package-summary.html">Google Maps
+ Android API reference</a> is available here on developer.android.com.</p>
+ <p>Extended documentation for the Google Maps Android APIs is provided with the rest of the
+ Google Maps developer documents at <a class="external-link"
+ href="https://developers.google.com/maps/documentation/android/">developers.google.com/maps</a>.
</p>
</div>
+
+
</div>
</div> \ No newline at end of file
diff --git a/docs/html/google/play-services/plus.jd b/docs/html/google/play-services/plus.jd
index 77423185a2ac..571360bcd92f 100644
--- a/docs/html/google/play-services/plus.jd
+++ b/docs/html/google/play-services/plus.jd
@@ -1,65 +1,83 @@
page.title=Google+
-page.landing=true
-page.landing.intro=Create an engaging social experience and connect with more users by integrating G+ into your app.
-page.landing.link=https://developers.google.com/+/mobile/android/
-page.landing.link.text=developers.google.com/+
-page.landing.image=images/gps-plus.png
+header.hide=1
@jd:body
+
+<div class="landing-banner">
+
+<div class="col-6">
+ <img src="{@docRoot}images/google/gps-googleplus.png" alt="">
+</div>
+<div class="col-6">
+
+ <h1 itemprop="name" style="margin-bottom:0;">Google+</h1>
+ <p itemprop="description">Create an engaging social experience
+ by integrating Google+ features in your app. You can <b>authenticate users</b> and allow them to
+ <b>sign in</b>, add +1 buttons so users can <b>recommend your app content</b>,
+ and allow users to <b>share rich content</b> with Google+.</p>
+
+ <p>The <a
+href="{@docRoot}google/play-services/reference/com/google/android/gms/plus/package-summary.html"
+>Google+ Android API reference</a> is available here on developer.android.com, but for more
+information about integrating Google+, visit:</p>
+<p><a class="external-link"
+href="https://developers.google.com/+/mobile/android/">developers.google.com/+</a></p>
+</div>
+</div>
+
<div class="landing-docs">
- <div class="col-6">
+ <div class="col-6 normal-links">
<h3 style="clear:left">Key Developer Features</h3>
- <a href="https://developers.google.com/+/mobile/android/share">
- <h4>Share to Google+</h4>
- Display a Share dialog that lets your users share rich content from your app, including text,
- photos, URL attachments, and location, into the Google+ stream.
- </a>
+ <h4>Sign in with Google+</h4>
+ <p>Allow users to easily and securely sign in to your app using their Google+ credentials.
+ This allows you to know who they are on Google+ and to build a more personalized experience in
+ your app. <a href="https://developers.google.com/+/mobile/android/sign-in"
+ class="external-link">Add sign in</a>.</p>
- <a href="https://developers.google.com/+/mobile/android/recommend">
+ <h4>Share to Google+</h4>
+ <p>Display a Share dialog that lets your users share rich content from your app,
+ including text, photos, URL attachments, and location, into the Google+ stream.
+ <a href="https://developers.google.com/+/mobile/android/share"
+ class="external-link">Add sharing with Google+</a>.</p>
+
<h4>Recommend content</h4>
- Add a native +1 button so users can recommend content from your app. When users +1, they can
- also share content with their circles. These endorsements can give your app more
- credibility and help it grow faster.
- </a>
-
- <a href="https://developers.google.com/+/mobile/android/sign-in">
- <h4>Sign in with Google+</h4>
- Allow users to easily and securely sign in to your app using their Google+ credentials.
- This allows you to know who they are on Google+ and to build a more personalized experience in your app.
- </a>
- <a href="https://developers.google.com/+/mobile/android/write-moments">
+ <p>Add a native +1 button so users can recommend content from your app. When users +1, they
+ can also share content with their circles. These endorsements can give your app more
+ credibility and help it grow faster. <a class="external-link"
+ href="https://developers.google.com/+/mobile/android/recommend">Add the +1 button</a>.</p>
+
<h4>Save moments</h4>
- Save user actions from your app such as check-ins, reviews, video views, comments, and more,
- to your users' private Google+ history. From there, users can share these moments with others.
- </a>
+ <p>Save user actions from your app such as check-ins, reviews, video views, comments,
+ and more, to your users' private Google+ history. From there, users can share these
+ moments with others. <a class="external-link"
+ href="https://developers.google.com/+/mobile/android/write-moments">Save user
+ moments</a>.</p>
</div>
+
<div class="col-6 normal-links">
<h3 style="clear:left">Getting Started</h3>
- <h4>Get the Google Play services SDK</h4>
+ <h4>1. Get the Google Play services SDK</h4>
<p>The Google+ Android APIs are part of the Google Play services platform.</p>
- <p><a href="{@docRoot}google/play-services/download.html">Download and configure</a>
- the SDK to begin integrating Google+ into your app.
+ <p>To get started, <a href="{@docRoot}google/play-services/download.html">download and configure</a>
+ the Google Play services SDK from the SDK Manager.
</p>
- <h4>Run the sample</h4>
- <p>
- The Google+ sample is located in <code>&lt;android-sdk&gt;/extras/google-play-services/samples/plus</code> and shows you
+ <h4>2. Run the sample</h4>
+ <p>Once you've installed the Google Play services package, the Google+ sample is located in
+ <code>&lt;android-sdk&gt;/extras/google-play-services/samples/plus</code> and shows you
how to use the major components of the Google+ Android APIs.
</p>
- <h4>Visit the Google+ developer site</h4>
- <p>For instructions on how to fully integrate Google+ into your app, with code snippets, visit the
- <a href="https://developers.google.com/+/mobile/android/">Google+ developer documentation</a> located at
- developers.google.com.
- </p>
+ <h4>3. Read the documentation</h4>
+ <p>For quick access while developing your Android apps, the
+ <a href="{@docRoot}google/play-services/reference/com/google/android/gms/plus/package-summary.html">Google+
+ API reference</a> is available here on developer.android.com.</p>
+ <p>Extended documentation for the Google+ Android APIs is provided with the rest of the
+ Google+ developer documents at <a class="external-link"
+ href="https://developers.google.com/+/mobile/android/">developers.google.com/+</a>.</p>
- <h4>See the reference documentation</h4>
- <p>The <a href="{@docRoot}google/play-services/reference/com/google/android/gms/plus/package-summary.html">Google+ API reference</a>
- as well as the entire <a href="{@docRoot}google/play-services/reference/packages.html">Google Play services platform reference</a>
- is provided for you on this site.
- </p>
</div>
</div> \ No newline at end of file
diff --git a/docs/html/images/google/gps-googleplus.png b/docs/html/images/google/gps-googleplus.png
new file mode 100644
index 000000000000..383445b5a301
--- /dev/null
+++ b/docs/html/images/google/gps-googleplus.png
Binary files differ
diff --git a/docs/html/images/google/gps-maps.png b/docs/html/images/google/gps-maps.png
new file mode 100644
index 000000000000..2500f144e699
--- /dev/null
+++ b/docs/html/images/google/gps-maps.png
Binary files differ
diff --git a/docs/html/sdk/images/4.0/folders.xcf b/docs/html/sdk/images/4.0/folders.xcf
deleted file mode 100644
index 66cc02caade1..000000000000
--- a/docs/html/sdk/images/4.0/folders.xcf
+++ /dev/null
Binary files differ
diff --git a/docs/html/shareables/README b/docs/html/shareables/README.txt
index 241618edb1fb..241618edb1fb 100644
--- a/docs/html/shareables/README
+++ b/docs/html/shareables/README.txt
diff --git a/docs/html/tools/sdk/images/4.0/folders.xcf b/docs/html/tools/sdk/images/4.0/folders.xcf
deleted file mode 100644
index 66cc02caade1..000000000000
--- a/docs/html/tools/sdk/images/4.0/folders.xcf
+++ /dev/null
Binary files differ
diff --git a/docs/html/images/activity_lifecycle.graffle b/docs/image_sources/activity_lifecycle.graffle
index 7475c67d70c3..7475c67d70c3 100644
--- a/docs/html/images/activity_lifecycle.graffle
+++ b/docs/image_sources/activity_lifecycle.graffle
diff --git a/docs/html/images/brand/Android_Robot_outlined.ai b/docs/image_sources/brand/Android_Robot_outlined.ai
index 9105cba7d211..9105cba7d211 100644
--- a/docs/html/images/brand/Android_Robot_outlined.ai
+++ b/docs/image_sources/brand/Android_Robot_outlined.ai
diff --git a/docs/html/images/brand/Google_Play_Store.ai b/docs/image_sources/brand/Google_Play_Store.ai
index 51f07c6687ec..51f07c6687ec 100644
--- a/docs/html/images/brand/Google_Play_Store.ai
+++ b/docs/image_sources/brand/Google_Play_Store.ai
diff --git a/docs/html/images/brand/en_app_rgb_wo.ai b/docs/image_sources/brand/en_app_rgb_wo.ai
index db273142ab1d..db273142ab1d 100644
--- a/docs/html/images/brand/en_app_rgb_wo.ai
+++ b/docs/image_sources/brand/en_app_rgb_wo.ai
diff --git a/docs/html/images/brand/en_generic_rgb_wo.ai b/docs/image_sources/brand/en_generic_rgb_wo.ai
index 57c1e4768039..57c1e4768039 100644
--- a/docs/html/images/brand/en_generic_rgb_wo.ai
+++ b/docs/image_sources/brand/en_generic_rgb_wo.ai
diff --git a/docs/html/images/fundamentals/fragments.graffle b/docs/image_sources/fundamentals/fragments.graffle
index c14282bc491d..c14282bc491d 100755
--- a/docs/html/images/fundamentals/fragments.graffle
+++ b/docs/image_sources/fundamentals/fragments.graffle
diff --git a/docs/html/images/fundamentals/restore_instance.graffle b/docs/image_sources/fundamentals/restore_instance.graffle
index 7489aebd804d..7489aebd804d 100644
--- a/docs/html/images/fundamentals/restore_instance.graffle
+++ b/docs/image_sources/fundamentals/restore_instance.graffle
diff --git a/docs/html/images/fundamentals/service_lifecycle.graffle b/docs/image_sources/fundamentals/service_lifecycle.graffle
index 73a17a25ab7d..73a17a25ab7d 100644
--- a/docs/html/images/fundamentals/service_lifecycle.graffle
+++ b/docs/image_sources/fundamentals/service_lifecycle.graffle
diff --git a/docs/html/images/providers/datamodel.graffle b/docs/image_sources/providers/datamodel.graffle
index f8d730f3c337..f8d730f3c337 100644
--- a/docs/html/images/providers/datamodel.graffle
+++ b/docs/image_sources/providers/datamodel.graffle
diff --git a/docs/html/images/resources/res-selection-flowchart.graffle b/docs/image_sources/resources/res-selection-flowchart.graffle
index 2d6473532034..2d6473532034 100644
--- a/docs/html/images/resources/res-selection-flowchart.graffle
+++ b/docs/image_sources/resources/res-selection-flowchart.graffle
diff --git a/docs/html/images/resources/resource_devices_diagram.graffle b/docs/image_sources/resources/resource_devices_diagram.graffle
index ab71dd1f0979..ab71dd1f0979 100644
--- a/docs/html/images/resources/resource_devices_diagram.graffle
+++ b/docs/image_sources/resources/resource_devices_diagram.graffle
diff --git a/docs/html/images/rs_compute.graffle b/docs/image_sources/rs_compute.graffle
index 3fa8c67a5af8..3fa8c67a5af8 100644
--- a/docs/html/images/rs_compute.graffle
+++ b/docs/image_sources/rs_compute.graffle
diff --git a/docs/html/images/rs_graphics.graffle b/docs/image_sources/rs_graphics.graffle
index 5dee4c62890b..5dee4c62890b 100644
--- a/docs/html/images/rs_graphics.graffle
+++ b/docs/image_sources/rs_graphics.graffle
diff --git a/docs/html/images/rs_overview.graffle b/docs/image_sources/rs_overview.graffle
index 5613744f0629..5613744f0629 100644
--- a/docs/html/images/rs_overview.graffle
+++ b/docs/image_sources/rs_overview.graffle
diff --git a/docs/html/images/training/basics/basic-lifecycle.graffle/QuickLook/Preview.pdf b/docs/image_sources/training/basics/basic-lifecycle.graffle/QuickLook/Preview.pdf
index aa97f220afaa..aa97f220afaa 100644
--- a/docs/html/images/training/basics/basic-lifecycle.graffle/QuickLook/Preview.pdf
+++ b/docs/image_sources/training/basics/basic-lifecycle.graffle/QuickLook/Preview.pdf
Binary files differ
diff --git a/docs/html/images/training/basics/basic-lifecycle.graffle/QuickLook/Thumbnail.tiff b/docs/image_sources/training/basics/basic-lifecycle.graffle/QuickLook/Thumbnail.tiff
index 55c1157c69d9..55c1157c69d9 100644
--- a/docs/html/images/training/basics/basic-lifecycle.graffle/QuickLook/Thumbnail.tiff
+++ b/docs/image_sources/training/basics/basic-lifecycle.graffle/QuickLook/Thumbnail.tiff
Binary files differ
diff --git a/docs/html/images/training/basics/basic-lifecycle.graffle/data.plist b/docs/image_sources/training/basics/basic-lifecycle.graffle/data.plist
index 28c03f594fe5..28c03f594fe5 100644
--- a/docs/html/images/training/basics/basic-lifecycle.graffle/data.plist
+++ b/docs/image_sources/training/basics/basic-lifecycle.graffle/data.plist
diff --git a/docs/html/images/training/basics/basic-lifecycle.graffle/image1.png b/docs/image_sources/training/basics/basic-lifecycle.graffle/image1.png
index cc606c9e1fbf..cc606c9e1fbf 100644
--- a/docs/html/images/training/basics/basic-lifecycle.graffle/image1.png
+++ b/docs/image_sources/training/basics/basic-lifecycle.graffle/image1.png
Binary files differ
diff --git a/docs/html/images/training/basic-simple-screen-mock.graffle/QuickLook/Preview.pdf b/docs/image_sources/training/basics/basic-simple-screen-mock.graffle/QuickLook/Preview.pdf
index 192bb8de237b..192bb8de237b 100644
--- a/docs/html/images/training/basic-simple-screen-mock.graffle/QuickLook/Preview.pdf
+++ b/docs/image_sources/training/basics/basic-simple-screen-mock.graffle/QuickLook/Preview.pdf
Binary files differ
diff --git a/docs/html/images/training/basic-simple-screen-mock.graffle/QuickLook/Thumbnail.tiff b/docs/image_sources/training/basics/basic-simple-screen-mock.graffle/QuickLook/Thumbnail.tiff
index 85dd23df62cb..85dd23df62cb 100644
--- a/docs/html/images/training/basic-simple-screen-mock.graffle/QuickLook/Thumbnail.tiff
+++ b/docs/image_sources/training/basics/basic-simple-screen-mock.graffle/QuickLook/Thumbnail.tiff
Binary files differ
diff --git a/docs/html/images/training/basic-simple-screen-mock.graffle/data.plist b/docs/image_sources/training/basics/basic-simple-screen-mock.graffle/data.plist
index 3c391df6ff29..3c391df6ff29 100644
--- a/docs/html/images/training/basic-simple-screen-mock.graffle/data.plist
+++ b/docs/image_sources/training/basics/basic-simple-screen-mock.graffle/data.plist
diff --git a/docs/html/images/training/basic-simple-screen-mock.graffle/image1.png b/docs/image_sources/training/basics/basic-simple-screen-mock.graffle/image1.png
index 80baf143138d..80baf143138d 100644
--- a/docs/html/images/training/basic-simple-screen-mock.graffle/image1.png
+++ b/docs/image_sources/training/basics/basic-simple-screen-mock.graffle/image1.png
Binary files differ
diff --git a/docs/html/images/training/basic-simple-screen-mock.graffle/image2.png b/docs/image_sources/training/basics/basic-simple-screen-mock.graffle/image2.png
index f478d162f06a..f478d162f06a 100644
--- a/docs/html/images/training/basic-simple-screen-mock.graffle/image2.png
+++ b/docs/image_sources/training/basics/basic-simple-screen-mock.graffle/image2.png
Binary files differ
diff --git a/docs/html/images/training/basics/fragments-screen-mock.graffle/QuickLook/Preview.pdf b/docs/image_sources/training/fragments-screen-mock.graffle/QuickLook/Preview.pdf
index 19ccd0f78b8e..19ccd0f78b8e 100644
--- a/docs/html/images/training/basics/fragments-screen-mock.graffle/QuickLook/Preview.pdf
+++ b/docs/image_sources/training/fragments-screen-mock.graffle/QuickLook/Preview.pdf
Binary files differ
diff --git a/docs/html/images/training/basics/fragments-screen-mock.graffle/QuickLook/Thumbnail.tiff b/docs/image_sources/training/fragments-screen-mock.graffle/QuickLook/Thumbnail.tiff
index 8d5c9c6c65df..8d5c9c6c65df 100644
--- a/docs/html/images/training/basics/fragments-screen-mock.graffle/QuickLook/Thumbnail.tiff
+++ b/docs/image_sources/training/fragments-screen-mock.graffle/QuickLook/Thumbnail.tiff
Binary files differ
diff --git a/docs/html/images/training/basics/fragments-screen-mock.graffle/data.plist b/docs/image_sources/training/fragments-screen-mock.graffle/data.plist
index 5602c1684641..5602c1684641 100644
--- a/docs/html/images/training/basics/fragments-screen-mock.graffle/data.plist
+++ b/docs/image_sources/training/fragments-screen-mock.graffle/data.plist
diff --git a/docs/html/images/training/basics/fragments-screen-mock.graffle/image1.png b/docs/image_sources/training/fragments-screen-mock.graffle/image1.png
index 80baf143138d..80baf143138d 100644
--- a/docs/html/images/training/basics/fragments-screen-mock.graffle/image1.png
+++ b/docs/image_sources/training/fragments-screen-mock.graffle/image1.png
Binary files differ
diff --git a/docs/html/images/training/basics/fragments-screen-mock.graffle/image2.png b/docs/image_sources/training/fragments-screen-mock.graffle/image2.png
index f478d162f06a..f478d162f06a 100644
--- a/docs/html/images/training/basics/fragments-screen-mock.graffle/image2.png
+++ b/docs/image_sources/training/fragments-screen-mock.graffle/image2.png
Binary files differ
diff --git a/docs/html/images/ui/actionbar-navigate-up.xcf b/docs/image_sources/ui/actionbar-navigate-up.xcf
index bf1849a587d4..bf1849a587d4 100644
--- a/docs/html/images/ui/actionbar-navigate-up.xcf
+++ b/docs/image_sources/ui/actionbar-navigate-up.xcf
Binary files differ
diff --git a/graphics/java/android/graphics/drawable/LayerDrawable.java b/graphics/java/android/graphics/drawable/LayerDrawable.java
index 0351b713846f..dd692c68ec7e 100644
--- a/graphics/java/android/graphics/drawable/LayerDrawable.java
+++ b/graphics/java/android/graphics/drawable/LayerDrawable.java
@@ -575,10 +575,6 @@ public class LayerDrawable extends Drawable implements Drawable.Callback {
@Override
public Drawable mutate() {
if (!mMutated && super.mutate() == this) {
- if (!mLayerState.canConstantState()) {
- throw new IllegalStateException("One or more children of this LayerDrawable does " +
- "not have constant state; this drawable cannot be mutated.");
- }
mLayerState = new LayerState(mLayerState, this, null);
final ChildDrawable[] array = mLayerState.mChildren;
final int N = mLayerState.mNum;
diff --git a/packages/DefaultContainerService/src/com/android/defcontainer/DefaultContainerService.java b/packages/DefaultContainerService/src/com/android/defcontainer/DefaultContainerService.java
index cf56cba3df69..731a09cfdcb7 100644
--- a/packages/DefaultContainerService/src/com/android/defcontainer/DefaultContainerService.java
+++ b/packages/DefaultContainerService/src/com/android/defcontainer/DefaultContainerService.java
@@ -80,7 +80,7 @@ import libcore.io.StructStatFs;
*/
public class DefaultContainerService extends IntentService {
private static final String TAG = "DefContainer";
- private static final boolean localLOGV = true;
+ private static final boolean localLOGV = false;
private static final String LIB_DIR_NAME = "lib";
diff --git a/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java b/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
index 8086bbc43968..f18338a69541 100644
--- a/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
+++ b/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
@@ -455,8 +455,8 @@ public class SettingsProvider extends ContentProvider {
cache.setFullyMatchesDisk(false);
Log.d(TAG, "row count exceeds max cache entries for table " + table);
}
- Log.d(TAG, "cache for settings table '" + table + "' rows=" + rows + "; fullycached=" +
- cache.fullyMatchesDisk());
+ if (LOCAL_LOGV) Log.d(TAG, "cache for settings table '" + table
+ + "' rows=" + rows + "; fullycached=" + cache.fullyMatchesDisk());
}
} finally {
c.close();
diff --git a/packages/SystemUI/src/com/android/systemui/usb/StorageNotification.java b/packages/SystemUI/src/com/android/systemui/usb/StorageNotification.java
index 91fc67a84ac9..06696febad80 100644
--- a/packages/SystemUI/src/com/android/systemui/usb/StorageNotification.java
+++ b/packages/SystemUI/src/com/android/systemui/usb/StorageNotification.java
@@ -33,6 +33,7 @@ import android.util.Slog;
public class StorageNotification extends StorageEventListener {
private static final String TAG = "StorageNotification";
+ private static final boolean DEBUG = false;
private static final boolean POP_UMS_ACTIVITY_ON_CONNECT = true;
@@ -70,8 +71,8 @@ public class StorageNotification extends StorageEventListener {
mStorageManager = (StorageManager) context.getSystemService(Context.STORAGE_SERVICE);
final boolean connected = mStorageManager.isUsbMassStorageConnected();
- Slog.d(TAG, String.format( "Startup with UMS connection %s (media state %s)", mUmsAvailable,
- Environment.getExternalStorageState()));
+ if (DEBUG) Slog.d(TAG, String.format( "Startup with UMS connection %s (media state %s)",
+ mUmsAvailable, Environment.getExternalStorageState()));
HandlerThread thr = new HandlerThread("SystemUI StorageNotification");
thr.start();
@@ -101,7 +102,8 @@ public class StorageNotification extends StorageEventListener {
*/
String st = Environment.getExternalStorageState();
- Slog.i(TAG, String.format("UMS connection changed to %s (media state %s)", connected, st));
+ if (DEBUG) Slog.i(TAG, String.format("UMS connection changed to %s (media state %s)",
+ connected, st));
if (connected && (st.equals(
Environment.MEDIA_REMOVED) || st.equals(Environment.MEDIA_CHECKING))) {
@@ -127,7 +129,7 @@ public class StorageNotification extends StorageEventListener {
}
private void onStorageStateChangedAsync(String path, String oldState, String newState) {
- Slog.i(TAG, String.format(
+ if (DEBUG) Slog.i(TAG, String.format(
"Media {%s} state changed from {%s} -> {%s}", path, oldState, newState));
if (newState.equals(Environment.MEDIA_SHARED)) {
/*
diff --git a/policy/src/com/android/internal/policy/impl/keyguard/FaceUnlock.java b/policy/src/com/android/internal/policy/impl/keyguard/FaceUnlock.java
index 259f1e4f6f45..830471aba655 100644
--- a/policy/src/com/android/internal/policy/impl/keyguard/FaceUnlock.java
+++ b/policy/src/com/android/internal/policy/impl/keyguard/FaceUnlock.java
@@ -31,6 +31,7 @@ import android.os.Looper;
import android.os.Message;
import android.os.PowerManager;
import android.os.RemoteException;
+import android.os.UserHandle;
import android.util.Log;
import android.view.View;
@@ -214,7 +215,7 @@ public class FaceUnlock implements BiometricSensorUnlock, Handler.Callback {
handleServiceDisconnected();
break;
case MSG_UNLOCK:
- handleUnlock();
+ handleUnlock(msg.arg1);
break;
case MSG_CANCEL:
handleCancel();
@@ -297,11 +298,18 @@ public class FaceUnlock implements BiometricSensorUnlock, Handler.Callback {
/**
* Stops the Face Unlock service and tells the device to grant access to the user.
*/
- void handleUnlock() {
+ void handleUnlock(int authenticatedUserId) {
if (DEBUG) Log.d(TAG, "handleUnlock()");
stop();
- mKeyguardScreenCallback.reportSuccessfulUnlockAttempt();
- mKeyguardScreenCallback.dismiss(true);
+ int currentUserId = mLockPatternUtils.getCurrentUser();
+ if (authenticatedUserId == currentUserId) {
+ if (DEBUG) Log.d(TAG, "Unlocking for user " + authenticatedUserId);
+ mKeyguardScreenCallback.reportSuccessfulUnlockAttempt();
+ mKeyguardScreenCallback.dismiss(true);
+ } else {
+ Log.d(TAG, "Ignoring unlock for authenticated user (" + authenticatedUserId +
+ ") because the current user is " + currentUserId);
+ }
}
/**
@@ -420,7 +428,8 @@ public class FaceUnlock implements BiometricSensorUnlock, Handler.Callback {
*/
public void unlock() {
if (DEBUG) Log.d(TAG, "unlock()");
- mHandler.sendEmptyMessage(MSG_UNLOCK);
+ Message message = mHandler.obtainMessage(MSG_UNLOCK, UserHandle.getCallingUserId(), -1);
+ mHandler.sendMessage(message);
}
/**
diff --git a/policy/src/com/android/internal/policy/impl/keyguard/KeyguardCircleFramedDrawable.java b/policy/src/com/android/internal/policy/impl/keyguard/KeyguardCircleFramedDrawable.java
index 29124c41681b..79b66f4818bb 100644
--- a/policy/src/com/android/internal/policy/impl/keyguard/KeyguardCircleFramedDrawable.java
+++ b/policy/src/com/android/internal/policy/impl/keyguard/KeyguardCircleFramedDrawable.java
@@ -134,7 +134,6 @@ class KeyguardCircleFramedDrawable extends Drawable {
}
public void setScale(float scale) {
- Log.i("KFD", "scale: " + scale);
mScale = scale;
}
diff --git a/policy/src/com/android/internal/policy/impl/keyguard/KeyguardTransportControlView.java b/policy/src/com/android/internal/policy/impl/keyguard/KeyguardTransportControlView.java
index d2846026324a..ffa88d554b62 100644
--- a/policy/src/com/android/internal/policy/impl/keyguard/KeyguardTransportControlView.java
+++ b/policy/src/com/android/internal/policy/impl/keyguard/KeyguardTransportControlView.java
@@ -189,7 +189,7 @@ public class KeyguardTransportControlView extends FrameLayout implements OnClick
public KeyguardTransportControlView(Context context, AttributeSet attrs) {
super(context, attrs);
- Log.v(TAG, "Create TCV " + this);
+ if (DEBUG) Log.v(TAG, "Create TCV " + this);
mAudioManager = new AudioManager(mContext);
mCurrentPlayState = RemoteControlClient.PLAYSTATE_NONE; // until we get a callback
mIRCD = new IRemoteControlDisplayWeak(mHandler);
diff --git a/services/java/com/android/server/AppWidgetService.java b/services/java/com/android/server/AppWidgetService.java
index 9590712a7d38..b94183cd40d9 100644
--- a/services/java/com/android/server/AppWidgetService.java
+++ b/services/java/com/android/server/AppWidgetService.java
@@ -281,8 +281,9 @@ class AppWidgetService extends IAppWidgetService.Stub
}
@Override
- public List<AppWidgetProviderInfo> getInstalledProviders() throws RemoteException {
- return getImplForUser(getCallingOrCurrentUserId()).getInstalledProviders();
+ public List<AppWidgetProviderInfo> getInstalledProviders(int categoryFilter)
+ throws RemoteException {
+ return getImplForUser(getCallingOrCurrentUserId()).getInstalledProviders(categoryFilter);
}
@Override
diff --git a/services/java/com/android/server/AppWidgetServiceImpl.java b/services/java/com/android/server/AppWidgetServiceImpl.java
index bba5192d9440..854185d187b0 100644
--- a/services/java/com/android/server/AppWidgetServiceImpl.java
+++ b/services/java/com/android/server/AppWidgetServiceImpl.java
@@ -859,11 +859,7 @@ class AppWidgetServiceImpl {
}
}
- public List<AppWidgetProviderInfo> getInstalledProviders() {
- return getInstalledProviders(AppWidgetProviderInfo.WIDGET_CATEGORY_HOME_SCREEN);
- }
-
- private List<AppWidgetProviderInfo> getInstalledProviders(int categoryFilter) {
+ public List<AppWidgetProviderInfo> getInstalledProviders(int categoryFilter) {
synchronized (mAppWidgetIds) {
ensureStateLoadedLocked();
final int N = mInstalledProviders.size();
diff --git a/services/java/com/android/server/BluetoothManagerService.java b/services/java/com/android/server/BluetoothManagerService.java
index 69ccbc7ffd6c..ea9187568c6e 100755
--- a/services/java/com/android/server/BluetoothManagerService.java
+++ b/services/java/com/android/server/BluetoothManagerService.java
@@ -775,8 +775,18 @@ class BluetoothManagerService extends IBluetoothManager.Stub {
// Send BT state broadcast to update
// the BT icon correctly
- bluetoothStateChangeHandler(BluetoothAdapter.STATE_ON,
- BluetoothAdapter.STATE_TURNING_OFF);
+ if ((mState == BluetoothAdapter.STATE_TURNING_ON) ||
+ (mState == BluetoothAdapter.STATE_ON)) {
+ bluetoothStateChangeHandler(BluetoothAdapter.STATE_ON,
+ BluetoothAdapter.STATE_TURNING_OFF);
+ mState = BluetoothAdapter.STATE_TURNING_OFF;
+ }
+ if (mState == BluetoothAdapter.STATE_TURNING_OFF) {
+ bluetoothStateChangeHandler(BluetoothAdapter.STATE_TURNING_OFF,
+ BluetoothAdapter.STATE_OFF);
+ }
+
+ mHandler.removeMessages(MESSAGE_BLUETOOTH_STATE_CHANGE);
mState = BluetoothAdapter.STATE_OFF;
}
break;
@@ -820,20 +830,33 @@ class BluetoothManagerService extends IBluetoothManager.Stub {
}
}
}
- mHandler.removeMessages(MESSAGE_BLUETOOTH_STATE_CHANGE);
+
+ if (mState == BluetoothAdapter.STATE_TURNING_OFF) {
+ // MESSAGE_USER_SWITCHED happened right after MESSAGE_ENABLE
+ bluetoothStateChangeHandler(mState, BluetoothAdapter.STATE_OFF);
+ mState = BluetoothAdapter.STATE_OFF;
+ }
+ if (mState == BluetoothAdapter.STATE_OFF) {
+ bluetoothStateChangeHandler(mState, BluetoothAdapter.STATE_TURNING_ON);
+ mState = BluetoothAdapter.STATE_TURNING_ON;
+ }
waitForOnOff(true, false);
- bluetoothStateChangeHandler(mState, BluetoothAdapter.STATE_ON);
+ if (mState == BluetoothAdapter.STATE_TURNING_ON) {
+ bluetoothStateChangeHandler(mState, BluetoothAdapter.STATE_ON);
+ }
// disable
handleDisable(false);
+ // Pbap service need receive STATE_TURNING_OFF intent to close
+ bluetoothStateChangeHandler(BluetoothAdapter.STATE_ON,
+ BluetoothAdapter.STATE_TURNING_OFF);
waitForOnOff(false, true);
- bluetoothStateChangeHandler(BluetoothAdapter.STATE_ON,
+ bluetoothStateChangeHandler(BluetoothAdapter.STATE_TURNING_OFF,
BluetoothAdapter.STATE_OFF);
- mState = BluetoothAdapter.STATE_OFF;
sendBluetoothServiceDownCallback();
synchronized (mConnection) {
if (mBluetooth != null) {
@@ -844,6 +867,8 @@ class BluetoothManagerService extends IBluetoothManager.Stub {
}
SystemClock.sleep(100);
+ mHandler.removeMessages(MESSAGE_BLUETOOTH_STATE_CHANGE);
+ mState = BluetoothAdapter.STATE_OFF;
// enable
handleEnable(false, mQuietEnable);
} else if (mBinding || mBluetooth != null) {
@@ -982,14 +1007,9 @@ class BluetoothManagerService extends IBluetoothManager.Stub {
sendBluetoothStateCallback(isUp);
//If Bluetooth is off, send service down event to proxy objects, and unbind
- if (!isUp) {
- //Only unbind with mEnable flag not set
- //For race condition: disable and enable back-to-back
- //Avoid unbind right after enable due to callback from disable
- if ((!mEnable) && (mBluetooth != null)) {
- sendBluetoothServiceDownCallback();
- unbindAndFinish();
- }
+ if (!isUp && canUnbindBluetoothService()) {
+ sendBluetoothServiceDownCallback();
+ unbindAndFinish();
}
}
@@ -1037,4 +1057,22 @@ class BluetoothManagerService extends IBluetoothManager.Stub {
Log.e(TAG,"waitForOnOff time out");
return false;
}
+
+ private boolean canUnbindBluetoothService() {
+ synchronized(mConnection) {
+ //Only unbind with mEnable flag not set
+ //For race condition: disable and enable back-to-back
+ //Avoid unbind right after enable due to callback from disable
+ //Only unbind with Bluetooth at OFF state
+ //Only unbind without any MESSAGE_BLUETOOTH_STATE_CHANGE message
+ try {
+ if (mEnable || (mBluetooth == null)) return false;
+ if (mHandler.hasMessages(MESSAGE_BLUETOOTH_STATE_CHANGE)) return false;
+ return (mBluetooth.getState() == BluetoothAdapter.STATE_OFF);
+ } catch (RemoteException e) {
+ Log.e(TAG, "getState()", e);
+ }
+ }
+ return false;
+ }
}
diff --git a/services/java/com/android/server/DevicePolicyManagerService.java b/services/java/com/android/server/DevicePolicyManagerService.java
index 5ba71a4aad12..6a62809f6fa0 100644
--- a/services/java/com/android/server/DevicePolicyManagerService.java
+++ b/services/java/com/android/server/DevicePolicyManagerService.java
@@ -146,8 +146,8 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
getSendingUserId());
if (Intent.ACTION_BOOT_COMPLETED.equals(action)
|| ACTION_EXPIRED_PASSWORD_NOTIFICATION.equals(action)) {
- Slog.v(TAG, "Sending password expiration notifications for action " + action
- + " for user " + userHandle);
+ if (DBG) Slog.v(TAG, "Sending password expiration notifications for action "
+ + action + " for user " + userHandle);
mHandler.post(new Runnable() {
public void run() {
handlePasswordExpirationNotification(getUserData(userHandle));
@@ -468,7 +468,7 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
private void handlePackagesChanged(int userHandle) {
boolean removed = false;
- Slog.d(TAG, "Handling package changes for user " + userHandle);
+ if (DBG) Slog.d(TAG, "Handling package changes for user " + userHandle);
DevicePolicyData policy = getUserData(userHandle);
IPackageManager pm = AppGlobals.getPackageManager();
for (int i = policy.mAdminList.size() - 1; i >= 0; i--) {
@@ -982,7 +982,7 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
long token = Binder.clearCallingIdentity();
try {
String value = cameraDisabled ? "1" : "0";
- Slog.v(TAG, "Change in camera state ["
+ if (DBG) Slog.v(TAG, "Change in camera state ["
+ SYSTEM_PROP_DISABLE_CAMERA + "] = " + value);
SystemProperties.set(SYSTEM_PROP_DISABLE_CAMERA, value);
} finally {
@@ -1682,10 +1682,9 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
}
int neededNumbers = getPasswordMinimumNumeric(null, userHandle);
if (numbers < neededNumbers) {
- Slog
- .w(TAG, "resetPassword: number of numerical digits " + numbers
- + " does not meet required number of numerical digits "
- + neededNumbers);
+ Slog.w(TAG, "resetPassword: number of numerical digits " + numbers
+ + " does not meet required number of numerical digits "
+ + neededNumbers);
return false;
}
int neededLowerCase = getPasswordMinimumLowerCase(null, userHandle);
diff --git a/services/java/com/android/server/MountService.java b/services/java/com/android/server/MountService.java
index ad28a3668213..2e0c977d2ec5 100644
--- a/services/java/com/android/server/MountService.java
+++ b/services/java/com/android/server/MountService.java
@@ -105,9 +105,9 @@ class MountService extends IMountService.Stub
// TODO: listen for user creation/deletion
- private static final boolean LOCAL_LOGD = true;
- private static final boolean DEBUG_UNMOUNT = true;
- private static final boolean DEBUG_EVENTS = true;
+ private static final boolean LOCAL_LOGD = false;
+ private static final boolean DEBUG_UNMOUNT = false;
+ private static final boolean DEBUG_EVENTS = false;
private static final boolean DEBUG_OBB = false;
// Disable this since it messes up long-running cryptfs operations.
diff --git a/services/java/com/android/server/SystemServer.java b/services/java/com/android/server/SystemServer.java
index 894c4d02e794..55885e6ed37f 100644
--- a/services/java/com/android/server/SystemServer.java
+++ b/services/java/com/android/server/SystemServer.java
@@ -1005,7 +1005,7 @@ class ServerThread extends Thread {
Intent intent = new Intent();
intent.setComponent(new ComponentName("com.android.systemui",
"com.android.systemui.SystemUIService"));
- Slog.d(TAG, "Starting service: " + intent);
+ //Slog.d(TAG, "Starting service: " + intent);
context.startServiceAsUser(intent, UserHandle.OWNER);
}
}
diff --git a/services/java/com/android/server/TelephonyRegistry.java b/services/java/com/android/server/TelephonyRegistry.java
index 26684de39a7f..17260d505fdb 100644
--- a/services/java/com/android/server/TelephonyRegistry.java
+++ b/services/java/com/android/server/TelephonyRegistry.java
@@ -139,7 +139,7 @@ class TelephonyRegistry extends ITelephonyRegistry.Stub {
public void handleMessage(Message msg) {
switch (msg.what) {
case MSG_USER_SWITCHED: {
- Slog.d(TAG, "MSG_USER_SWITCHED userId=" + msg.arg1);
+ if (DBG) Slog.d(TAG, "MSG_USER_SWITCHED userId=" + msg.arg1);
TelephonyRegistry.this.notifyCellLocation(mCellLocation);
break;
}
diff --git a/services/java/com/android/server/am/ActivityManagerService.java b/services/java/com/android/server/am/ActivityManagerService.java
index 82c9030a66f1..5fb2ec9066f5 100644
--- a/services/java/com/android/server/am/ActivityManagerService.java
+++ b/services/java/com/android/server/am/ActivityManagerService.java
@@ -21,7 +21,6 @@ import static android.content.pm.PackageManager.PERMISSION_GRANTED;
import com.android.internal.R;
import com.android.internal.os.BatteryStatsImpl;
import com.android.internal.os.ProcessStats;
-import com.android.internal.widget.LockPatternUtils;
import com.android.server.AttributeCache;
import com.android.server.IntentResolver;
import com.android.server.ProcessMap;
@@ -7935,7 +7934,7 @@ public final class ActivityManagerService extends ActivityManagerNative
}
}, 0, null, null,
android.Manifest.permission.INTERACT_ACROSS_USERS,
- false, false, MY_PID, Process.SYSTEM_UID, UserHandle.USER_ALL);
+ true, false, MY_PID, Process.SYSTEM_UID, UserHandle.USER_ALL);
} finally {
Binder.restoreCallingIdentity(ident);
}
@@ -14257,7 +14256,7 @@ public final class ActivityManagerService extends ActivityManagerNative
}
}, 0, null, null,
android.Manifest.permission.INTERACT_ACROSS_USERS,
- false, false, MY_PID, Process.SYSTEM_UID, UserHandle.USER_ALL);
+ true, false, MY_PID, Process.SYSTEM_UID, UserHandle.USER_ALL);
}
}
} finally {
@@ -14480,7 +14479,7 @@ public final class ActivityManagerService extends ActivityManagerNative
long ident = Binder.clearCallingIdentity();
try {
// We are going to broadcast ACTION_USER_STOPPING and then
- // once that is down send a final ACTION_SHUTDOWN and then
+ // once that is done send a final ACTION_SHUTDOWN and then
// stop the user.
final Intent stoppingIntent = new Intent(Intent.ACTION_USER_STOPPING);
stoppingIntent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY);
diff --git a/services/java/com/android/server/display/WifiDisplayController.java b/services/java/com/android/server/display/WifiDisplayController.java
index 886e0498987e..a83675eb351b 100644
--- a/services/java/com/android/server/display/WifiDisplayController.java
+++ b/services/java/com/android/server/display/WifiDisplayController.java
@@ -30,6 +30,7 @@ import android.media.AudioManager;
import android.media.RemoteDisplay;
import android.net.NetworkInfo;
import android.net.Uri;
+import android.net.wifi.WpsInfo;
import android.net.wifi.p2p.WifiP2pConfig;
import android.net.wifi.p2p.WifiP2pDevice;
import android.net.wifi.p2p.WifiP2pDeviceList;
@@ -572,6 +573,16 @@ final class WifiDisplayController implements DumpUtils.Dump {
mConnectingDevice = mDesiredDevice;
WifiP2pConfig config = new WifiP2pConfig();
+ WpsInfo wps = new WpsInfo();
+ if (mConnectingDevice.wpsPbcSupported()) {
+ wps.setup = WpsInfo.PBC;
+ } else if (mConnectingDevice.wpsDisplaySupported()) {
+ // We do keypad if peer does display
+ wps.setup = WpsInfo.KEYPAD;
+ } else {
+ wps.setup = WpsInfo.DISPLAY;
+ }
+ config.wps = wps;
config.deviceAddress = mConnectingDevice.deviceAddress;
// Helps with STA & P2P concurrency
config.groupOwnerIntent = WifiP2pConfig.MIN_GROUP_OWNER_INTENT;
diff --git a/services/java/com/android/server/dreams/DreamManagerService.java b/services/java/com/android/server/dreams/DreamManagerService.java
index 1f4017614617..7e4a554d4c5d 100644
--- a/services/java/com/android/server/dreams/DreamManagerService.java
+++ b/services/java/com/android/server/dreams/DreamManagerService.java
@@ -47,7 +47,7 @@ import libcore.util.Objects;
* @hide
*/
public final class DreamManagerService extends IDreamManager.Stub {
- private static final boolean DEBUG = true;
+ private static final boolean DEBUG = false;
private static final String TAG = "DreamManagerService";
private final Object mLock = new Object();
@@ -292,7 +292,7 @@ public final class DreamManagerService extends IDreamManager.Stub {
stopDreamLocked();
- Slog.i(TAG, "Entering dreamland.");
+ if (DEBUG) Slog.i(TAG, "Entering dreamland.");
final Binder newToken = new Binder();
mCurrentDreamToken = newToken;
@@ -310,7 +310,7 @@ public final class DreamManagerService extends IDreamManager.Stub {
private void stopDreamLocked() {
if (mCurrentDreamToken != null) {
- Slog.i(TAG, "Leaving dreamland.");
+ if (DEBUG) Slog.i(TAG, "Leaving dreamland.");
cleanupDreamLocked();
diff --git a/services/java/com/android/server/pm/PackageManagerService.java b/services/java/com/android/server/pm/PackageManagerService.java
index 83672c540c2d..78d256565f1a 100644
--- a/services/java/com/android/server/pm/PackageManagerService.java
+++ b/services/java/com/android/server/pm/PackageManagerService.java
@@ -4113,7 +4113,7 @@ public class PackageManagerService extends IPackageManager.Stub {
}
}
- Slog.i(TAG, "Linking native library dir for " + path);
+ if (DEBUG_INSTALL) Slog.i(TAG, "Linking native library dir for " + path);
final int[] userIds = sUserManager.getUserIds();
synchronized (mInstallLock) {
for (int userId : userIds) {
@@ -6301,20 +6301,21 @@ public class PackageManagerService extends IPackageManager.Stub {
final File packageFile;
if (encryptionParams != null || !"file".equals(mPackageURI.getScheme())) {
- ParcelFileDescriptor out = null;
-
mTempPackage = createTempPackageFile(mDrmAppPrivateInstallDir);
if (mTempPackage != null) {
+ ParcelFileDescriptor out;
try {
out = ParcelFileDescriptor.open(mTempPackage,
ParcelFileDescriptor.MODE_READ_WRITE);
} catch (FileNotFoundException e) {
+ out = null;
Slog.e(TAG, "Failed to create temporary file for : " + mPackageURI);
}
// Make a temporary file for decryption.
ret = mContainerService
.copyResource(mPackageURI, encryptionParams, out);
+ IoUtils.closeQuietly(out);
packageFile = mTempPackage;
@@ -9079,10 +9080,8 @@ public class PackageManagerService extends IPackageManager.Stub {
if (removed.size() > 0) {
for (int j=0; j<removed.size(); j++) {
PreferredActivity pa = removed.get(i);
- RuntimeException here = new RuntimeException("here");
- here.fillInStackTrace();
Slog.w(TAG, "Removing dangling preferred activity: "
- + pa.mPref.mComponent, here);
+ + pa.mPref.mComponent);
pir.removeFilter(pa);
}
mSettings.writePackageRestrictionsLPr(