Merge change Ifb2ab8f8 into eclair
* changes:
Reverting the background colors back to cupcake's values.
diff --git a/api/current.xml b/api/current.xml
index 53ca959..201e20a 100644
--- a/api/current.xml
+++ b/api/current.xml
@@ -155345,6 +155345,21 @@
<parameter name="startDelay" type="int">
</parameter>
</method>
+<method name="awakenScrollBars"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="protected"
+>
+<parameter name="startDelay" type="int">
+</parameter>
+<parameter name="invalidate" type="boolean">
+</parameter>
+</method>
<method name="bringToFront"
return="void"
abstract="false"
@@ -171985,6 +172000,48 @@
</parameter>
</method>
</interface>
+<class name="GeolocationPermissions"
+ extends="java.lang.Object"
+ abstract="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="GeolocationPermissions"
+ type="android.webkit.GeolocationPermissions"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+</class>
+<interface name="GeolocationPermissions.Callback"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<method name="invoke"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="origin" type="java.lang.String">
+</parameter>
+<parameter name="allow" type="boolean">
+</parameter>
+<parameter name="remember" type="boolean">
+</parameter>
+</method>
+</interface>
<class name="HttpAuthHandler"
extends="android.os.Handler"
abstract="false"
@@ -173086,6 +173143,32 @@
<parameter name="quotaUpdater" type="android.webkit.WebStorage.QuotaUpdater">
</parameter>
</method>
+<method name="onGeolocationPermissionsHidePrompt"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="onGeolocationPermissionsShowPrompt"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="origin" type="java.lang.String">
+</parameter>
+<parameter name="callback" type="android.webkit.GeolocationPermissions.Callback">
+</parameter>
+</method>
<method name="onJsAlert"
return="boolean"
abstract="false"
@@ -173924,6 +174007,32 @@
<parameter name="font" type="java.lang.String">
</parameter>
</method>
+<method name="setGeolocationDatabasePath"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="databasePath" type="java.lang.String">
+</parameter>
+</method>
+<method name="setGeolocationEnabled"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="true"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="flag" type="boolean">
+</parameter>
+</method>
<method name="setJavaScriptCanOpenWindowsAutomatically"
return="void"
abstract="false"
diff --git a/core/java/android/accounts/AccountManagerService.java b/core/java/android/accounts/AccountManagerService.java
index 3b39ae43..6dea023 100644
--- a/core/java/android/accounts/AccountManagerService.java
+++ b/core/java/android/accounts/AccountManagerService.java
@@ -73,7 +73,7 @@
public class AccountManagerService
extends IAccountManager.Stub
implements RegisteredServicesCacheListener {
- private static final String GOOGLE_ACCOUNT_TYPE = "com.google.GAIA";
+ private static final String GOOGLE_ACCOUNT_TYPE = "com.google";
private static final String NO_BROADCAST_FLAG = "nobroadcast";
@@ -81,7 +81,7 @@
private static final int TIMEOUT_DELAY_MS = 1000 * 60;
private static final String DATABASE_NAME = "accounts.db";
- private static final int DATABASE_VERSION = 3;
+ private static final int DATABASE_VERSION = 4;
private final Context mContext;
@@ -852,7 +852,7 @@
try {
new Session(response, accountType, expectActivityLaunch) {
public void run() throws RemoteException {
- mAuthenticator.addAccount(this, mAccountType, authTokenType, requiredFeatures,
+ mAuthenticator.addAccount(this, mAccountType, authTokenType, requiredFeatures,
options);
}
@@ -1287,7 +1287,7 @@
MessageHandler(Looper looper) {
super(looper);
}
-
+
public void handleMessage(Message msg) {
if (mBindHelper.handleMessage(msg)) {
return;
@@ -1379,6 +1379,12 @@
createAccountsDeletionTrigger(db);
oldVersion++;
}
+
+ if (oldVersion == 3) {
+ db.execSQL("UPDATE " + TABLE_ACCOUNTS + " SET " + ACCOUNTS_TYPE +
+ " = 'com.google' WHERE " + ACCOUNTS_TYPE + " == 'com.google.GAIA'");
+ oldVersion++;
+ }
}
@Override
@@ -1417,7 +1423,7 @@
filter.addAction(Intent.ACTION_DEVICE_STORAGE_OK);
context.registerReceiver(this, filter);
}
-
+
/**
* Compare the IMSI to the one stored in the login service's
* database. If they differ, erase all passwords and
diff --git a/core/java/android/content/AbstractSyncableContentProvider.java b/core/java/android/content/AbstractSyncableContentProvider.java
index 808f30c..fc3acc5 100644
--- a/core/java/android/content/AbstractSyncableContentProvider.java
+++ b/core/java/android/content/AbstractSyncableContentProvider.java
@@ -170,7 +170,7 @@
// AbstractGDataSyncAdapter, which will put acore into a crash loop
ArrayList<Account> gaiaAccounts = new ArrayList<Account>();
for (Account acct: accounts) {
- if (acct.type.equals("com.google.GAIA")) {
+ if (acct.type.equals("com.google")) {
gaiaAccounts.add(acct);
}
}
diff --git a/core/java/android/content/ContentResolver.java b/core/java/android/content/ContentResolver.java
index 307899a..c9edc41 100644
--- a/core/java/android/content/ContentResolver.java
+++ b/core/java/android/content/ContentResolver.java
@@ -903,7 +903,7 @@
if (extras != null) {
String accountName = extras.getString(SYNC_EXTRAS_ACCOUNT);
if (!TextUtils.isEmpty(accountName)) {
- account = new Account(accountName, "com.google.GAIA");
+ account = new Account(accountName, "com.google");
}
extras.remove(SYNC_EXTRAS_ACCOUNT);
}
diff --git a/core/java/android/content/SyncStorageEngine.java b/core/java/android/content/SyncStorageEngine.java
index fbdd5ae..11d984d 100644
--- a/core/java/android/content/SyncStorageEngine.java
+++ b/core/java/android/content/SyncStorageEngine.java
@@ -1104,7 +1104,7 @@
String accountType = parser.getAttributeValue(
null, "type");
if (accountType == null) {
- accountType = "com.google.GAIA";
+ accountType = "com.google";
}
String authorityName = parser.getAttributeValue(
null, "authority");
@@ -1272,7 +1272,7 @@
String accountType = hasType
? c.getString(c.getColumnIndex("account_type")) : null;
if (accountType == null) {
- accountType = "com.google.GAIA";
+ accountType = "com.google";
}
String authorityName = c.getString(c.getColumnIndex("authority"));
AuthorityInfo authority = this.getOrCreateAuthorityLocked(
diff --git a/core/java/android/pim/vcard/ContactStruct.java b/core/java/android/pim/vcard/ContactStruct.java
index 915f09e..e87c796 100644
--- a/core/java/android/pim/vcard/ContactStruct.java
+++ b/core/java/android/pim/vcard/ContactStruct.java
@@ -1123,7 +1123,7 @@
}
// From GoogleSource.java in Contacts app.
- private static final String ACCOUNT_TYPE_GOOGLE = "com.google.GAIA";
+ private static final String ACCOUNT_TYPE_GOOGLE = "com.google";
private static final String GOOGLE_MY_CONTACTS_GROUP = "System Group: My Contacts";
public void pushIntoContentResolver(ContentResolver resolver) {
diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java
index ed32af2..048f857 100644
--- a/core/java/android/view/View.java
+++ b/core/java/android/view/View.java
@@ -4740,7 +4740,7 @@
*/
protected boolean awakenScrollBars() {
return mScrollCache != null &&
- awakenScrollBars(mScrollCache.scrollBarDefaultDelayBeforeFade);
+ awakenScrollBars(mScrollCache.scrollBarDefaultDelayBeforeFade, true);
}
/**
@@ -4778,6 +4778,48 @@
* @see #setVerticalScrollBarEnabled(boolean)
*/
protected boolean awakenScrollBars(int startDelay) {
+ return awakenScrollBars(startDelay, true);
+ }
+
+ /**
+ * <p>
+ * Trigger the scrollbars to draw. When invoked this method starts an
+ * animation to fade the scrollbars out after a fixed delay. If a subclass
+ * provides animated scrolling, the start delay should equal the duration of
+ * the scrolling animation.
+ * </p>
+ *
+ * <p>
+ * The animation starts only if at least one of the scrollbars is enabled,
+ * as specified by {@link #isHorizontalScrollBarEnabled()} and
+ * {@link #isVerticalScrollBarEnabled()}. When the animation is started,
+ * this method returns true, and false otherwise. If the animation is
+ * started, this method calls {@link #invalidate()} if the invalidate parameter
+ * is set to true; in that case the caller
+ * should not call {@link #invalidate()}.
+ * </p>
+ *
+ * <p>
+ * This method should be invoked everytime a subclass directly updates the
+ * scroll parameters.
+ * </p>
+ *
+ * @param startDelay the delay, in milliseconds, after which the animation
+ * should start; when the delay is 0, the animation starts
+ * immediately
+ *
+ * @param invalidate Wheter this method should call invalidate
+ *
+ * @return true if the animation is played, false otherwise
+ *
+ * @see #scrollBy(int, int)
+ * @see #scrollTo(int, int)
+ * @see #isHorizontalScrollBarEnabled()
+ * @see #isVerticalScrollBarEnabled()
+ * @see #setHorizontalScrollBarEnabled(boolean)
+ * @see #setVerticalScrollBarEnabled(boolean)
+ */
+ protected boolean awakenScrollBars(int startDelay, boolean invalidate) {
final ScrollabilityCache scrollCache = mScrollCache;
if (scrollCache == null || !scrollCache.fadeScrollBars) {
@@ -4790,8 +4832,10 @@
if (isHorizontalScrollBarEnabled() || isVerticalScrollBarEnabled()) {
- // Invalidate to show the scrollbars
- invalidate();
+ if (invalidate) {
+ // Invalidate to show the scrollbars
+ invalidate();
+ }
if (scrollCache.state == ScrollabilityCache.OFF) {
// FIXME: this is copied from WindowManagerService.
diff --git a/core/java/android/webkit/GeolocationPermissions.java b/core/java/android/webkit/GeolocationPermissions.java
index c0cac01..483e9e9 100755
--- a/core/java/android/webkit/GeolocationPermissions.java
+++ b/core/java/android/webkit/GeolocationPermissions.java
@@ -28,7 +28,6 @@
/**
* Implements the Java side of GeolocationPermissions. Simply marshalls calls
* from the UI thread to the WebKit thread.
- * @hide
*/
public final class GeolocationPermissions {
/**
@@ -72,6 +71,7 @@
/**
* Gets the singleton instance of the class.
+ * @hide
*/
public static GeolocationPermissions getInstance() {
if (sInstance == null) {
@@ -82,6 +82,7 @@
/**
* Creates the UI message handler. Must be called on the UI thread.
+ * @hide
*/
public void createUIHandler() {
if (mUIHandler == null) {
@@ -110,6 +111,7 @@
/**
* Creates the message handler. Must be called on the WebKit thread.
+ * @hide
*/
public void createHandler() {
if (mHandler == null) {
@@ -186,6 +188,7 @@
* WebCore::SecurityOrigin::toString(). As long as all 'HTML 5 modules'
* (Database, Geolocation etc) do so, it's safe to match up origins for the
* purposes of displaying UI.
+ * @hide
*/
public void getOrigins(ValueCallback<Set> callback) {
if (callback != null) {
@@ -209,6 +212,7 @@
/**
* Gets the permission state for the specified origin.
+ * @hide
*/
public void getAllowed(String origin, ValueCallback<Boolean> callback) {
if (callback == null) {
@@ -241,6 +245,7 @@
* Clears the permission state for the specified origin. This method may be
* called before the WebKit thread has intialized the message handler.
* Messages will be queued until this time.
+ * @hide
*/
public void clear(String origin) {
// Called on the UI thread.
@@ -261,6 +266,7 @@
* Allows the specified origin. This method may be called before the WebKit
* thread has intialized the message handler. Messages will be queued until
* this time.
+ * @hide
*/
public void allow(String origin) {
// Called on the UI thread.
@@ -279,6 +285,7 @@
/**
* Clears the permission state for all origins.
+ * @hide
*/
public void clearAll() {
// Called on the UI thread.
diff --git a/core/java/android/webkit/WebChromeClient.java b/core/java/android/webkit/WebChromeClient.java
index 1ae1d85..bbc567d 100644
--- a/core/java/android/webkit/WebChromeClient.java
+++ b/core/java/android/webkit/WebChromeClient.java
@@ -240,14 +240,12 @@
/**
* Instructs the client to show a prompt to ask the user to set the
* Geolocation permission state for the specified origin.
- * @hide pending API council approval.
*/
public void onGeolocationPermissionsShowPrompt(String origin,
GeolocationPermissions.Callback callback) {}
/**
* Instructs the client to hide the Geolocation permissions prompt.
- * @hide pending API council approval.
*/
public void onGeolocationPermissionsHidePrompt() {}
diff --git a/core/java/android/webkit/WebSettings.java b/core/java/android/webkit/WebSettings.java
index 0cfcb95..4fedec9 100644
--- a/core/java/android/webkit/WebSettings.java
+++ b/core/java/android/webkit/WebSettings.java
@@ -1005,7 +1005,6 @@
* @param databasePath String path to the directory where the Geolocation
* permissions database should be saved. May be the empty string but
* should never be null.
- * @hide pending api council approval
*/
public synchronized void setGeolocationDatabasePath(String databasePath) {
if (databasePath != null && !databasePath.equals(mDatabasePath)) {
@@ -1122,7 +1121,6 @@
/**
* Sets whether Geolocation is enabled.
* @param flag Whether Geolocation should be enabled.
- * @hide pending api council approval
*/
public synchronized void setGeolocationEnabled(boolean flag) {
if (mGeolocationEnabled != flag) {
diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml
index 60a2ecb1..47807c4 100644
--- a/core/res/AndroidManifest.xml
+++ b/core/res/AndroidManifest.xml
@@ -342,11 +342,8 @@
<!-- ================================== -->
<eat-comment />
- <!-- Permissions for direct access to Google accounts.
- Note that while right now this is only used for Google accounts,
- we expect in the future to have a more general account management
- facility so this is specified as a general platform permission
- group for accessing accounts. -->
+ <!-- Permissions for direct access to the accounts managed
+ by the Account Manager. -->
<permission-group android:name="android.permission-group.ACCOUNTS"
android:label="@string/permgrouplab_accounts"
android:description="@string/permgroupdesc_accounts" />
diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
index 498b5cf..9f4af83 100644
--- a/core/res/res/values/config.xml
+++ b/core/res/res/values/config.xml
@@ -146,7 +146,11 @@
<!-- Display low battery warning when battery level dips to this value -->
<integer name="config_lowBatteryWarningLevel">15</integer>
+
<!-- Close low battery warning when battery level reaches this value -->
<integer name="config_lowBatteryCloseWarningLevel">20</integer>
+ <!-- Allow the menu hard key to be disabled in LockScreen on some devices -->
+ <bool name="config_disableMenuKeyInLockScreen">false</bool>
+
</resources>
diff --git a/core/res/res/values/strings.xml b/core/res/res/values/strings.xml
index 7f97bd1..0ff537d 100644
--- a/core/res/res/values/strings.xml
+++ b/core/res/res/values/strings.xml
@@ -337,9 +337,9 @@
various network features.</string>
<!-- Title of a category of application permissions, listed so the user can choose whether they want to allow the application to do this. -->
- <string name="permgrouplab_accounts">Your Google accounts</string>
+ <string name="permgrouplab_accounts">Your accounts</string>
<!-- Description of a category of application permissions, listed so the user can choose whether they want to allow the application to do this. -->
- <string name="permgroupdesc_accounts">Access the available Google accounts.</string>
+ <string name="permgroupdesc_accounts">Access the available accounts.</string>
<!-- Title of a category of application permissions, listed so the user can choose whether they want to allow the application to do this. -->
<string name="permgrouplab_hardwareControls">Hardware controls</string>
diff --git a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/stress/MediaPlayerStressTest.java b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/stress/MediaPlayerStressTest.java
index 3667fae..90d6ffa 100644
--- a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/stress/MediaPlayerStressTest.java
+++ b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/stress/MediaPlayerStressTest.java
@@ -40,7 +40,7 @@
private static final int NUMBER_OF_RANDOM_REPOSITION_AND_PLAY = 10;
private static final int NUMBER_OF_RANDOM_REPOSITION_AND_PLAY_SHORT = 5;
- private static final int NUMBER_OF_STRESS_LOOPS = 1000;
+ private static final int NUMBER_OF_STRESS_LOOPS = 500;
private static final int PLAYBACK_END_TOLERANCE = 5000;
private static final int WAIT_UNTIL_PLAYBACK_FINISH = 515000 ;
diff --git a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/stress/MediaRecorderStressTest.java b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/stress/MediaRecorderStressTest.java
index 10796f1..b6a1bfa 100644
--- a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/stress/MediaRecorderStressTest.java
+++ b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/stress/MediaRecorderStressTest.java
@@ -49,9 +49,9 @@
private static final int NUMBER_OF_RECORDERANDPLAY_STRESS_LOOPS = 50;
private static final int NUMBER_OF_SWTICHING_LOOPS_BW_CAMERA_AND_RECORDER = 200;
private static final long WAIT_TIME_CAMERA_TEST = 3000; // 3 second
- private static final long WAIT_TIME_RECORDER_TEST = 60000; // 6 second
- private static final long WAIT_TIME_RECORD = 100000; // 10 seconds
- private static final long WAIT_TIME_PLAYBACK = 60000; // 6 second
+ private static final long WAIT_TIME_RECORDER_TEST = 6000; // 6 second
+ private static final long WAIT_TIME_RECORD = 10000; // 10 seconds
+ private static final long WAIT_TIME_PLAYBACK = 6000; // 6 second
private static final String OUTPUT_FILE = "/sdcard/temp";
private static final String OUTPUT_FILE_EXT = ".3gp";
private static final String MEDIA_STRESS_OUTPUT =
diff --git a/packages/SubscribedFeedsProvider/src/com/android/providers/subscribedfeeds/SubscribedFeedsIntentService.java b/packages/SubscribedFeedsProvider/src/com/android/providers/subscribedfeeds/SubscribedFeedsIntentService.java
index b854f86..2e910b7 100644
--- a/packages/SubscribedFeedsProvider/src/com/android/providers/subscribedfeeds/SubscribedFeedsIntentService.java
+++ b/packages/SubscribedFeedsProvider/src/com/android/providers/subscribedfeeds/SubscribedFeedsIntentService.java
@@ -111,7 +111,7 @@
+ "and " + SubscribedFeeds.Feeds.FEED + "= ?";
try {
// TODO(fredq) fix the hardcoded type
- final Account account = new Account(accountName, "com.google.GAIA");
+ final Account account = new Account(accountName, "com.google");
c = context.getContentResolver().query(SubscribedFeeds.Feeds.CONTENT_URI,
null, where, new String[]{account.name, account.type, feed}, null);
if (c.getCount() == 0) {
diff --git a/packages/SubscribedFeedsProvider/src/com/android/providers/subscribedfeeds/SubscribedFeedsProvider.java b/packages/SubscribedFeedsProvider/src/com/android/providers/subscribedfeeds/SubscribedFeedsProvider.java
index 2647752..8585082 100644
--- a/packages/SubscribedFeedsProvider/src/com/android/providers/subscribedfeeds/SubscribedFeedsProvider.java
+++ b/packages/SubscribedFeedsProvider/src/com/android/providers/subscribedfeeds/SubscribedFeedsProvider.java
@@ -127,7 +127,7 @@
protected void onAccountsChanged(Account[] accountsArray) {
super.onAccountsChanged(accountsArray);
for (Account account : accountsArray) {
- if (account.type.equals("com.google.GAIA")) {
+ if (account.type.equals("com.google")) {
ContentResolver.setSyncAutomatically(account, "subscribedfeeds", true);
}
}
diff --git a/services/java/com/android/server/BackupManagerService.java b/services/java/com/android/server/BackupManagerService.java
index d4cebef..ef0cbee 100644
--- a/services/java/com/android/server/BackupManagerService.java
+++ b/services/java/com/android/server/BackupManagerService.java
@@ -106,6 +106,7 @@
private static final int BACKUP_PACKAGE_EVENT = 2824;
private static final int BACKUP_SUCCESS_EVENT = 2825;
private static final int BACKUP_RESET_EVENT = 2826;
+ private static final int BACKUP_INITIALIZE_EVENT = 2827;
private static final int RESTORE_START_EVENT = 2830;
private static final int RESTORE_TRANSPORT_FAILURE_EVENT = 2831;
@@ -1062,7 +1063,14 @@
// If we haven't stored anything yet, we need to do an init operation.
if (status == BackupConstants.TRANSPORT_OK && mEverStoredApps.size() == 0) {
+ Log.i(TAG, "Initializing (wiping) backup transport storage");
status = mTransport.initializeDevice();
+ if (status == BackupConstants.TRANSPORT_OK) {
+ EventLog.writeEvent(BACKUP_INITIALIZE_EVENT);
+ } else {
+ EventLog.writeEvent(BACKUP_TRANSPORT_FAILURE_EVENT, "(initialize)");
+ Log.e(TAG, "Transport error in initializeDevice()");
+ }
}
// The package manager doesn't have a proper <application> etc, but since
@@ -1091,7 +1099,7 @@
int millis = (int) (SystemClock.elapsedRealtime() - startRealtime);
EventLog.writeEvent(BACKUP_SUCCESS_EVENT, mQueue.size(), millis);
} else {
- EventLog.writeEvent(BACKUP_TRANSPORT_FAILURE_EVENT, "");
+ EventLog.writeEvent(BACKUP_TRANSPORT_FAILURE_EVENT, "(finish)");
Log.e(TAG, "Transport error in finishBackup()");
}
}
@@ -1714,7 +1722,6 @@
@Override
public void run() {
- int status;
try {
for (String transportName : mQueue) {
IBackupTransport transport = getTransport(transportName);
@@ -1723,33 +1730,30 @@
continue;
}
- status = BackupConstants.TRANSPORT_OK;
- File stateDir = null;
+ Log.i(TAG, "Initializing (wiping) backup transport storage: " + transportName);
+ EventLog.writeEvent(BACKUP_START_EVENT, transport.transportDirName());
+ long startRealtime = SystemClock.elapsedRealtime();
+ int status = transport.initializeDevice();
- Log.i(TAG, "Device init on " + transport.transportDirName());
-
- stateDir = new File(mBaseStateDir, transport.transportDirName());
-
- status = transport.initializeDevice();
- if (status != BackupConstants.TRANSPORT_OK) {
- Log.e(TAG, "Error from initializeDevice: " + status);
- }
if (status == BackupConstants.TRANSPORT_OK) {
status = transport.finishBackup();
}
// Okay, the wipe really happened. Clean up our local bookkeeping.
if (status == BackupConstants.TRANSPORT_OK) {
- resetBackupState(stateDir);
+ Log.i(TAG, "Device init successful");
+ int millis = (int) (SystemClock.elapsedRealtime() - startRealtime);
+ EventLog.writeEvent(BACKUP_INITIALIZE_EVENT);
+ resetBackupState(new File(mBaseStateDir, transport.transportDirName()));
+ EventLog.writeEvent(BACKUP_SUCCESS_EVENT, 0, millis);
synchronized (mQueueLock) {
recordInitPendingLocked(false, transportName);
}
- }
-
- // If this didn't work, requeue this one and try again
- // after a suitable interval
- if (status != BackupConstants.TRANSPORT_OK) {
- Log.i(TAG, "Device init failed");
+ } else {
+ // If this didn't work, requeue this one and try again
+ // after a suitable interval
+ Log.e(TAG, "Transport error in initializeDevice()");
+ EventLog.writeEvent(BACKUP_TRANSPORT_FAILURE_EVENT, "(initialize)");
synchronized (mQueueLock) {
recordInitPendingLocked(true, transportName);
}
@@ -1759,11 +1763,7 @@
+ transportName + " resched in " + delay);
mAlarmManager.set(AlarmManager.RTC_WAKEUP,
System.currentTimeMillis() + delay, mRunInitIntent);
- } else {
- // success!
- Log.i(TAG, "Device init successful");
}
-
}
} catch (RemoteException e) {
// can't happen; the transports are local
diff --git a/test-runner/android/test/SyncBaseInstrumentation.java b/test-runner/android/test/SyncBaseInstrumentation.java
index a860bb3..e8d72d9 100644
--- a/test-runner/android/test/SyncBaseInstrumentation.java
+++ b/test-runner/android/test/SyncBaseInstrumentation.java
@@ -47,7 +47,7 @@
protected void syncProvider(Uri uri, String accountName, String authority) throws Exception {
Bundle extras = new Bundle();
extras.putBoolean(ContentResolver.SYNC_EXTRAS_MANUAL, true);
- Account account = new Account(accountName, "com.google.GAIA");
+ Account account = new Account(accountName, "com.google");
ContentResolver.requestSync(account, authority, extras);
long startTimeInMillis = SystemClock.elapsedRealtime();