Skip to content

Commit

Permalink
added data extraction rules, added comments
Browse files Browse the repository at this point in the history
  • Loading branch information
nuclearfog committed Mar 22, 2022
1 parent 4f1f133 commit 7b5d3e8
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 4 deletions.
5 changes: 4 additions & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,15 @@
<application
android:name=".CompatApplication"
android:allowBackup="false"
android:fullBackupContent="false"
android:dataExtractionRules="@xml/rules"
android:icon="@mipmap/ic_launcher"
android:roundIcon="@mipmap/ic_launcher_round"
android:requestLegacyExternalStorage="true"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme">
android:theme="@style/AppTheme"
tools:ignore="UnusedAttribute">

<activity
android:name=".activities.MainActivity"
Expand Down
10 changes: 7 additions & 3 deletions app/src/main/java/org/nuclearfog/twidda/CompatApplication.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
import java.net.ProxySelector;

/**
* custom application class
* custom application class to initialize support for old android versions and proxy settings
*
* @author nuclearfog
*/
Expand All @@ -24,12 +24,16 @@ public class CompatApplication extends Application {
@Override
public void onCreate() {
super.onCreate();
// enable support for vector drawables
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) {
AppCompatDelegate.setCompatVectorFromResourcesEnabled(true);
}
// enable TLS 1.2 support

// check and enable TLS 1.2 support
TLSSocketFactory.setSupportTLS();
// setup proxy settings

// setup global proxy
// Twitter API and picasso use their own proxy implementation
GlobalSettings settings = GlobalSettings.getInstance(this);
GlobalProxySelector proxyConnection = new GlobalProxySelector(settings);
ProxyAuthenticator proxyLogin = new ProxyAuthenticator(settings);
Expand Down
19 changes: 19 additions & 0 deletions app/src/main/res/xml/rules.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<data-extraction-rules>
<cloud-backup>
<exclude domain="root"/>
<exclude domain="file"/>
<exclude domain="database"/>
<exclude domain="sharedpref"/>
<exclude domain="external"/>
</cloud-backup>

<device-transfer>
<exclude domain="root"/>
<exclude domain="file"/>
<exclude domain="database"/>
<exclude domain="sharedpref"/>
<exclude domain="external"/>
</device-transfer>

</data-extraction-rules>

0 comments on commit 7b5d3e8

Please sign in to comment.