Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bd69c16c authored by Marvin W.'s avatar Marvin W. 🐿️
Browse files

Various fixes

Fixes #24
parent 44f4bdc6
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -33,8 +33,8 @@ repositories {
}

dependencies {
    compile 'com.android.support:support-v4:22.2.0'
    compile 'com.android.support:appcompat-v7:22.2.0'
    compile 'com.android.support:support-v4:22.2.1'
    compile 'com.android.support:appcompat-v7:22.2.1'
    compile 'de.hdodenhof:circleimageview:1.2.1'
    compile 'com.squareup.wire:wire-runtime:1.6.1'
    compile project(':play-services-api')
+1 −0
Original line number Diff line number Diff line
@@ -73,6 +73,7 @@
    <uses-permission android:name="org.microg.gms.STATUS_BROADCAST" />

    <application
        android:allowBackup="false"
        android:icon="@drawable/ic_microg_app"
        android:label="@string/gms_app_name">
        <meta-data
+3 −2
Original line number Diff line number Diff line
@@ -267,7 +267,8 @@ public class AskPermissionActivity extends AccountAuthenticatorActivity {
            }
            View view = convertView;
            if (view == null) {
                view = LayoutInflater.from(AskPermissionActivity.this).inflate(R.layout.ask_permission_list_entry, null);
                view = LayoutInflater.from(AskPermissionActivity.this)
                        .inflate(R.layout.ask_permission_list_entry, parent, false);
            }
            ((TextView) view.findViewById(android.R.id.text1)).setText(label);
            TextView textView = (TextView) view.findViewById(android.R.id.text2);
+5 −2
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@ package org.microg.gms.auth.login;

import android.accounts.Account;
import android.accounts.AccountManager;
import android.annotation.SuppressLint;
import android.annotation.TargetApi;
import android.content.Context;
import android.graphics.Color;
@@ -79,6 +80,7 @@ public class LoginActivity extends AssistantActivity {
    private AccountManager accountManager;
    private InputMethodManager inputMethodManager;

    @SuppressLint("AddJavascriptInterface")
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
@@ -141,6 +143,7 @@ public class LoginActivity extends AssistantActivity {
        return webView;
    }

    @SuppressLint("SetJavaScriptEnabled")
    private static void prepareWebViewSettings(WebSettings settings) {
        settings.setUserAgentString(settings.getUserAgentString() + MAGIC_USER_AGENT);
        settings.setJavaScriptEnabled(true);
@@ -258,8 +261,8 @@ public class LoginActivity extends AssistantActivity {
                .appendQueryParameter("source", "android")
                .appendQueryParameter("xoauth_display_name", "Android Device")
                .appendQueryParameter("lang", locale.getLanguage())
                .appendQueryParameter("cc", locale.getCountry().toLowerCase())
                .appendQueryParameter("langCountry", locale.toString().toLowerCase())
                .appendQueryParameter("cc", locale.getCountry().toLowerCase(Locale.US))
                .appendQueryParameter("langCountry", locale.toString().toLowerCase(Locale.US))
                .appendQueryParameter("hl", locale.toString().replace("_", "-"))
                .appendQueryParameter("tmpl", tmpl)
                .build().toString();
+2 −14
Original line number Diff line number Diff line
@@ -24,6 +24,7 @@ import org.microg.gms.common.Build;
import org.microg.gms.common.DeviceConfiguration;
import org.microg.gms.common.DeviceIdentifier;
import org.microg.gms.common.PhoneInfo;
import org.microg.gms.common.Utils;

import java.io.ByteArrayOutputStream;
import java.io.IOException;
@@ -64,20 +65,7 @@ public class CheckinClient {

        if (connection.getResponseCode() != 200) {
            try {
                InputStream is = new GZIPInputStream(connection.getErrorStream());
                ByteArrayOutputStream bos = new ByteArrayOutputStream();
                if (is != null) {
                    final byte[] buff = new byte[1024];
                    while (true) {
                        final int nb = is.read(buff);
                        if (nb < 0) {
                            break;
                        }
                        bos.write(buff, 0, nb);
                    }
                    is.close();
                }
                throw new IOException(bos.toString());
                throw new IOException(new String(Utils.readStreamToEnd(new GZIPInputStream(connection.getErrorStream()))));
            } catch (Exception e) {
                throw new IOException(connection.getResponseMessage(), e);
            }
Loading