version 1.8.8 removed old API keys

This commit is contained in:
nuclearfog 2021-01-13 22:23:12 +01:00
parent 9aed5a46b1
commit 7190554af6
No known key found for this signature in database
GPG Key ID: D5490E4A81F97B14
6 changed files with 18 additions and 31 deletions

View File

@ -2,15 +2,15 @@ apply plugin: 'com.android.application'
apply plugin: 'io.michaelrocks.paranoid'
android {
buildToolsVersion '30.0.2'
buildToolsVersion '30.0.3'
compileSdkVersion 30
defaultConfig {
applicationId 'org.nuclearfog.twidda'
minSdkVersion 16
targetSdkVersion 30
versionCode 31
versionName '1.8.7'
versionCode 32
versionName '1.8.8'
// limiting language support for smaller APK size
resConfigs 'en', 'de-rDE'
vectorDrawables.useSupportLibrary true

View File

@ -399,7 +399,7 @@ public class TweetActivity extends AppCompatActivity implements OnClickListener,
* @param tag link string
*/
@Override
public void onLinkClick(String tag) {
public void onLinkClick(final String tag) {
String shortLink = tag;
int cut = shortLink.indexOf('?');
if (cut > 0) {
@ -415,8 +415,8 @@ public class TweetActivity extends AppCompatActivity implements OnClickListener,
startActivity(intent);
} else {
// open link in a browser
Uri link = Uri.parse(tag);
Intent intent = new Intent(Intent.ACTION_VIEW, link);
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setData(Uri.parse(tag));
try {
startActivity(intent);
} catch (ActivityNotFoundException err) {

View File

@ -406,7 +406,7 @@ public class UserProfile extends AppCompatActivity implements OnClickListener, O
@Override
public void onLinkClick(String tag) {
public void onLinkClick(final String tag) {
String shortLink;
// remove query from link if exists
int cut = tag.indexOf('?');
@ -423,11 +423,10 @@ public class UserProfile extends AppCompatActivity implements OnClickListener, O
intent.putExtra(KEY_TWEET_ID, id);
intent.putExtra(KEY_TWEET_NAME, name);
startActivity(intent);
}
} else {
// open link in browser
else {
Uri link = Uri.parse(tag);
Intent intent = new Intent(Intent.ACTION_VIEW, link);
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setData(Uri.parse(tag));
try {
startActivity(intent);
} catch (ActivityNotFoundException err) {

View File

@ -1,14 +0,0 @@
package org.nuclearfog.twidda.backend.engine;
import io.michaelrocks.paranoid.Obfuscate;
@Obfuscate
public class Constants {
/**
* add your keys here
*/
public static final String TWITTER_CONSUMER_KEY = "";
public static final String TWITTER_CONSUMER_SECRET = "";
}

View File

@ -30,6 +30,7 @@ import java.net.URL;
import java.util.LinkedList;
import java.util.List;
import io.michaelrocks.paranoid.Obfuscate;
import twitter4j.DirectMessage;
import twitter4j.GeoLocation;
import twitter4j.IDs;
@ -51,6 +52,7 @@ import twitter4j.conf.ConfigurationBuilder;
/**
* Backend for twitter API.
*/
@Obfuscate
public class TwitterEngine {
private GlobalSettings settings;
@ -77,8 +79,8 @@ public class TwitterEngine {
builder.setOAuthConsumerKey(settings.getConsumerKey());
builder.setOAuthConsumerSecret(settings.getConsumerSecret());
} else {
builder.setOAuthConsumerKey(Constants.TWITTER_CONSUMER_KEY);
builder.setOAuthConsumerSecret(Constants.TWITTER_CONSUMER_SECRET);
builder.setOAuthConsumerKey("");
builder.setOAuthConsumerSecret("");
}
// Twitter4J has its own proxy settings
if (settings.isProxyEnabled()) {

View File

@ -97,7 +97,7 @@ public class MessageFragment extends ListFragment implements OnItemSelected, OnD
@Override
public void onLinkClick(String tag) {
public void onLinkClick(final String tag) {
String shortLink = tag;
int cut = shortLink.indexOf('?');
if (cut > 0) {
@ -111,8 +111,8 @@ public class MessageFragment extends ListFragment implements OnItemSelected, OnD
intent.putExtra(KEY_TWEET_NAME, name);
startActivity(intent);
} else {
Uri link = Uri.parse(tag);
Intent intent = new Intent(Intent.ACTION_VIEW, link);
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setData(Uri.parse(tag));
try {
startActivity(intent);
} catch (ActivityNotFoundException err) {