Some fixes

This commit is contained in:
mar-v-in 2015-03-20 21:50:37 +01:00
parent 1295192130
commit 6ee010fc50
6 changed files with 35 additions and 13 deletions

2
extern/UnifiedNlp vendored

@ -1 +1 @@
Subproject commit b2e10a10e47f4540fad1e609469dd5fff87002c5
Subproject commit d1baf6d63b95d1a5edb0cf348fdb1fe543c19149

View File

@ -19,7 +19,7 @@ buildscript {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.0.1'
classpath 'com.android.tools.build:gradle:1.1.0'
}
}
@ -33,8 +33,8 @@ repositories {
}
dependencies {
compile 'com.android.support:support-v4:21.0.3'
compile 'com.android.support:appcompat-v7:21.0.3'
compile 'com.android.support:support-v4:22.0.0'
compile 'com.android.support:appcompat-v7:22.0.0'
compile 'de.hdodenhof:circleimageview:1.2.1'
compile 'com.squareup.wire:wire-runtime:1.6.1'

View File

@ -22,7 +22,7 @@
<uses-sdk
android:minSdkVersion="10"
android:targetSdkVersion="21" />
android:targetSdkVersion="22" />
<permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<permission
@ -246,5 +246,13 @@
<action android:name="com.google.android.gms.icing.INDEX_SERVICE" />
</intent-filter>
</service>
<service
android:name=".analytics.service.AnalyticsService"
android:exported="true">
<intent-filter>
<action android:name="com.google.android.gms.analytics.service.START" />
</intent-filter>
</service>
</application>
</manifest>

View File

@ -186,6 +186,7 @@ public class LoginActivity extends AssistantActivity {
// TODO: Error message
Log.w(TAG, "Account NOT created!");
setResult(RESULT_CANCELED);
finish();
}
}

View File

@ -49,13 +49,13 @@ import static android.accounts.AccountManager.KEY_INTENT;
class AccountAuthenticator extends AbstractAccountAuthenticator {
private static final String TAG = "GmsAuthenticator";
private Context context;
private String accountType;
private final Context context;
private final String accountType;
public AccountAuthenticator(Context context) {
super(context);
this.context = context;
accountType = context.getString(R.string.google_account_type);
this.accountType = context.getString(R.string.google_account_type);
}
@Override
@ -136,11 +136,16 @@ class AccountAuthenticator extends AbstractAccountAuthenticator {
public Bundle hasFeatures(AccountAuthenticatorResponse response, Account account, String[] features) throws NetworkErrorException {
Log.d(TAG, "hasFeatures: " + account + ", " + Arrays.toString(features));
AccountManager accountManager = AccountManager.get(context);
List<String> services = Arrays.asList(accountManager.getUserData(account, "services").split(","));
String services = accountManager.getUserData(account, "services");
boolean res = true;
for (String feature : features) {
if (feature.startsWith("service_") && !services.contains(feature.substring(8)))
res = false;
if (services != null) {
List<String> servicesList = Arrays.asList(services.split(","));
for (String feature : features) {
if (feature.startsWith("service_") && !servicesList.contains(feature.substring(8)))
res = false;
}
} else {
res = false;
}
Bundle result = new Bundle();
result.putBoolean(KEY_BOOLEAN_RESULT, res);

View File

@ -17,6 +17,7 @@
package org.microg.gms.maps.markup;
import android.content.Context;
import android.os.Build;
import android.view.View;
import android.widget.FrameLayout;
import android.widget.LinearLayout;
@ -26,6 +27,9 @@ import com.google.android.gms.maps.model.internal.IMarkerDelegate;
import org.microg.gms.maps.GoogleMapImpl;
import org.microg.gms.maps.ResourcesContainer;
import static android.os.Build.VERSION.SDK_INT;
import static android.os.Build.VERSION_CODES.ICE_CREAM_SANDWICH_MR1;
public class InfoWindow {
private static final String TAG = InfoWindow.class.getName();
private Context context;
@ -132,7 +136,11 @@ public class InfoWindow {
public DefaultWindow(View view) {
super(context);
addView(view);
setBackground(ResourcesContainer.get().getDrawable(R.drawable.maps_default_window));
if (SDK_INT > ICE_CREAM_SANDWICH_MR1) {
setBackground(ResourcesContainer.get().getDrawable(R.drawable.maps_default_window));
} else {
setBackgroundDrawable(ResourcesContainer.get().getDrawable(R.drawable.maps_default_window));
}
}
}