Merge change 3284
* changes:
rename string_array.h to StringArray.h and move the implementation from the header file to a new cpp file.
diff --git a/api/current.xml b/api/current.xml
index 7731378..402c43d 100644
--- a/api/current.xml
+++ b/api/current.xml
@@ -111732,6 +111732,17 @@
visibility="public"
>
</field>
+<field name="SHOW_WEB_SUGGESTIONS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value=""show_web_suggestions""
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
<field name="SOUND_EFFECTS_ENABLED"
type="java.lang.String"
transient="false"
diff --git a/core/java/android/app/ApplicationThreadNative.java b/core/java/android/app/ApplicationThreadNative.java
index e28fd0f..6750d12 100644
--- a/core/java/android/app/ApplicationThreadNative.java
+++ b/core/java/android/app/ApplicationThreadNative.java
@@ -350,6 +350,14 @@
scheduleCreateBackupAgent(appInfo, backupMode);
return true;
}
+
+ case SCHEDULE_DESTROY_BACKUP_AGENT_TRANSACTION:
+ {
+ data.enforceInterface(IApplicationThread.descriptor);
+ ApplicationInfo appInfo = ApplicationInfo.CREATOR.createFromParcel(data);
+ scheduleDestroyBackupAgent(appInfo);
+ return true;
+ }
}
return super.onTransact(code, data, reply, flags);
diff --git a/core/java/android/content/res/CompatibilityInfo.java b/core/java/android/content/res/CompatibilityInfo.java
index 8a6a6f0..19379fb 100644
--- a/core/java/android/content/res/CompatibilityInfo.java
+++ b/core/java/android/content/res/CompatibilityInfo.java
@@ -62,7 +62,9 @@
public final boolean mScalingRequired;
public CompatibilityInfo(ApplicationInfo appInfo) {
- mExpandable = appInfo.expandable;
+ // A temp workaround to fix rotation issue.
+ // mExpandable = appInfo.expandable;
+ mExpandable = true;
float packageDensityScale = -1.0f;
if (appInfo.supportsDensities != null) {
int minDiff = Integer.MAX_VALUE;
diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java
index 68e4329..a632bf0 100644
--- a/core/java/android/provider/Settings.java
+++ b/core/java/android/provider/Settings.java
@@ -1292,6 +1292,14 @@
* boolean (1 or 0).
*/
public static final String HAPTIC_FEEDBACK_ENABLED = "haptic_feedback_enabled";
+
+ /**
+ * Whether live web suggestions while the user types into search dialogs are
+ * enabled. Browsers and other search UIs should respect this, as it allows
+ * a user to avoid sending partial queries to a search engine, if it poses
+ * any privacy concern. The value is boolean (1 or 0).
+ */
+ public static final String SHOW_WEB_SUGGESTIONS = "show_web_suggestions";
// Settings moved to Settings.Secure
diff --git a/libs/utils/BackupHelpers.cpp b/libs/utils/BackupHelpers.cpp
index e8e6c45..7f423a8 100644
--- a/libs/utils/BackupHelpers.cpp
+++ b/libs/utils/BackupHelpers.cpp
@@ -350,10 +350,11 @@
FileState& g = newSnapshot.editValueAt(m);
int fd = open(realFilename.string(), O_RDONLY);
- if (fd != -1) {
+ if (fd < 0) {
// We can't open the file. Don't report it as a delete either. Let the
// server keep the old version. Maybe they'll be able to deal with it
// on restore.
+ LOGP("Unable to open file %s - skipping", realFilename.string());
} else {
g.crc32 = compute_crc32(fd);
diff --git a/services/java/com/android/server/BackupManagerService.java b/services/java/com/android/server/BackupManagerService.java
index b003e76..5770a77 100644
--- a/services/java/com/android/server/BackupManagerService.java
+++ b/services/java/com/android/server/BackupManagerService.java
@@ -197,7 +197,6 @@
// WARNING: If we crash after this line, anything in mPendingBackups will
// be lost. FIX THIS.
}
- //startOneAgent();
(new PerformBackupThread(mTransportId, mBackupQueue)).run();
break;
@@ -207,45 +206,6 @@
}
}
- void startOneAgent() {
- // Loop until we find someone to start or the queue empties out.
- while (true) {
- BackupRequest request;
- synchronized (mQueueLock) {
- int queueSize = mBackupQueue.size();
- Log.d(TAG, "mBackupQueue.size=" + queueSize);
- if (queueSize == 0) {
- mBackupQueue = null;
- // if there are pending backups, start those after a short delay
- if (mPendingBackups.size() > 0) {
- mBackupHandler.sendEmptyMessageDelayed(MSG_RUN_BACKUP, COLLECTION_INTERVAL);
- }
- return;
- }
- request = mBackupQueue.get(0);
- // Take it off the queue when we're done.
- }
-
- Log.d(TAG, "starting agent for " + request);
- // !!! TODO: need to handle the restore case?
- int mode = (request.fullBackup)
- ? IApplicationThread.BACKUP_MODE_FULL
- : IApplicationThread.BACKUP_MODE_INCREMENTAL;
- try {
- if (mActivityManager.bindBackupAgent(request.appInfo, mode)) {
- Log.d(TAG, "awaiting agent for " + request);
- // success
- return;
- }
- } catch (RemoteException e) {
- // can't happen; activity manager is local
- } catch (SecurityException ex) {
- // Try for the next one.
- Log.d(TAG, "error in bind", ex);
- }
- }
- }
-
void processOneBackup(BackupRequest request, IBackupAgent agent, IBackupTransport transport) {
final String packageName = request.appInfo.packageName;
Log.d(TAG, "processOneBackup doBackup() on " + packageName);
@@ -290,6 +250,7 @@
// Now propagate the newly-backed-up data to the transport
if (success) {
+ if (DEBUG) Log.v(TAG, "doBackup() success; calling transport");
backupData =
ParcelFileDescriptor.open(backupDataName, ParcelFileDescriptor.MODE_READ_ONLY);
int error = transport.performBackup(packageName, backupData);