Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show device id in settings menu and fixed backend url for each flavour #155

Merged
merged 1 commit into from
Jul 9, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import java.net.URL

private val TAG = TrialPeriodRemoteRepo::class.java.simpleName
private const val CONTENT_TYPE_JSON = "application/json"
private val LUMEN_CREDENTIAL_URL = URL("https://auth-staging.lumenbrowser.com/get_credentials")

private val HEADERS = mapOf("x-api-key" to CliqzConfig.VPN_API_KEY)

Expand Down Expand Up @@ -56,8 +55,8 @@ class TrialPeriodRemoteRepo(private val context: Context) {
}

override fun doInBackground(vararg params: Void): ServerData {
val responseJSON =
HttpHandler.sendRequest("POST", LUMEN_CREDENTIAL_URL, CONTENT_TYPE_JSON, HEADERS, requestBody)
val responseJSON = HttpHandler.sendRequest("POST", URL(CliqzConfig.CREDENTIAL_URL),
CONTENT_TYPE_JSON, HEADERS, requestBody)
var trialDaysLeft = 0
var userName = ""
var password = ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@
*/
package com.cliqz.browser.settings;

import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.preference.Preference;
import android.provider.Settings;
import android.widget.Toast;

import com.cliqz.browser.BuildConfig;
Expand Down Expand Up @@ -63,9 +62,9 @@ private String getVersion() {
mAppVerCounter++;
return false;
} else {
final Intent intent = new Intent(Intent.ACTION_VIEW,
Uri.parse("http://i.imgur.com/4lpVkTS.gif"));
getActivity().startActivity(intent);
Toast.makeText(getActivity(),
Settings.Secure.getString(getActivity().getContentResolver(), Settings.Secure.ANDROID_ID),
Toast.LENGTH_LONG).show();
mAppVerCounter = 0;
return true;
}
Expand Down
1 change: 1 addition & 0 deletions buildSrc/src/main/java/com/cliqz/gradle/CliqzConfigTask.kt
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ class Config {
var vpnApiKey = ""
var revenuecatApiKey = ""
var sentryToken = ""
var credentialUrl = ""

@Suppress("UNCHECKED_CAST")
fun merge(other: Config, logger: Logger? = null): Config {
Expand Down