diff --git a/.gitignore b/.gitignore index df0fcc88..e4a295be 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,8 @@ *.iml -gen -bin -build +gen/ +bin/ +build/ user.gradle +.gradle/ +gradlew +gradle/ diff --git a/AndroidManifest.xml b/AndroidManifest.xml index f0383019..1bfbbd82 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -1,12 +1,11 @@ - - + - - - - - + + + + + + + + + + + + + + @@ -73,9 +102,22 @@ - + + + + + + + - diff --git a/build.gradle b/build.gradle index 7a8140c1..205f0fb4 100644 --- a/build.gradle +++ b/build.gradle @@ -1,3 +1,19 @@ +/* + Copyright 2013-2015 µg Project Team + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + */ + buildscript { repositories { mavenCentral() diff --git a/local.properties b/local.properties new file mode 100644 index 00000000..9275c7f2 --- /dev/null +++ b/local.properties @@ -0,0 +1,11 @@ +## This file is automatically generated by Android Studio. +# Do not modify this file -- YOUR CHANGES WILL BE ERASED! +# +# This file should *NOT* be checked into Version Control Systems, +# as it contains information specific to your local configuration. +# +# Location of the SDK. This is only used by Gradle. +# For customization when using a Version Control System, please read the +# header note. +sdk.dir=/home/marvin/Applications/Android SDK +ndk.dir=/home/marvin/Applications/AndroidNDK \ No newline at end of file diff --git a/res/drawable-hdpi/ic_microg_app.png b/res/drawable-hdpi/ic_microg_app.png new file mode 100644 index 00000000..efa2db94 Binary files /dev/null and b/res/drawable-hdpi/ic_microg_app.png differ diff --git a/res/drawable-mdpi/ic_microg_app.png b/res/drawable-mdpi/ic_microg_app.png new file mode 100644 index 00000000..70842617 Binary files /dev/null and b/res/drawable-mdpi/ic_microg_app.png differ diff --git a/res/drawable-xhdpi/auth_gls_ic_google_minitab_selected.png b/res/drawable-xhdpi/auth_gls_ic_google_minitab_selected.png new file mode 100644 index 00000000..5f376841 Binary files /dev/null and b/res/drawable-xhdpi/auth_gls_ic_google_minitab_selected.png differ diff --git a/res/drawable-xhdpi/auth_gls_ic_google_selected.png b/res/drawable-xhdpi/auth_gls_ic_google_selected.png new file mode 100644 index 00000000..e23dc238 Binary files /dev/null and b/res/drawable-xhdpi/auth_gls_ic_google_selected.png differ diff --git a/res/drawable-xhdpi/ic_microg_app.png b/res/drawable-xhdpi/ic_microg_app.png new file mode 100644 index 00000000..059ef220 Binary files /dev/null and b/res/drawable-xhdpi/ic_microg_app.png differ diff --git a/res/drawable-xxhdpi/ic_microg_app.png b/res/drawable-xxhdpi/ic_microg_app.png new file mode 100644 index 00000000..6294838a Binary files /dev/null and b/res/drawable-xxhdpi/ic_microg_app.png differ diff --git a/res/drawable-xxxhdpi/ic_microg_app.png b/res/drawable-xxxhdpi/ic_microg_app.png new file mode 100644 index 00000000..55da9800 Binary files /dev/null and b/res/drawable-xxxhdpi/ic_microg_app.png differ diff --git a/res/drawable/ic_plusone_medium.xml b/res/drawable/ic_plusone_medium.xml index ac2820c1..ea59380f 100644 --- a/res/drawable/ic_plusone_medium.xml +++ b/res/drawable/ic_plusone_medium.xml @@ -1,12 +1,11 @@ - - - - \ No newline at end of file + \ No newline at end of file diff --git a/res/drawable/ic_plusone_small.xml b/res/drawable/ic_plusone_small.xml index ac2820c1..ea59380f 100644 --- a/res/drawable/ic_plusone_small.xml +++ b/res/drawable/ic_plusone_small.xml @@ -1,12 +1,11 @@ - - - - \ No newline at end of file + \ No newline at end of file diff --git a/res/drawable/ic_plusone_standard.xml b/res/drawable/ic_plusone_standard.xml index ac2820c1..ea59380f 100644 --- a/res/drawable/ic_plusone_standard.xml +++ b/res/drawable/ic_plusone_standard.xml @@ -1,12 +1,11 @@ - - - - \ No newline at end of file + \ No newline at end of file diff --git a/res/drawable/ic_plusone_tall.xml b/res/drawable/ic_plusone_tall.xml index ac2820c1..ea59380f 100644 --- a/res/drawable/ic_plusone_tall.xml +++ b/res/drawable/ic_plusone_tall.xml @@ -1,12 +1,11 @@ - - - - \ No newline at end of file + \ No newline at end of file diff --git a/res/layout/login_base.xml b/res/layout/login_base.xml new file mode 100644 index 00000000..45fb73ca --- /dev/null +++ b/res/layout/login_base.xml @@ -0,0 +1,62 @@ + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/res/layout/login_loading.xml b/res/layout/login_loading.xml new file mode 100644 index 00000000..5a6c0556 --- /dev/null +++ b/res/layout/login_loading.xml @@ -0,0 +1,36 @@ + + + + + + + + \ No newline at end of file diff --git a/res/layout/toolbar.xml b/res/layout/toolbar.xml new file mode 100644 index 00000000..a5be1e8f --- /dev/null +++ b/res/layout/toolbar.xml @@ -0,0 +1,22 @@ + + + diff --git a/res/values/colors.xml b/res/values/colors.xml new file mode 100644 index 00000000..264a58aa --- /dev/null +++ b/res/values/colors.xml @@ -0,0 +1,21 @@ + + + + #ff4285f4 + #ff3367d6 + #ffFFAB40 + diff --git a/res/values/dimens.xml b/res/values/dimens.xml index 9da907a0..367896f3 100644 --- a/res/values/dimens.xml +++ b/res/values/dimens.xml @@ -1,12 +1,11 @@ - - - 5.0dip + 5.0dip \ No newline at end of file diff --git a/res/values/signature.xml b/res/values/signature.xml index c72ccf19..f19ccbfb 100644 --- a/res/values/signature.xml +++ b/res/values/signature.xml @@ -1,12 +1,11 @@ - - + - μg Services + μg Services + Just a sec… + com.google + Google diff --git a/res/values/themes.xml b/res/values/themes.xml new file mode 100644 index 00000000..f6ba6117 --- /dev/null +++ b/res/values/themes.xml @@ -0,0 +1,28 @@ + + + + + + diff --git a/res/xml/account_preferences.xml b/res/xml/account_preferences.xml new file mode 100644 index 00000000..fef8d34e --- /dev/null +++ b/res/xml/account_preferences.xml @@ -0,0 +1,9 @@ + + + + diff --git a/res/xml/authenticator.xml b/res/xml/authenticator.xml new file mode 100644 index 00000000..8cf3a81d --- /dev/null +++ b/res/xml/authenticator.xml @@ -0,0 +1,23 @@ + + + diff --git a/src/com/google/android/gms/auth/GetToken.java b/src/com/google/android/gms/auth/GetToken.java index 0095d0bb..b5155bcf 100644 --- a/src/com/google/android/gms/auth/GetToken.java +++ b/src/com/google/android/gms/auth/GetToken.java @@ -1,11 +1,11 @@ /* - * Copyright (c) 2014 μg Project Team + * Copyright 2013-2015 µg Project Team * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/com/google/android/gms/auth/TokenActivity.java b/src/com/google/android/gms/auth/TokenActivity.java index 5b89b78d..1d41ded3 100644 --- a/src/com/google/android/gms/auth/TokenActivity.java +++ b/src/com/google/android/gms/auth/TokenActivity.java @@ -1,11 +1,11 @@ /* - * Copyright (c) 2014 μg Project Team + * Copyright 2013-2015 µg Project Team * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/com/google/android/gms/common/security/ProviderInstallerImpl.java b/src/com/google/android/gms/common/security/ProviderInstallerImpl.java index 085c6410..ab60e418 100644 --- a/src/com/google/android/gms/common/security/ProviderInstallerImpl.java +++ b/src/com/google/android/gms/common/security/ProviderInstallerImpl.java @@ -1,11 +1,11 @@ /* - * Copyright (c) 2014 μg Project Team + * Copyright 2013-2015 µg Project Team * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/com/google/android/gms/maps/internal/CreatorImpl.java b/src/com/google/android/gms/maps/internal/CreatorImpl.java index 033806ff..521dba43 100644 --- a/src/com/google/android/gms/maps/internal/CreatorImpl.java +++ b/src/com/google/android/gms/maps/internal/CreatorImpl.java @@ -1,11 +1,11 @@ /* - * Copyright (c) 2014 μg Project Team + * Copyright 2013-2015 µg Project Team * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/com/google/android/gms/plus/plusone/PlusOneButtonCreatorImpl.java b/src/com/google/android/gms/plus/plusone/PlusOneButtonCreatorImpl.java index 995f8db5..26452ab5 100644 --- a/src/com/google/android/gms/plus/plusone/PlusOneButtonCreatorImpl.java +++ b/src/com/google/android/gms/plus/plusone/PlusOneButtonCreatorImpl.java @@ -1,11 +1,11 @@ /* - * Copyright (c) 2014 μg Project Team + * Copyright 2013-2015 µg Project Team * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/com/google/android/location/internal/GoogleLocationManagerService.java b/src/com/google/android/location/internal/GoogleLocationManagerService.java index c62a95a2..451492f7 100644 --- a/src/com/google/android/location/internal/GoogleLocationManagerService.java +++ b/src/com/google/android/location/internal/GoogleLocationManagerService.java @@ -1,11 +1,11 @@ /* - * Copyright (c) 2014 μg Project Team + * Copyright 2013-2015 µg Project Team * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/org/microg/gms/AbstractGmsServiceBroker.java b/src/org/microg/gms/AbstractGmsServiceBroker.java index cafdb8f4..8dea77eb 100644 --- a/src/org/microg/gms/AbstractGmsServiceBroker.java +++ b/src/org/microg/gms/AbstractGmsServiceBroker.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2015 µg Project Team + * Copyright 2013-2015 µg Project Team * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/org/microg/gms/auth/AuthClient.java b/src/org/microg/gms/auth/AuthClient.java new file mode 100644 index 00000000..abbe450d --- /dev/null +++ b/src/org/microg/gms/auth/AuthClient.java @@ -0,0 +1,96 @@ +/* + * Copyright 2013-2015 µg Project Team + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.microg.gms.auth; + +import android.net.Uri; +import android.util.Log; + +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.net.HttpURLConnection; +import java.net.URL; +import java.util.Map; + +public class AuthClient { + private static final String TAG = "GmsAuthClient"; + private static final String SERVICE_URL = "https://android.clients.google.com/auth"; + + public static AuthResponse request(AuthRequest request) throws IOException { + AuthResponse authResponse = new AuthResponse(); + HttpURLConnection connection = (HttpURLConnection) new URL(SERVICE_URL).openConnection(); + connection.setRequestMethod("POST"); + connection.setDoInput(true); + connection.setDoOutput(true); + connection.setRequestProperty("Content-Type", "application/x-www-form-urlencoded"); + Map httpHeaders = request.getHttpHeaders(); + for (String key : httpHeaders.keySet()) { + connection.setRequestProperty(key, httpHeaders.get(key)); + } + StringBuilder content = new StringBuilder(); + Map formContent = request.getFormContent(); + for (String key : formContent.keySet()) { + if (content.length() > 0) + content.append("&"); + content.append(Uri.encode(key)).append("=").append(Uri.encode(formContent.get(key))); + } + OutputStream os = connection.getOutputStream(); + os.write(content.toString().getBytes()); + os.close(); + if (connection.getResponseCode() != 200) { + throw new IOException(connection.getResponseMessage()); + } + String result = new String(readStreamToEnd(connection.getInputStream())); + return AuthResponse.parse(result); + } + + protected static byte[] readStreamToEnd(final InputStream is) throws IOException { + final 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(); + } + return bos.toByteArray(); + } + + public static void request(final AuthRequest request, final GmsAuthCallback callback) { + new Thread(new Runnable() { + @Override + public void run() { + try { + callback.onResponse(request(request)); + } catch (Exception e) { + callback.onException(e); + } + } + }).start(); + } + + public static interface GmsAuthCallback { + void onResponse(AuthResponse response); + + void onException(Exception exception); + } +} diff --git a/src/org/microg/gms/auth/AuthManagerServiceImpl.java b/src/org/microg/gms/auth/AuthManagerServiceImpl.java index 31b97557..c2cda4c0 100644 --- a/src/org/microg/gms/auth/AuthManagerServiceImpl.java +++ b/src/org/microg/gms/auth/AuthManagerServiceImpl.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2015 µg Project Team + * Copyright 2013-2015 µg Project Team * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/org/microg/gms/auth/AuthRequest.java b/src/org/microg/gms/auth/AuthRequest.java new file mode 100644 index 00000000..07da2fd2 --- /dev/null +++ b/src/org/microg/gms/auth/AuthRequest.java @@ -0,0 +1,91 @@ +/* + * Copyright 2013-2015 µg Project Team + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.microg.gms.auth; + +import java.util.HashMap; +import java.util.Map; + +public class AuthRequest { + private static final String USER_AGENT = "GoogleAuth/1.4 (%s %s)"; + + public String app; + public String appSignature; + public String caller; + public String callerSignature; + public String androidIdHex; + public String deviceName; + public String buildVersion; + public int sdkVersion; + public String countryCode; + public String operatorCountryCode; + public String locale; + public int gmsVersion; + public String accountType = "HOSTED_OR_GOOGLE"; + public String email; + public String service; + public String source = "android"; + public boolean isCalledFromAccountManager; + public String token; + public boolean isSystemPartition; + public boolean getAccountId; + public boolean isAccessToken; + public String droidguardResults; + public boolean hasPermission; + public boolean addAccount; + + + public Map getHttpHeaders() { + Map map = new HashMap<>(); + map.put("app", app); + map.put("device", androidIdHex); + map.put("User-Agent", String.format(USER_AGENT, deviceName, buildVersion)); + map.put("Content-Type", "application/x-www-form-urlencoded"); + return map; + } + + public Map getFormContent() { + Map map = new HashMap<>(); + map.put("device_country", countryCode); + map.put("operatorCountry", operatorCountryCode); + map.put("lang", locale); + map.put("sdk_version", Integer.toString(sdkVersion)); + map.put("google_play_services_version", Integer.toString(gmsVersion)); + map.put("accountType", accountType); + if (isSystemPartition) map.put("system_partition", "1"); + if (hasPermission) map.put("has_permission", "1"); + if (addAccount) map.put("add_account", "1"); + if (email != null) map.put("Email", email); + map.put("service", service); + map.put("source", source); + map.put("androidId", androidIdHex); + if (getAccountId) map.put("get_accountid", "1"); + map.put("app", app); + map.put("client_sig", appSignature); + if (caller != null) { + map.put("callerPkg", caller); + map.put("callerSig", callerSignature); + } + if (isCalledFromAccountManager) { + map.put("is_called_from_account_manager", "1"); + map.put("_opt_is_called_from_account_manager", "1"); + } + if (isAccessToken) map.put("ACCESS_TOKEN", "1"); + map.put("Token", token); + if (droidguardResults != null) map.put("droidguard_results", droidguardResults); + return map; + } +} diff --git a/src/org/microg/gms/auth/AuthResponse.java b/src/org/microg/gms/auth/AuthResponse.java new file mode 100644 index 00000000..d669d133 --- /dev/null +++ b/src/org/microg/gms/auth/AuthResponse.java @@ -0,0 +1,97 @@ +/* + * Copyright 2013-2015 µg Project Team + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.microg.gms.auth; + +import android.util.Log; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; +import java.lang.reflect.Field; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +public class AuthResponse { + private static final String TAG = "GmsAuthResponse"; + + @ResponseField("SID") + public String Sid; + @ResponseField("LSID") + public String LSid; + @ResponseField("Auth") + public String auth; + @ResponseField("Token") + public String token; + @ResponseField("Email") + public String email; + @ResponseField("services") + public Set services = new HashSet<>(); + @ResponseField("GooglePlusUpgrade") + public boolean isGooglePlusUpgrade; + @ResponseField("PicasaUser") + public String picasaUserName; + @ResponseField("RopText") + public String ropText; + @ResponseField("RopRevision") + public int ropRevision; + @ResponseField("firstName") + public String firstName; + @ResponseField("lastName") + public String lastName; + @ResponseField("issueAdvice") + public String issueAdvice; + + public static AuthResponse parse(String result) { + AuthResponse response = new AuthResponse(); + String[] entries = result.split("\n"); + for (String s : entries) { + String[] keyValuePair = s.split("="); + String key = keyValuePair[0].trim(); + String value = keyValuePair[1].trim(); + try { + for (Field field : AuthResponse.class.getDeclaredFields()) { + if (field.isAnnotationPresent(ResponseField.class) && + key.equals(field.getAnnotation(ResponseField.class).value())) { + if (field.getType().equals(String.class)) { + field.set(response, value); + } else if (field.getType().equals(boolean.class)) { + field.setBoolean(response, value.equals("1")); + } else if (field.getType().equals(int.class)) { + field.setInt(response, Integer.parseInt(value)); + } else if (field.getType().isAssignableFrom(Set.class)) { + //noinspection unchecked + ((Set)field.get(response)).addAll(Arrays.asList(value.split(","))); + } + } + } + } catch (Exception e) { + Log.w(TAG, e); + } + } + return response; + } + + + + @Retention(RetentionPolicy.RUNTIME) + @Target(ElementType.FIELD) + private @interface ResponseField { + public String value(); + } +} diff --git a/src/org/microg/gms/auth/GmsAddAccountRequest.java b/src/org/microg/gms/auth/GmsAddAccountRequest.java new file mode 100644 index 00000000..23afd31c --- /dev/null +++ b/src/org/microg/gms/auth/GmsAddAccountRequest.java @@ -0,0 +1,44 @@ +/* + * Copyright 2013-2015 µg Project Team + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.microg.gms.auth; + +import java.util.Locale; + +public class GmsAddAccountRequest extends AuthRequest { + + public GmsAddAccountRequest(Locale locale, int sdkVersion, int gmsVersion, String deviceName, + String buildVersion, String androidIdHex, String token) { + this.service = "ac2dm"; + this.addAccount = true; + this.isSystemPartition = true; + this.hasPermission = true; + this.getAccountId = true; + this.app = "com.google.android.gms"; + this.appSignature = "38918a453d07199354f8b19af05ec6562ced5788"; + + this.androidIdHex = "3bc26ad601111308"; // TODO: androidIdHex; + this.deviceName = deviceName; + this.buildVersion = buildVersion; + this.countryCode = locale.getCountry(); + this.gmsVersion = gmsVersion; + this.operatorCountryCode = locale.getCountry(); + this.locale = locale.toString(); + this.sdkVersion = sdkVersion; + this.token = token; + this.droidguardResults = null; // TODO + } +} diff --git a/src/org/microg/gms/auth/RetrieveRtTokenRequest.java b/src/org/microg/gms/auth/RetrieveRtTokenRequest.java new file mode 100644 index 00000000..fecb3ffb --- /dev/null +++ b/src/org/microg/gms/auth/RetrieveRtTokenRequest.java @@ -0,0 +1,41 @@ +/* + * Copyright 2013-2015 µg Project Team + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.microg.gms.auth; + +import android.content.Context; +import android.os.Build; + +import org.microg.gms.Constants; + +import java.util.Locale; + +/** + * This request will retrieve a rt token (oauth2rt) from an access token (oauth2) + */ +public class RetrieveRtTokenRequest extends GmsAddAccountRequest { + public RetrieveRtTokenRequest(Context context, String token) { + this(Locale.getDefault(), Build.VERSION.SDK_INT, Constants.MAX_REFERENCE_VERSION, + Build.DEVICE, Build.ID, null /*TODO*/, token); + } + + public RetrieveRtTokenRequest(Locale locale, int sdkVersion, int gmsVersion, String deviceName, + String buildVersion, String androidIdHex, String token) { + super(locale, sdkVersion, gmsVersion, deviceName, buildVersion, androidIdHex, token); + this.isAccessToken = true; + this.droidguardResults = null; // TODO + } +} diff --git a/src/org/microg/gms/auth/login/LoginActivity.java b/src/org/microg/gms/auth/login/LoginActivity.java new file mode 100644 index 00000000..20177f1b --- /dev/null +++ b/src/org/microg/gms/auth/login/LoginActivity.java @@ -0,0 +1,224 @@ +/* + * Copyright 2013-2015 µg Project Team + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.microg.gms.auth.login; + +import android.accounts.Account; +import android.accounts.AccountManager; +import android.app.Activity; +import android.content.Context; +import android.content.res.Configuration; +import android.graphics.Color; +import android.net.Uri; +import android.os.Build; +import android.os.Bundle; +import android.util.DisplayMetrics; +import android.util.Log; +import android.view.KeyEvent; +import android.view.View; +import android.view.ViewGroup; +import android.webkit.CookieManager; +import android.webkit.JavascriptInterface; +import android.webkit.ValueCallback; +import android.webkit.WebSettings; +import android.webkit.WebView; +import android.webkit.WebViewClient; +import android.widget.RelativeLayout; + +import com.google.android.gms.R; + +import org.microg.gms.auth.AuthClient; +import org.microg.gms.auth.AuthResponse; +import org.microg.gms.auth.GmsAddAccountRequest; +import org.microg.gms.auth.RetrieveRtTokenRequest; + +import java.util.Locale; + +public class LoginActivity extends Activity { + public static final String TMPL_NEW_ACCOUNT = "new_account"; + public static final String EXTRA_TMPL = "tmpl"; + + private static final String TAG = "GmsAuthLoginBrowser"; + private static final String EMBEDDED_SETUP_URL = "https://accounts.google.com/EmbeddedSetup"; + private static final String MAGIC_USER_AGENT = " MinuteMaid"; + private static final String COOKIE_OAUTH_TOKEN = "oauth_token"; + private static final int TITLE_MIN_HEIGHT = 64; + public static final double TITLE_WIDTH_FACTOR = (8.0 / 18.0); + + private WebView webView; + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.login_base); + formatTitle(); + webView = createWebView(this); + webView.addJavascriptInterface(new JsBridge(), "mm"); + ((ViewGroup) findViewById(R.id.auth_root)).addView(webView); + webView.setWebViewClient(new WebViewClient() { + @Override + public void onPageFinished(WebView view, String url) { + if ("close".equals(Uri.parse(url).getFragment())) + closeWeb(); + } + }); + CookieManager.getInstance().setAcceptCookie(true); + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { + CookieManager.getInstance().removeAllCookies(new ValueCallback() { + @Override + public void onReceiveValue(Boolean value) { + load(); + } + }); + } else { + //noinspection deprecation + CookieManager.getInstance().removeAllCookie(); + load(); + } + } + + private static WebView createWebView(Context context) { + WebView webView = new WebView(context); + webView.setVisibility(View.INVISIBLE); + webView.setLayoutParams(new RelativeLayout.LayoutParams( + ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT)); + webView.setBackgroundColor(Color.TRANSPARENT); + webView.setOnLongClickListener(new View.OnLongClickListener() { + @Override + public boolean onLongClick(View v) { + return true; + } + }); + prepareWebViewSettings(webView.getSettings()); + return webView; + } + + private static void prepareWebViewSettings(WebSettings settings) { + settings.setUserAgentString(settings.getUserAgentString() + MAGIC_USER_AGENT); + settings.setJavaScriptEnabled(true); + settings.setSupportMultipleWindows(false); + settings.setSaveFormData(false); + settings.setAllowFileAccess(false); + settings.setDatabaseEnabled(false); + settings.setNeedInitialFocus(false); + settings.setUseWideViewPort(false); + settings.setSupportZoom(false); + settings.setJavaScriptCanOpenWindowsAutomatically(false); + } + + private void formatTitle() { + if (getResources().getConfiguration().orientation == Configuration.ORIENTATION_PORTRAIT) { + double widthPixels = (double) (getResources().getDisplayMetrics().widthPixels); + findViewById(R.id.title_container).getLayoutParams().height = + (int) (dpToPx(TITLE_MIN_HEIGHT) + (TITLE_WIDTH_FACTOR * widthPixels)); + } else { + findViewById(R.id.title_container).getLayoutParams().height = dpToPx(TITLE_MIN_HEIGHT); + } + } + + @Override + public void onConfigurationChanged(Configuration newConfig) { + super.onConfigurationChanged(newConfig); + formatTitle(); + } + + private void load() { + webView.loadUrl(buildUrl(getIntent().hasExtra(EXTRA_TMPL) ? getIntent().getStringExtra(EXTRA_TMPL) : TMPL_NEW_ACCOUNT, Locale.getDefault())); + } + + private void closeWeb() { + runOnUiThread(new Runnable() { + @Override + public void run() { + webView.setVisibility(View.INVISIBLE); + } + }); + String cookies = CookieManager.getInstance().getCookie(EMBEDDED_SETUP_URL); + String[] temp = cookies.split(";"); + for (String ar1 : temp) { + if (ar1.trim().startsWith(COOKIE_OAUTH_TOKEN + "=")) { + String[] temp1 = ar1.split("="); + sendRetrieveRtToken(temp1[1]); + } + } + // TODO: Error message + } + + private void sendRetrieveRtToken(String oAuthToken) { + AuthClient.request(new RetrieveRtTokenRequest(this, oAuthToken), + new AuthClient.GmsAuthCallback() { + @Override + public void onResponse(AuthResponse response) { + AccountManager accountManager = AccountManager.get(LoginActivity.this); + Account account = new Account(response.email, "com.google"); + if (accountManager.addAccountExplicitly(account, response.token, null)) { + accountManager.setAuthToken(account, "SID", response.Sid); + accountManager.setAuthToken(account, "LSID", response.LSid); + setResult(RESULT_OK); + // TODO: hand over to account setup + finish(); + } else { + // TODO: Error message + Log.w(TAG, "Account NOT created!"); + setResult(RESULT_CANCELED); + } + } + + @Override + public void onException(Exception exception) { + Log.w(TAG, "onException: " + exception); + } + }); + } + + public int dpToPx(int dp) { + DisplayMetrics displayMetrics = getResources().getDisplayMetrics(); + return Math.round(dp * (displayMetrics.xdpi / DisplayMetrics.DENSITY_DEFAULT)); + } + + @Override + public boolean onKeyDown(int keyCode, KeyEvent event) { + if ((keyCode == KeyEvent.KEYCODE_BACK) && webView.canGoBack()) { + webView.goBack(); + return true; + } + return super.onKeyDown(keyCode, event); + } + + private static String buildUrl(String tmpl, Locale locale) { + return Uri.parse(EMBEDDED_SETUP_URL).buildUpon() + .appendQueryParameter("source", "android") + .appendQueryParameter("xoauth_display_name", "Android Device") + .appendQueryParameter("lang", locale.getLanguage()) + .appendQueryParameter("cc", locale.getCountry().toLowerCase()) + .appendQueryParameter("langCountry", locale.toString().toLowerCase()) + .appendQueryParameter("hl", locale.toString().replace("_", "-")) + .appendQueryParameter("tmpl", tmpl) + .build().toString(); + } + + private class JsBridge { + @JavascriptInterface + public void showView() { + runOnUiThread(new Runnable() { + @Override + public void run() { + webView.setVisibility(View.VISIBLE); + } + }); + } + } +} diff --git a/src/org/microg/gms/auth/loginservice/GoogleLoginService.java b/src/org/microg/gms/auth/loginservice/GoogleLoginService.java new file mode 100644 index 00000000..59c80eb3 --- /dev/null +++ b/src/org/microg/gms/auth/loginservice/GoogleLoginService.java @@ -0,0 +1,71 @@ +/* + * Copyright 2013-2015 µg Project Team + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.microg.gms.auth.loginservice; + +import android.accounts.AbstractAccountAuthenticator; +import android.accounts.Account; +import android.accounts.AccountAuthenticatorResponse; +import android.accounts.NetworkErrorException; +import android.app.Service; +import android.content.Intent; +import android.os.Bundle; +import android.os.IBinder; + +public class GoogleLoginService extends Service { + @Override + public IBinder onBind(Intent intent) { + if (intent.getAction().equals(android.accounts.AccountManager.ACTION_AUTHENTICATOR_INTENT)) { + return new AbstractAccountAuthenticator(this) { + @Override + public Bundle editProperties(AccountAuthenticatorResponse response, String accountType) { + return null; + } + + @Override + public Bundle addAccount(AccountAuthenticatorResponse response, String accountType, String authTokenType, String[] requiredFeatures, Bundle options) throws NetworkErrorException { + return null; + } + + @Override + public Bundle confirmCredentials(AccountAuthenticatorResponse response, Account account, Bundle options) throws NetworkErrorException { + return null; + } + + @Override + public Bundle getAuthToken(AccountAuthenticatorResponse response, Account account, String authTokenType, Bundle options) throws NetworkErrorException { + return null; + } + + @Override + public String getAuthTokenLabel(String authTokenType) { + return null; + } + + @Override + public Bundle updateCredentials(AccountAuthenticatorResponse response, Account account, String authTokenType, Bundle options) throws NetworkErrorException { + return null; + } + + @Override + public Bundle hasFeatures(AccountAuthenticatorResponse response, Account account, String[] features) throws NetworkErrorException { + return null; + } + }.getIBinder(); + } + return null; + } +} diff --git a/src/org/microg/gms/location/GoogleLocationManager.java b/src/org/microg/gms/location/GoogleLocationManager.java index 8992221e..f799aeab 100644 --- a/src/org/microg/gms/location/GoogleLocationManager.java +++ b/src/org/microg/gms/location/GoogleLocationManager.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2015 µg Project Team + * Copyright 2013-2015 µg Project Team * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/org/microg/gms/location/GoogleLocationManagerServiceImpl.java b/src/org/microg/gms/location/GoogleLocationManagerServiceImpl.java index 8525fa97..e3faef57 100644 --- a/src/org/microg/gms/location/GoogleLocationManagerServiceImpl.java +++ b/src/org/microg/gms/location/GoogleLocationManagerServiceImpl.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2015 µg Project Team + * Copyright 2013-2015 µg Project Team * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/org/microg/gms/location/LocationChangeListener.java b/src/org/microg/gms/location/LocationChangeListener.java index 4090fc9d..fada1a32 100644 --- a/src/org/microg/gms/location/LocationChangeListener.java +++ b/src/org/microg/gms/location/LocationChangeListener.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2015 µg Project Team + * Copyright 2013-2015 µg Project Team * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/org/microg/gms/location/LocationRequestHelper.java b/src/org/microg/gms/location/LocationRequestHelper.java index 781555d7..db4cc979 100644 --- a/src/org/microg/gms/location/LocationRequestHelper.java +++ b/src/org/microg/gms/location/LocationRequestHelper.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2015 µg Project Team + * Copyright 2013-2015 µg Project Team * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/org/microg/gms/location/MockLocationProvider.java b/src/org/microg/gms/location/MockLocationProvider.java index eb3387a3..a515dd71 100644 --- a/src/org/microg/gms/location/MockLocationProvider.java +++ b/src/org/microg/gms/location/MockLocationProvider.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2015 µg Project Team + * Copyright 2013-2015 µg Project Team * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/org/microg/gms/location/RealLocationProvider.java b/src/org/microg/gms/location/RealLocationProvider.java index 633ceb57..ee9578ea 100644 --- a/src/org/microg/gms/location/RealLocationProvider.java +++ b/src/org/microg/gms/location/RealLocationProvider.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2015 µg Project Team + * Copyright 2013-2015 µg Project Team * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/org/microg/gms/maps/BackendMap.java b/src/org/microg/gms/maps/BackendMap.java index d70d7452..f07362e3 100644 --- a/src/org/microg/gms/maps/BackendMap.java +++ b/src/org/microg/gms/maps/BackendMap.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2015 µg Project Team + * Copyright 2013-2015 µg Project Team * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/org/microg/gms/maps/ContextContainer.java b/src/org/microg/gms/maps/ContextContainer.java index 177e7af9..4a5a1516 100644 --- a/src/org/microg/gms/maps/ContextContainer.java +++ b/src/org/microg/gms/maps/ContextContainer.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2015 µg Project Team + * Copyright 2013-2015 µg Project Team * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/org/microg/gms/maps/GmsMapsTypeHelper.java b/src/org/microg/gms/maps/GmsMapsTypeHelper.java index 28252911..df49858d 100644 --- a/src/org/microg/gms/maps/GmsMapsTypeHelper.java +++ b/src/org/microg/gms/maps/GmsMapsTypeHelper.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2015 µg Project Team + * Copyright 2013-2015 µg Project Team * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/org/microg/gms/maps/GoogleMapImpl.java b/src/org/microg/gms/maps/GoogleMapImpl.java index d455ef0e..1651085f 100644 --- a/src/org/microg/gms/maps/GoogleMapImpl.java +++ b/src/org/microg/gms/maps/GoogleMapImpl.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2015 µg Project Team + * Copyright 2013-2015 µg Project Team * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/org/microg/gms/maps/MapFragmentImpl.java b/src/org/microg/gms/maps/MapFragmentImpl.java index 522dd31c..9ffa7390 100644 --- a/src/org/microg/gms/maps/MapFragmentImpl.java +++ b/src/org/microg/gms/maps/MapFragmentImpl.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2015 µg Project Team + * Copyright 2013-2015 µg Project Team * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/org/microg/gms/maps/MapViewImpl.java b/src/org/microg/gms/maps/MapViewImpl.java index 49bb349b..33144cd8 100644 --- a/src/org/microg/gms/maps/MapViewImpl.java +++ b/src/org/microg/gms/maps/MapViewImpl.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2015 µg Project Team + * Copyright 2013-2015 µg Project Team * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/org/microg/gms/maps/ProjectionImpl.java b/src/org/microg/gms/maps/ProjectionImpl.java index 5422b9d0..7a16f9e7 100644 --- a/src/org/microg/gms/maps/ProjectionImpl.java +++ b/src/org/microg/gms/maps/ProjectionImpl.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2015 µg Project Team + * Copyright 2013-2015 µg Project Team * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/org/microg/gms/maps/ResourcesContainer.java b/src/org/microg/gms/maps/ResourcesContainer.java index 6911da84..62ed18f7 100644 --- a/src/org/microg/gms/maps/ResourcesContainer.java +++ b/src/org/microg/gms/maps/ResourcesContainer.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2015 µg Project Team + * Copyright 2013-2015 µg Project Team * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/org/microg/gms/maps/UiSettingsImpl.java b/src/org/microg/gms/maps/UiSettingsImpl.java index addf2d28..c111ac26 100644 --- a/src/org/microg/gms/maps/UiSettingsImpl.java +++ b/src/org/microg/gms/maps/UiSettingsImpl.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2015 µg Project Team + * Copyright 2013-2015 µg Project Team * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/org/microg/gms/maps/bitmap/AbstractBitmapDescriptor.java b/src/org/microg/gms/maps/bitmap/AbstractBitmapDescriptor.java index 8cba5888..772bb0cb 100644 --- a/src/org/microg/gms/maps/bitmap/AbstractBitmapDescriptor.java +++ b/src/org/microg/gms/maps/bitmap/AbstractBitmapDescriptor.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2015 µg Project Team + * Copyright 2013-2015 µg Project Team * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/org/microg/gms/maps/bitmap/AssetBitmapDescriptor.java b/src/org/microg/gms/maps/bitmap/AssetBitmapDescriptor.java index d7bfff35..fbe08e96 100644 --- a/src/org/microg/gms/maps/bitmap/AssetBitmapDescriptor.java +++ b/src/org/microg/gms/maps/bitmap/AssetBitmapDescriptor.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2015 µg Project Team + * Copyright 2013-2015 µg Project Team * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/org/microg/gms/maps/bitmap/BitmapBitmapDescriptor.java b/src/org/microg/gms/maps/bitmap/BitmapBitmapDescriptor.java index 8c3ad467..5ea7af8f 100644 --- a/src/org/microg/gms/maps/bitmap/BitmapBitmapDescriptor.java +++ b/src/org/microg/gms/maps/bitmap/BitmapBitmapDescriptor.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2015 µg Project Team + * Copyright 2013-2015 µg Project Team * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/org/microg/gms/maps/bitmap/BitmapDescriptorFactoryImpl.java b/src/org/microg/gms/maps/bitmap/BitmapDescriptorFactoryImpl.java index fba39507..41ed4ac8 100644 --- a/src/org/microg/gms/maps/bitmap/BitmapDescriptorFactoryImpl.java +++ b/src/org/microg/gms/maps/bitmap/BitmapDescriptorFactoryImpl.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2015 µg Project Team + * Copyright 2013-2015 µg Project Team * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/org/microg/gms/maps/bitmap/BitmapDescriptorImpl.java b/src/org/microg/gms/maps/bitmap/BitmapDescriptorImpl.java index eed63648..955e5e88 100644 --- a/src/org/microg/gms/maps/bitmap/BitmapDescriptorImpl.java +++ b/src/org/microg/gms/maps/bitmap/BitmapDescriptorImpl.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2015 µg Project Team + * Copyright 2013-2015 µg Project Team * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/org/microg/gms/maps/bitmap/DefaultBitmapDescriptor.java b/src/org/microg/gms/maps/bitmap/DefaultBitmapDescriptor.java index 6a5f3b5a..c7539565 100644 --- a/src/org/microg/gms/maps/bitmap/DefaultBitmapDescriptor.java +++ b/src/org/microg/gms/maps/bitmap/DefaultBitmapDescriptor.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2015 µg Project Team + * Copyright 2013-2015 µg Project Team * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/org/microg/gms/maps/bitmap/FileBitmapDescriptor.java b/src/org/microg/gms/maps/bitmap/FileBitmapDescriptor.java index 7d3ba9de..506738d3 100644 --- a/src/org/microg/gms/maps/bitmap/FileBitmapDescriptor.java +++ b/src/org/microg/gms/maps/bitmap/FileBitmapDescriptor.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2015 µg Project Team + * Copyright 2013-2015 µg Project Team * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/org/microg/gms/maps/bitmap/PathBitmapDescriptor.java b/src/org/microg/gms/maps/bitmap/PathBitmapDescriptor.java index 70adc9b9..27863a15 100644 --- a/src/org/microg/gms/maps/bitmap/PathBitmapDescriptor.java +++ b/src/org/microg/gms/maps/bitmap/PathBitmapDescriptor.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2015 µg Project Team + * Copyright 2013-2015 µg Project Team * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/org/microg/gms/maps/bitmap/ResourceBitmapDescriptor.java b/src/org/microg/gms/maps/bitmap/ResourceBitmapDescriptor.java index 7ddf02fa..c902f7b0 100644 --- a/src/org/microg/gms/maps/bitmap/ResourceBitmapDescriptor.java +++ b/src/org/microg/gms/maps/bitmap/ResourceBitmapDescriptor.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2015 µg Project Team + * Copyright 2013-2015 µg Project Team * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/org/microg/gms/maps/camera/CameraUpdate.java b/src/org/microg/gms/maps/camera/CameraUpdate.java index c3f28cc5..830d5cd9 100644 --- a/src/org/microg/gms/maps/camera/CameraUpdate.java +++ b/src/org/microg/gms/maps/camera/CameraUpdate.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2015 µg Project Team + * Copyright 2013-2015 µg Project Team * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/org/microg/gms/maps/camera/CameraUpdateFactoryImpl.java b/src/org/microg/gms/maps/camera/CameraUpdateFactoryImpl.java index 4187acf1..2a6fce9b 100644 --- a/src/org/microg/gms/maps/camera/CameraUpdateFactoryImpl.java +++ b/src/org/microg/gms/maps/camera/CameraUpdateFactoryImpl.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2015 µg Project Team + * Copyright 2013-2015 µg Project Team * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/org/microg/gms/maps/camera/MapPositionCameraUpdate.java b/src/org/microg/gms/maps/camera/MapPositionCameraUpdate.java index 935cdfaa..c0f31e8a 100644 --- a/src/org/microg/gms/maps/camera/MapPositionCameraUpdate.java +++ b/src/org/microg/gms/maps/camera/MapPositionCameraUpdate.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2015 µg Project Team + * Copyright 2013-2015 µg Project Team * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/org/microg/gms/maps/camera/NoCameraUpdate.java b/src/org/microg/gms/maps/camera/NoCameraUpdate.java index 74295457..1d40d845 100644 --- a/src/org/microg/gms/maps/camera/NoCameraUpdate.java +++ b/src/org/microg/gms/maps/camera/NoCameraUpdate.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2015 µg Project Team + * Copyright 2013-2015 µg Project Team * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/org/microg/gms/maps/markup/CircleImpl.java b/src/org/microg/gms/maps/markup/CircleImpl.java index 5b9ccb7c..e98d1138 100644 --- a/src/org/microg/gms/maps/markup/CircleImpl.java +++ b/src/org/microg/gms/maps/markup/CircleImpl.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2015 µg Project Team + * Copyright 2013-2015 µg Project Team * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/org/microg/gms/maps/markup/GroundOverlayImpl.java b/src/org/microg/gms/maps/markup/GroundOverlayImpl.java index 44790636..55a1a634 100644 --- a/src/org/microg/gms/maps/markup/GroundOverlayImpl.java +++ b/src/org/microg/gms/maps/markup/GroundOverlayImpl.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2015 µg Project Team + * Copyright 2013-2015 µg Project Team * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/org/microg/gms/maps/markup/InfoWindow.java b/src/org/microg/gms/maps/markup/InfoWindow.java index 6c0de209..94af7739 100644 --- a/src/org/microg/gms/maps/markup/InfoWindow.java +++ b/src/org/microg/gms/maps/markup/InfoWindow.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2015 µg Project Team + * Copyright 2013-2015 µg Project Team * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/org/microg/gms/maps/markup/MarkerImpl.java b/src/org/microg/gms/maps/markup/MarkerImpl.java index 975e9d3f..ca9c8407 100644 --- a/src/org/microg/gms/maps/markup/MarkerImpl.java +++ b/src/org/microg/gms/maps/markup/MarkerImpl.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2015 µg Project Team + * Copyright 2013-2015 µg Project Team * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/org/microg/gms/maps/markup/Markup.java b/src/org/microg/gms/maps/markup/Markup.java index 0b2b5f69..f399873e 100644 --- a/src/org/microg/gms/maps/markup/Markup.java +++ b/src/org/microg/gms/maps/markup/Markup.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2015 µg Project Team + * Copyright 2013-2015 µg Project Team * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/org/microg/gms/maps/markup/PolygonImpl.java b/src/org/microg/gms/maps/markup/PolygonImpl.java index cc776ff3..dd8997e4 100644 --- a/src/org/microg/gms/maps/markup/PolygonImpl.java +++ b/src/org/microg/gms/maps/markup/PolygonImpl.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2015 µg Project Team + * Copyright 2013-2015 µg Project Team * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/org/microg/gms/maps/markup/PolylineImpl.java b/src/org/microg/gms/maps/markup/PolylineImpl.java index 61333466..333ceef3 100644 --- a/src/org/microg/gms/maps/markup/PolylineImpl.java +++ b/src/org/microg/gms/maps/markup/PolylineImpl.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2015 µg Project Team + * Copyright 2013-2015 µg Project Team * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/org/microg/gms/maps/markup/TileOverlayImpl.java b/src/org/microg/gms/maps/markup/TileOverlayImpl.java index 6b4c6afc..91bbf702 100644 --- a/src/org/microg/gms/maps/markup/TileOverlayImpl.java +++ b/src/org/microg/gms/maps/markup/TileOverlayImpl.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2015 µg Project Team + * Copyright 2013-2015 µg Project Team * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/org/microg/gms/plus/PlusOneButtonImpl.java b/src/org/microg/gms/plus/PlusOneButtonImpl.java index f97ea290..61eda38e 100644 --- a/src/org/microg/gms/plus/PlusOneButtonImpl.java +++ b/src/org/microg/gms/plus/PlusOneButtonImpl.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2015 µg Project Team + * Copyright 2013-2015 µg Project Team * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/org/microg/tools/AccountPickerActivity.java b/src/org/microg/tools/AccountPickerActivity.java index 7aa62fd3..8373200a 100644 --- a/src/org/microg/tools/AccountPickerActivity.java +++ b/src/org/microg/tools/AccountPickerActivity.java @@ -1,11 +1,11 @@ /* - * Copyright (c) 2014 μg Project Team + * Copyright 2013-2015 µg Project Team * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS,