Bug 709391 - hide Sync setup task in Launcher, make syncs return immediately. a=java-only.

This commit is contained in:
Richard Newman 2011-12-21 08:44:08 -08:00
parent 2d22741616
commit 8bb119825d
2 changed files with 6 additions and 14 deletions

View File

@ -132,6 +132,8 @@ public class SyncAdapter extends AbstractThreadedSyncAdapter implements GlobalSe
public Object syncMonitor = new Object();
private SyncResult syncResult;
public boolean shouldPerformSync = false;
@Override
public void onPerformSync(final Account account,
final Bundle extras,
@ -143,6 +145,10 @@ public class SyncAdapter extends AbstractThreadedSyncAdapter implements GlobalSe
Log.i(LOG_TAG, "Got onPerformSync. Extras bundle is " + extras);
Log.d(LOG_TAG, "Extras clusterURL: " + extras.getString("clusterURL"));
Log.i(LOG_TAG, "Account name: " + account.name);
if (!shouldPerformSync) {
Log.i(LOG_TAG, "Not performing sync.");
return;
}
Log.i(LOG_TAG, "XXX CLEARING AUTH TOKEN XXX");
invalidateAuthToken(account);

View File

@ -1,17 +1,3 @@
<activity
android:icon="@drawable/sync_ic_launcher"
android:label="@string/sync_app_name"
android:launchMode="singleTask"
android:name="org.mozilla.gecko.sync.setup.activities.SetupSyncActivity" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<category android:name="android.intent.category.DEFAULT" />
<data android:scheme="sync" android:host="org.mozilla.android" android:path="/setup"/>
</intent-filter>
</activity>
<activity
android:clearTaskOnLaunch="true"
android:launchMode="singleTask"