mirror of
https://github.com/TeamVanced/VancedMicroG
synced 2024-07-17 10:54:06 +02:00
Do not use static androidid
This commit is contained in:
parent
2c487d1f2c
commit
14379f607e
|
@ -22,7 +22,7 @@ import com.google.android.gms.dynamic.IObjectWrapper;
|
||||||
import com.google.android.gms.dynamic.ObjectWrapper;
|
import com.google.android.gms.dynamic.ObjectWrapper;
|
||||||
import com.google.android.gms.plus.internal.IPlusOneButtonCreator;
|
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;
|
import org.microg.gms.plus.PlusOneButtonImpl;
|
||||||
|
|
||||||
public class PlusOneButtonCreatorImpl extends IPlusOneButtonCreator.Stub {
|
public class PlusOneButtonCreatorImpl extends IPlusOneButtonCreator.Stub {
|
||||||
|
|
|
@ -26,7 +26,7 @@ import org.microg.gms.AbstractGmsServiceBroker;
|
||||||
import com.google.android.gms.common.internal.IGmsCallbacks;
|
import com.google.android.gms.common.internal.IGmsCallbacks;
|
||||||
import org.microg.gms.location.GoogleLocationManagerServiceImpl;
|
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 {
|
public class GoogleLocationManagerService extends Service {
|
||||||
private static final String TAG = "GmsLMS";
|
private static final String TAG = "GmsLMS";
|
||||||
|
|
|
@ -16,10 +16,21 @@
|
||||||
|
|
||||||
package org.microg.gms.auth;
|
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;
|
import java.util.Locale;
|
||||||
|
|
||||||
public class GmsAddAccountRequest extends AuthRequest {
|
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,
|
public GmsAddAccountRequest(Locale locale, int sdkVersion, int gmsVersion, String deviceName,
|
||||||
String buildVersion, String androidIdHex, String token) {
|
String buildVersion, String androidIdHex, String token) {
|
||||||
this.service = "ac2dm";
|
this.service = "ac2dm";
|
||||||
|
@ -30,7 +41,7 @@ public class GmsAddAccountRequest extends AuthRequest {
|
||||||
this.app = "com.google.android.gms";
|
this.app = "com.google.android.gms";
|
||||||
this.appSignature = "38918a453d07199354f8b19af05ec6562ced5788";
|
this.appSignature = "38918a453d07199354f8b19af05ec6562ced5788";
|
||||||
|
|
||||||
this.androidIdHex = "3bc26ad601111308"; // TODO: androidIdHex;
|
this.androidIdHex = androidIdHex;
|
||||||
this.deviceName = deviceName;
|
this.deviceName = deviceName;
|
||||||
this.buildVersion = buildVersion;
|
this.buildVersion = buildVersion;
|
||||||
this.countryCode = locale.getCountry();
|
this.countryCode = locale.getCountry();
|
||||||
|
@ -39,6 +50,5 @@ public class GmsAddAccountRequest extends AuthRequest {
|
||||||
this.locale = locale.toString();
|
this.locale = locale.toString();
|
||||||
this.sdkVersion = sdkVersion;
|
this.sdkVersion = sdkVersion;
|
||||||
this.token = token;
|
this.token = token;
|
||||||
this.droidguardResults = null; // TODO
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,24 +17,14 @@
|
||||||
package org.microg.gms.auth;
|
package org.microg.gms.auth;
|
||||||
|
|
||||||
import android.content.Context;
|
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)
|
* This request will retrieve a rt token (oauth2rt) from an access token (oauth2)
|
||||||
*/
|
*/
|
||||||
public class RetrieveRtTokenRequest extends GmsAddAccountRequest {
|
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,
|
public RetrieveRtTokenRequest(Context context, String token) {
|
||||||
String buildVersion, String androidIdHex, String token) {
|
super(context, token);
|
||||||
super(locale, sdkVersion, gmsVersion, deviceName, buildVersion, androidIdHex, token);
|
|
||||||
this.isAccessToken = true;
|
this.isAccessToken = true;
|
||||||
this.droidguardResults = null; // TODO
|
this.droidguardResults = null; // TODO
|
||||||
}
|
}
|
||||||
|
|
26
src/org/microg/gms/common/Utils.java
Normal file
26
src/org/microg/gms/common/Utils.java
Normal 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;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -19,7 +19,7 @@ package org.microg.gms.location;
|
||||||
import android.location.Location;
|
import android.location.Location;
|
||||||
import android.os.Bundle;
|
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 {
|
public class MockLocationProvider {
|
||||||
private boolean mockEnabled = false;
|
private boolean mockEnabled = false;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user