Merge branch 'fix-267/nfc-swap' into integration

This commit is contained in:
Peter Serwylo 2015-05-21 07:52:10 +10:00
commit 3aac399456
2 changed files with 18 additions and 14 deletions

View File

@ -210,6 +210,20 @@
<data android:path="/store/search" /> <data android:path="/store/search" />
</intent-filter> </intent-filter>
<!-- Handle NFC tags detected from outside our application -->
<intent-filter>
<action android:name="android.nfc.action.NDEF_DISCOVERED" />
<category android:name="android.intent.category.DEFAULT" />
<!--
URIs that come in via NFC have scheme/host normalized to all lower case
https://developer.android.com/reference/android/nfc/NfcAdapter.html#ACTION_NDEF_DISCOVERED
-->
<data android:scheme="fdroidrepo" />
<data android:scheme="fdroidrepos" />
</intent-filter>
<!-- Repo URLs --> <!-- Repo URLs -->
<!-- <!--
@ -303,19 +317,6 @@
<meta-data <meta-data
android:name="android.support.PARENT_ACTIVITY" android:name="android.support.PARENT_ACTIVITY"
android:value=".FDroid" /> android:value=".FDroid" />
<!-- Handle NFC tags detected from outside our application -->
<intent-filter>
<action android:name="android.nfc.action.NDEF_DISCOVERED" />
<category android:name="android.intent.category.DEFAULT" />
<!--
URIs that come in via NFC have scheme/host normalized to all lower case
https://developer.android.com/reference/android/nfc/NfcAdapter.html#ACTION_NDEF_DISCOVERED
-->
<data android:scheme="fdroidrepo" />
<data android:scheme="fdroidrepos" />
</intent-filter>
<intent-filter> <intent-filter>
<action android:name="android.intent.action.VIEW" /> <action android:name="android.intent.action.VIEW" />

View File

@ -156,7 +156,10 @@ public class ConnectSwapActivity extends ActionBarActivity implements ProgressLi
RepoProvider.Helper.update(this, repo, values); RepoProvider.Helper.update(this, repo, values);
} }
if (!newRepoConfig.preventFurtherSwaps()) { // Only ask server to swap with us, if we are actually running a local repo service.
// It is possible to have a swap initiated without first starting a swap, in which
// case swapping back is pointless.
if (!newRepoConfig.preventFurtherSwaps() && FDroidApp.isLocalRepoServiceRunning()) {
askServerToSwapWithUs(); askServerToSwapWithUs();
} }