From 2ebd93ab94a8e41aab5a81e47c383b5c37d69436 Mon Sep 17 00:00:00 2001 From: Boris Kraut Date: Sun, 22 Jun 2014 21:05:02 +0200 Subject: [PATCH] UberSync for Facebook: Replace sed script with patch files --- metadata/ro.weednet.contactssync.txt | 9 ++--- .../manifest-ads.patch | 25 ++++++++++++++ .../ro.weednet.contactssync/mobilecore.patch | 34 +++++++++++++++++++ 3 files changed, 61 insertions(+), 7 deletions(-) create mode 100644 metadata/ro.weednet.contactssync/manifest-ads.patch create mode 100644 metadata/ro.weednet.contactssync/mobilecore.patch diff --git a/metadata/ro.weednet.contactssync.txt b/metadata/ro.weednet.contactssync.txt index f17f0fb41a..b729aef636 100644 --- a/metadata/ro.weednet.contactssync.txt +++ b/metadata/ro.weednet.contactssync.txt @@ -46,19 +46,14 @@ Build:1.2.2,42 sed -i 's/Class\[\]/Class\\[\]/g' $$FacebookSDK$$/src/com/facebook/model/GraphObject.java Build:2.1.1,48 - disable=add removal needs testing commit=2.1.1 rm=libs/applovin*,libs/mobileCore* extlibs=android/android-support-v4.jar srclibs=FacebookSDK@sdk-version-3.0.2 + patch=manifest-ads.patch,mobilecore.patch prebuild=cp libs/android-support-v4.jar $$FacebookSDK$$/libs/ && \ sed -i 's@\(reference.1=\).*@\1$$FacebookSDK$$@' project.properties && \ - sed -i 's/Class\[\]/Class\\[\]/g' $$FacebookSDK$$/src/com/facebook/model/GraphObject.java && \ - sed -i 100,114d AndroidManifest.xml && \ - sed -i -e '/import com.ironsource.mobilcore./d' \ - -e '/MobileCore.init/d' \ - -e 237,242d \ - src/ro/weednet/contactssync/activities/Preferences.java + sed -i 's/Class\[\]/Class\\[\]/g' $$FacebookSDK$$/src/com/facebook/model/GraphObject.java Build:2.1.2,49 disable=Labelled as pre-release, so skipped diff --git a/metadata/ro.weednet.contactssync/manifest-ads.patch b/metadata/ro.weednet.contactssync/manifest-ads.patch new file mode 100644 index 0000000000..11f2368f18 --- /dev/null +++ b/metadata/ro.weednet.contactssync/manifest-ads.patch @@ -0,0 +1,25 @@ +diff --git a/AndroidManifest.xml b/AndroidManifest.xml +index 92505c1..d683c4e 100644 +--- a/AndroidManifest.xml ++++ b/AndroidManifest.xml +@@ -97,20 +97,5 @@ + android:value="@string/facebook_app_id" /> + + +- +- +- +- +- +- + + diff --git a/metadata/ro.weednet.contactssync/mobilecore.patch b/metadata/ro.weednet.contactssync/mobilecore.patch new file mode 100644 index 0000000000..b60cff9c95 --- /dev/null +++ b/metadata/ro.weednet.contactssync/mobilecore.patch @@ -0,0 +1,34 @@ +diff --git a/src/ro/weednet/contactssync/activities/Preferences.java b/src/ro/weednet/contactssync/activities/Preferences.java +index 08e9a4a..df2fe79 100644 +--- a/src/ro/weednet/contactssync/activities/Preferences.java ++++ b/src/ro/weednet/contactssync/activities/Preferences.java +@@ -26,8 +26,6 @@ import java.lang.reflect.Field; + import java.lang.reflect.Method; + import java.sql.Date; + +-import com.ironsource.mobilcore.CallbackResponse; +-import com.ironsource.mobilcore.MobileCore; + + import ro.weednet.ContactsSync; + import ro.weednet.ContactsSync.SyncType; +@@ -104,7 +102,6 @@ public class Preferences extends Activity { + ft.replace(R.id.settings, mFragment); + ft.commit(); + +- MobileCore.init(this, "3QBXU338FKE1M2ZSZEH3WRKIXJ0C5", MobileCore.LOG_TYPE.PRODUCTION, MobileCore.AD_UNITS.OFFERWALL); + } + + @Override +@@ -234,12 +231,6 @@ public class Preferences extends Activity { + if (app.getDisableAds()) { + super.onBackPressed(); + } else { +- MobileCore.showOfferWall(this, new CallbackResponse() { +- @Override +- public void onConfirmation(TYPE arg0) { +- finish(); +- } +- }); + } + } +