Bug 957872 - Remove SyncAdapters for all but the main Fennec ContentProvider. r=nalexander

--HG--
rename : mobile/android/base/resources/xml/fxaccount_bookmarks_syncadapter.xml => mobile/android/base/resources/xml/fxaccount_syncadapter.xml
This commit is contained in:
Nick Alexander 2014-01-15 10:18:18 -08:00
parent d8e1e333cb
commit 2527cd875e
15 changed files with 14 additions and 117 deletions

View File

@ -236,7 +236,7 @@
</activity>
#include ../services/manifests/AnnouncementsAndroidManifest_activities.xml.in
#include ../services/manifests/FxAccountAndroidManifest_services.xml.in
#include ../services/manifests/FxAccountAndroidManifest_activities.xml.in
#include ../services/manifests/SyncAndroidManifest_activities.xml.in
#include ../services/manifests/HealthReportAndroidManifest_activities.xml.in
@ -315,6 +315,7 @@
#include ../services/manifests/AnnouncementsAndroidManifest_services.xml.in
#include ../services/manifests/FxAccountAndroidManifest_services.xml.in
#include ../services/manifests/HealthReportAndroidManifest_services.xml.in
#include ../services/manifests/SyncAndroidManifest_services.xml.in

View File

@ -544,13 +544,9 @@ sync_java_files = [
'fxa/authenticator/FxAccountAuthenticator.java',
'fxa/authenticator/FxAccountAuthenticatorService.java',
'fxa/sync/FxAccount.java',
'fxa/sync/FxAccountBookmarksSyncService.java',
'fxa/sync/FxAccountGlobalSession.java',
'fxa/sync/FxAccountHistorySyncService.java',
'fxa/sync/FxAccountPasswordsSyncService.java',
'fxa/sync/FxAccountSyncAdapter.java',
'fxa/sync/FxAccountSyncService.java',
'fxa/sync/FxAccountTabsSyncService.java',
'sync/AlreadySyncingException.java',
'sync/BadRequiredFieldJSONException.java',
'sync/CollectionKeys.java',

View File

@ -43,9 +43,6 @@ public class FxAccountAuthenticator extends AbstractAccountAuthenticator {
protected static void enableSyncing(Context context, Account account) {
for (String authority : new String[] {
AppConstants.ANDROID_PACKAGE_NAME + ".db.browser",
AppConstants.ANDROID_PACKAGE_NAME + ".db.formhistory",
AppConstants.ANDROID_PACKAGE_NAME + ".db.tabs",
AppConstants.ANDROID_PACKAGE_NAME + ".db.passwords",
}) {
ContentResolver.setSyncAutomatically(account, authority, true);
ContentResolver.setIsSyncable(account, authority, 1);

View File

@ -1,9 +0,0 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
package org.mozilla.gecko.fxa.sync;
public class FxAccountBookmarksSyncService extends FxAccountSyncService {
}

View File

@ -1,9 +0,0 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
package org.mozilla.gecko.fxa.sync;
public class FxAccountHistorySyncService extends FxAccountSyncService {
}

View File

@ -1,9 +0,0 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
package org.mozilla.gecko.fxa.sync;
public class FxAccountPasswordsSyncService extends FxAccountHistorySyncService {
}

View File

@ -8,7 +8,7 @@ import android.app.Service;
import android.content.Intent;
import android.os.IBinder;
public abstract class FxAccountSyncService extends Service {
public class FxAccountSyncService extends Service {
private static final Object syncAdapterLock = new Object();
private static FxAccountSyncAdapter syncAdapter = null;

View File

@ -1,9 +0,0 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
package org.mozilla.gecko.fxa.sync;
public class FxAccountTabsSyncService extends FxAccountSyncService {
}

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<resources xmlns:android="http://schemas.android.com/apk/res/android">
<style name="FxAccountTheme" parent="@style/Gecko" />
</resources>

View File

@ -1,12 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<sync-adapter xmlns:android="http://schemas.android.com/apk/res/android"
android:accountType="@string/moz_android_shared_fxaccount_type"
android:contentAuthority="@string/content_authority_db_formhistory"
android:isAlwaysSyncable="true"
android:supportsUploading="true"
android:userVisible="true"
/>

View File

@ -1,12 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<sync-adapter xmlns:android="http://schemas.android.com/apk/res/android"
android:accountType="@string/moz_android_shared_fxaccount_type"
android:contentAuthority="@string/content_authority_db_passwords"
android:isAlwaysSyncable="true"
android:supportsUploading="true"
android:userVisible="true"
/>

View File

@ -1,12 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<sync-adapter xmlns:android="http://schemas.android.com/apk/res/android"
android:accountType="@string/moz_android_shared_fxaccount_type"
android:contentAuthority="@string/content_authority_db_tabs"
android:isAlwaysSyncable="true"
android:supportsUploading="true"
android:userVisible="true"
/>

View File

@ -67,7 +67,7 @@ public class UpgradeReceiver extends BroadcastReceiver {
final String product = GlobalConstants.BROWSER_INTENT_PACKAGE;
final String username = params.username;
final String serverURL = params.serverURL;
final String profile = Constants.DEFAULT_PROFILE;
final String profile = "default";
try {
ConfigurationMigrator.ensurePrefsAreVersion(SyncConfiguration.CURRENT_PREFS_VERSION, context, accountManager, account,
product, username, serverURL, profile);

View File

@ -11,45 +11,12 @@
</service>
<service
android:exported="false"
android:name="org.mozilla.gecko.fxa.sync.FxAccountBookmarksSyncService" >
android:name="org.mozilla.gecko.fxa.sync.FxAccountSyncService" >
<intent-filter >
<action android:name="android.content.SyncAdapter" />
</intent-filter>
<meta-data
android:name="android.content.SyncAdapter"
android:resource="@xml/fxaccount_bookmarks_syncadapter" />
</service>
<service
android:exported="false"
android:name="org.mozilla.gecko.fxa.sync.FxAccountHistorySyncService" >
<intent-filter >
<action android:name="android.content.SyncAdapter" />
</intent-filter>
<meta-data
android:name="android.content.SyncAdapter"
android:resource="@xml/fxaccount_history_syncadapter" />
</service>
<service
android:exported="false"
android:name="org.mozilla.gecko.fxa.sync.FxAccountPasswordsSyncService" >
<intent-filter >
<action android:name="android.content.SyncAdapter" />
</intent-filter>
<meta-data
android:name="android.content.SyncAdapter"
android:resource="@xml/fxaccount_passwords_syncadapter" />
</service>
<service
android:exported="false"
android:name="org.mozilla.gecko.fxa.sync.FxAccountTabsSyncService" >
<intent-filter >
<action android:name="android.content.SyncAdapter" />
</intent-filter>
<meta-data
android:name="android.content.SyncAdapter"
android:resource="@xml/fxaccount_tabs_syncadapter" />
android:resource="@xml/fxaccount_syncadapter" />
</service>