0
0
Fork 0
mirror of https://github.com/YTVanced/VancedMicroG synced 2024-11-28 14:13:00 +00:00

Do not use static androidid

This commit is contained in:
mar-v-in 2015-02-02 00:05:24 +01:00
parent 2c487d1f2c
commit 14379f607e
6 changed files with 43 additions and 17 deletions

View file

@ -22,7 +22,7 @@ import com.google.android.gms.dynamic.IObjectWrapper;
import com.google.android.gms.dynamic.ObjectWrapper;
import com.google.android.gms.plus.internal.IPlusOneButtonCreator;
import org.microg.gms.Constants;
import org.microg.gms.common.Constants;
import org.microg.gms.plus.PlusOneButtonImpl;
public class PlusOneButtonCreatorImpl extends IPlusOneButtonCreator.Stub {

View file

@ -26,7 +26,7 @@ import org.microg.gms.AbstractGmsServiceBroker;
import com.google.android.gms.common.internal.IGmsCallbacks;
import org.microg.gms.location.GoogleLocationManagerServiceImpl;
import static org.microg.gms.Constants.ACTION_GMS_LOCATION_MANAGER_SERVICE_START;
import static org.microg.gms.common.Constants.ACTION_GMS_LOCATION_MANAGER_SERVICE_START;
public class GoogleLocationManagerService extends Service {
private static final String TAG = "GmsLMS";

View file

@ -16,10 +16,21 @@
package org.microg.gms.auth;
import android.content.Context;
import android.os.Build;
import org.microg.gms.common.Constants;
import org.microg.gms.common.Utils;
import java.util.Locale;
public class GmsAddAccountRequest extends AuthRequest {
public GmsAddAccountRequest(Context context, String token) {
this(Locale.getDefault(), Build.VERSION.SDK_INT, Constants.MAX_REFERENCE_VERSION,
Build.DEVICE, Build.ID, Utils.getAndroidIdHex(context), token);
}
public GmsAddAccountRequest(Locale locale, int sdkVersion, int gmsVersion, String deviceName,
String buildVersion, String androidIdHex, String token) {
this.service = "ac2dm";
@ -30,7 +41,7 @@ public class GmsAddAccountRequest extends AuthRequest {
this.app = "com.google.android.gms";
this.appSignature = "38918a453d07199354f8b19af05ec6562ced5788";
this.androidIdHex = "3bc26ad601111308"; // TODO: androidIdHex;
this.androidIdHex = androidIdHex;
this.deviceName = deviceName;
this.buildVersion = buildVersion;
this.countryCode = locale.getCountry();
@ -39,6 +50,5 @@ public class GmsAddAccountRequest extends AuthRequest {
this.locale = locale.toString();
this.sdkVersion = sdkVersion;
this.token = token;
this.droidguardResults = null; // TODO
}
}

View file

@ -17,24 +17,14 @@
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);
public RetrieveRtTokenRequest(Context context, String token) {
super(context, token);
this.isAccessToken = true;
this.droidguardResults = null; // TODO
}

View file

@ -0,0 +1,26 @@
/*
* 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.common;
import android.content.Context;
public class Utils {
public static String getAndroidIdHex(Context context) {
return null;
}
}

View file

@ -19,7 +19,7 @@ package org.microg.gms.location;
import android.location.Location;
import android.os.Bundle;
import static org.microg.gms.Constants.KEY_MOCK_LOCATION;
import static org.microg.gms.common.Constants.KEY_MOCK_LOCATION;
public class MockLocationProvider {
private boolean mockEnabled = false;