Optimize imports

This commit is contained in:
Oizaro 2022-01-28 01:15:01 +01:00
parent f600688264
commit 8472943bb4
90 changed files with 244 additions and 322 deletions

View File

@ -13,7 +13,6 @@ import android.text.TextUtils;
import org.microg.gms.common.PublicApi;
import org.microg.safeparcel.AutoSafeParcelable;
import org.microg.safeparcel.SafeParceled;
import java.util.Arrays;
import java.util.List;

View File

@ -10,7 +10,6 @@ package com.google.android.gms.auth.api.credentials;
import org.microg.gms.common.PublicApi;
import org.microg.safeparcel.AutoSafeParcelable;
import org.microg.safeparcel.SafeParceled;
@PublicApi
public class CredentialPickerConfig extends AutoSafeParcelable {

View File

@ -9,7 +9,6 @@
package com.google.android.gms.auth.api.credentials;
import org.microg.safeparcel.AutoSafeParcelable;
import org.microg.safeparcel.SafeParceled;
/**
* Parameters for requesting a Credential, via Auth.CredentialsApi.request(). Instances can be

View File

@ -10,7 +10,6 @@ package com.google.android.gms.auth.api.credentials;
import org.microg.gms.common.PublicApi;
import org.microg.safeparcel.AutoSafeParcelable;
import org.microg.safeparcel.SafeParceled;
@PublicApi
public class IdToken extends AutoSafeParcelable {

View File

@ -19,9 +19,9 @@ package com.google.android.gms.clearcut;
import android.util.Base64;
import com.google.android.gms.clearcut.internal.LogVerifierResultParcelable;
import com.google.android.gms.clearcut.internal.PlayLoggerContext;
import com.google.android.gms.phenotype.ExperimentToken;
import com.google.android.gms.phenotype.GenericDimension;
import com.google.android.gms.clearcut.internal.PlayLoggerContext;
import org.microg.safeparcel.AutoSafeParcelable;

View File

@ -18,7 +18,6 @@ package com.google.android.gms.games.multiplayer.realtime;
import android.os.Parcel;
import android.os.Parcelable;
import android.os.Parcelable.Creator;
public final class RealTimeMessage implements Parcelable {
public static final int RELIABLE = 1;

View File

@ -16,9 +16,6 @@
package com.google.android.gms.maps.model;
import android.os.IBinder;
import com.google.android.gms.dynamic.ObjectWrapper;
import org.microg.gms.common.PublicApi;
import org.microg.safeparcel.AutoSafeParcelable;
import org.microg.safeparcel.SafeParceled;

View File

@ -17,6 +17,7 @@
package com.google.android.gms.maps.model;
import android.os.IBinder;
import com.google.android.gms.dynamic.ObjectWrapper;
import org.microg.gms.common.PublicApi;

View File

@ -16,13 +16,13 @@
package com.google.android.gms.common.images;
import java.util.Locale;
import android.net.Uri;
import org.microg.safeparcel.AutoSafeParcelable;
import org.microg.safeparcel.SafeParceled;
import java.util.Locale;
public class WebImage extends AutoSafeParcelable {
public static final Creator<WebImage> CREATOR = new AutoCreator<>(WebImage.class);

View File

@ -16,22 +16,6 @@
package com.google.android.gms.common;
import android.app.Activity;
import android.app.Dialog;
import android.app.PendingIntent;
import android.content.Context;
import android.content.DialogInterface;
import android.os.Bundle;
import androidx.fragment.app.FragmentActivity;
import android.util.Log;
import com.google.android.gms.common.api.GoogleApiClient.OnConnectionFailedListener;
import com.google.android.gms.tasks.Task;
import com.google.android.gms.tasks.Tasks;
import org.microg.gms.common.Constants;
import org.microg.gms.common.PublicApi;
import static com.google.android.gms.common.ConnectionResult.INTERNAL_ERROR;
import static com.google.android.gms.common.ConnectionResult.INVALID_ACCOUNT;
import static com.google.android.gms.common.ConnectionResult.NETWORK_ERROR;
@ -43,6 +27,23 @@ import static com.google.android.gms.common.ConnectionResult.SERVICE_VERSION_UPD
import static com.google.android.gms.common.ConnectionResult.SIGN_IN_REQUIRED;
import static com.google.android.gms.common.ConnectionResult.SUCCESS;
import android.app.Activity;
import android.app.Dialog;
import android.app.PendingIntent;
import android.content.Context;
import android.content.DialogInterface;
import android.os.Bundle;
import android.util.Log;
import androidx.fragment.app.FragmentActivity;
import com.google.android.gms.common.api.GoogleApiClient.OnConnectionFailedListener;
import com.google.android.gms.tasks.Task;
import com.google.android.gms.tasks.Tasks;
import org.microg.gms.common.Constants;
import org.microg.gms.common.PublicApi;
@PublicApi
public class GoogleApiAvailability {
private static final String TAG = "GmsApiAvailability";

View File

@ -16,6 +16,10 @@
package org.microg.gms.common;
import static android.os.Build.VERSION.SDK_INT;
import static android.os.Build.VERSION_CODES.ICE_CREAM_SANDWICH;
import static org.microg.gms.common.Constants.GMS_PACKAGE_NAME;
import android.annotation.SuppressLint;
import android.content.ComponentName;
import android.content.Context;
@ -29,10 +33,6 @@ import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import static android.os.Build.VERSION.SDK_INT;
import static android.os.Build.VERSION_CODES.ICE_CREAM_SANDWICH;
import static org.microg.gms.common.Constants.GMS_PACKAGE_NAME;
public class MultiConnectionKeeper {
private static final String TAG = "GmsMultiConKeeper";

View File

@ -7,7 +7,6 @@ package org.microg.gms.common.api;
import android.content.Context;
import android.os.Bundle;
import android.os.DeadObjectException;
import com.google.android.gms.common.ConnectionResult;
import com.google.android.gms.common.api.Api;

View File

@ -26,7 +26,6 @@ import com.google.android.gms.common.api.Scope;
import org.microg.gms.common.Constants;
import org.microg.gms.common.GmsService;
import org.microg.safeparcel.AutoSafeParcelable;
import org.microg.safeparcel.SafeParceled;
import java.util.Arrays;

View File

@ -16,8 +16,8 @@
package com.google.android.gms.cast;
import android.os.Bundle;
import android.net.Uri;
import android.os.Bundle;
import android.text.TextUtils;
import com.google.android.gms.common.images.WebImage;

View File

@ -6,7 +6,6 @@
package com.google.android.gms.cast;
import org.microg.safeparcel.AutoSafeParcelable;
import org.microg.safeparcel.SafeParceled;
public class RequestItem extends AutoSafeParcelable {
@Field(2)

View File

@ -16,14 +16,12 @@
package com.google.android.gms.cast.framework;
import org.microg.safeparcel.AutoSafeParcelable;
import org.microg.safeparcel.SafeParceled;
import com.google.android.gms.cast.framework.media.CastMediaOptions;
import com.google.android.gms.cast.LaunchOptions;
import com.google.android.gms.cast.framework.media.CastMediaOptions;
import org.microg.safeparcel.AutoSafeParcelable;
import java.util.ArrayList;
import java.util.List;
public class CastOptions extends AutoSafeParcelable {
@Field(1)

View File

@ -17,7 +17,6 @@
package com.google.android.gms.cast.framework.media;
import org.microg.safeparcel.AutoSafeParcelable;
import org.microg.safeparcel.SafeParceled;
public class CastMediaOptions extends AutoSafeParcelable {

View File

@ -16,12 +16,11 @@
package com.google.android.gms.cast.framework.media;
import java.util.List;
import com.google.android.gms.cast.framework.media.INotificationActionsProvider;
import org.microg.safeparcel.AutoSafeParcelable;
import org.microg.safeparcel.SafeParceled;
import java.util.List;
public class NotificationOptions extends AutoSafeParcelable {

View File

@ -21,9 +21,9 @@ import android.os.Looper;
import com.google.android.gms.cast.Cast;
import org.microg.gms.common.api.ApiClient;
import org.microg.gms.common.api.ApiClientBuilder;
import org.microg.gms.common.api.ApiClientSettings;
import org.microg.gms.common.api.ApiClient;
import org.microg.gms.common.api.ConnectionCallbacks;
import org.microg.gms.common.api.OnConnectionFailedListener;

View File

@ -22,9 +22,9 @@ import android.os.Looper;
import com.google.android.gms.cast.CastRemoteDisplay;
import org.microg.gms.common.DummyApiClient;
import org.microg.gms.common.api.ApiClient;
import org.microg.gms.common.api.ApiClientBuilder;
import org.microg.gms.common.api.ApiClientSettings;
import org.microg.gms.common.api.ApiClient;
import org.microg.gms.common.api.ConnectionCallbacks;
import org.microg.gms.common.api.OnConnectionFailedListener;

View File

@ -17,6 +17,8 @@
package org.microg.tools.ui;
import static android.os.Build.VERSION.SDK_INT;
import android.content.Context;
import android.os.Build;
import android.os.Parcel;
@ -35,8 +37,6 @@ import androidx.appcompat.widget.SwitchCompat;
import java.util.ArrayList;
import static android.os.Build.VERSION.SDK_INT;
public class SwitchBar extends LinearLayout implements CompoundButton.OnCheckedChangeListener,
View.OnClickListener {

View File

@ -34,8 +34,8 @@ import com.google.android.gms.cast.framework.ISessionProvider;
import com.google.android.gms.dynamic.IObjectWrapper;
import com.google.android.gms.dynamic.ObjectWrapper;
import java.util.Map;
import java.util.HashMap;
import java.util.Map;
public class CastContextImpl extends ICastContext.Stub {
private static final String TAG = CastContextImpl.class.getSimpleName();

View File

@ -27,9 +27,6 @@ import com.google.android.gms.cast.framework.IReconnectionService;
import com.google.android.gms.cast.framework.ISession;
import com.google.android.gms.cast.framework.ISessionProxy;
import com.google.android.gms.cast.framework.media.CastMediaOptions;
import com.google.android.gms.cast.framework.internal.CastContextImpl;
import com.google.android.gms.cast.framework.internal.CastSessionImpl;
import com.google.android.gms.cast.framework.internal.SessionImpl;
import com.google.android.gms.cast.framework.media.IMediaNotificationService;
import com.google.android.gms.cast.framework.media.internal.IFetchBitmapTask;
import com.google.android.gms.cast.framework.media.internal.IFetchBitmapTaskProgressPublisher;

View File

@ -16,8 +16,6 @@
package com.google.android.gms.cast.framework.internal;
import com.google.android.gms.cast.framework.ICastSession;
import android.os.Bundle;
import android.os.RemoteException;
import android.util.Log;
@ -25,6 +23,7 @@ import android.util.Log;
import com.google.android.gms.cast.ApplicationMetadata;
import com.google.android.gms.cast.framework.CastOptions;
import com.google.android.gms.cast.framework.ICastConnectionController;
import com.google.android.gms.cast.framework.ICastSession;
import com.google.android.gms.common.api.Status;
import com.google.android.gms.dynamic.IObjectWrapper;
import com.google.android.gms.dynamic.ObjectWrapper;

View File

@ -21,12 +21,11 @@ import android.util.Log;
import com.google.android.gms.cast.framework.IDiscoveryManager;
import com.google.android.gms.cast.framework.IDiscoveryManagerListener;
import com.google.android.gms.cast.framework.internal.CastContextImpl;
import com.google.android.gms.dynamic.IObjectWrapper;
import com.google.android.gms.dynamic.ObjectWrapper;
import java.util.Set;
import java.util.HashSet;
import java.util.Set;
public class DiscoveryManagerImpl extends IDiscoveryManager.Stub {
private static final String TAG = DiscoveryManagerImpl.class.getSimpleName();

View File

@ -20,7 +20,6 @@ import android.os.Bundle;
import android.os.RemoteException;
import android.util.Log;
import com.google.android.gms.cast.ApplicationMetadata;
import com.google.android.gms.cast.CastDevice;
import com.google.android.gms.cast.framework.ISession;

View File

@ -24,16 +24,13 @@ import com.google.android.gms.cast.framework.CastState;
import com.google.android.gms.cast.framework.ICastStateListener;
import com.google.android.gms.cast.framework.ISessionManager;
import com.google.android.gms.cast.framework.ISessionManagerListener;
import com.google.android.gms.cast.framework.internal.CastContextImpl;
import com.google.android.gms.cast.framework.internal.SessionImpl;
import com.google.android.gms.dynamic.IObjectWrapper;
import com.google.android.gms.dynamic.ObjectWrapper;
import java.util.Set;
import java.util.HashSet;
import java.util.Map;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
public class SessionManagerImpl extends ISessionManager.Stub {
private static final String TAG = SessionManagerImpl.class.getSimpleName();

View File

@ -16,11 +16,11 @@
package com.google.android.gms.cast.media;
import org.microg.gms.cast.CastMediaRouteProvider;
import androidx.mediarouter.media.MediaRouteProvider;
import androidx.mediarouter.media.MediaRouteProviderService;
import org.microg.gms.cast.CastMediaRouteProvider;
public class CastMediaRouteProviderService extends MediaRouteProviderService {
private static final String TAG = CastMediaRouteProviderService.class.getSimpleName();

View File

@ -17,8 +17,6 @@
package com.google.android.gms.chimera.container;
import android.content.Context;
import android.content.ContextWrapper;
import android.content.pm.PackageManager;
import android.os.RemoteException;
import android.util.Log;
@ -26,10 +24,6 @@ import com.google.android.gms.dynamic.IObjectWrapper;
import com.google.android.gms.dynamic.ObjectWrapper;
import com.google.android.gms.dynamite.IDynamiteLoader;
import org.microg.gms.common.Constants;
import java.lang.reflect.Field;
public class DynamiteLoaderImpl extends IDynamiteLoader.Stub {
private static final String TAG = "GmsDynamiteLoaderImpl";

View File

@ -8,9 +8,6 @@ package com.google.android.gms.chimera.container;
import java.util.Collection;
import java.util.Collections;
import static android.content.Context.CONTEXT_IGNORE_SECURITY;
import static android.content.Context.CONTEXT_INCLUDE_CODE;
public class DynamiteModuleInfo {
private Class<?> descriptor;
private String moduleId;

View File

@ -5,8 +5,6 @@
package com.google.android.gms.chimera.container;
import android.util.Log;
import java.util.Collection;
import java.util.HashSet;

View File

@ -18,9 +18,10 @@ package com.google.android.gms.common;
import android.content.pm.PackageManager;
import android.os.RemoteException;
import androidx.annotation.Keep;
import android.util.Log;
import androidx.annotation.Keep;
import com.google.android.gms.common.internal.GoogleCertificatesQuery;
import com.google.android.gms.common.internal.IGoogleCertificatesApi;
import com.google.android.gms.dynamic.IObjectWrapper;

View File

@ -5,6 +5,8 @@
package com.google.android.gms.common.security;
import static com.google.android.gms.security.ProviderInstaller.PROVIDER_NAME;
import android.content.Context;
import android.content.pm.ApplicationInfo;
import android.os.Build;
@ -38,8 +40,6 @@ import java.util.zip.ZipFile;
import javax.net.ssl.HttpsURLConnection;
import javax.net.ssl.SSLContext;
import static com.google.android.gms.security.ProviderInstaller.PROVIDER_NAME;
@Keep
public class ProviderInstallerImpl {
private static final String TAG = "GmsProviderInstaller";

View File

@ -16,7 +16,6 @@
package org.microg.gms;
import android.app.Service;
import android.content.Intent;
import android.os.IBinder;
import android.os.RemoteException;
@ -32,7 +31,6 @@ import org.microg.gms.common.GmsService;
import java.io.FileDescriptor;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.EnumSet;

View File

@ -16,6 +16,12 @@
package org.microg.gms.auth;
import static org.microg.gms.auth.AuthConstants.DEFAULT_ACCOUNT_TYPE;
import static org.microg.gms.auth.AuthConstants.PROVIDER_EXTRA_ACCOUNTS;
import static org.microg.gms.auth.AuthConstants.PROVIDER_EXTRA_CLEAR_PASSWORD;
import static org.microg.gms.auth.AuthConstants.PROVIDER_METHOD_CLEAR_PASSWORD;
import static org.microg.gms.auth.AuthConstants.PROVIDER_METHOD_GET_ACCOUNTS;
import android.Manifest;
import android.accounts.Account;
import android.accounts.AccountManager;
@ -35,12 +41,6 @@ import org.microg.gms.common.PackageUtils;
import java.util.Arrays;
import static org.microg.gms.auth.AuthConstants.DEFAULT_ACCOUNT_TYPE;
import static org.microg.gms.auth.AuthConstants.PROVIDER_EXTRA_ACCOUNTS;
import static org.microg.gms.auth.AuthConstants.PROVIDER_EXTRA_CLEAR_PASSWORD;
import static org.microg.gms.auth.AuthConstants.PROVIDER_METHOD_CLEAR_PASSWORD;
import static org.microg.gms.auth.AuthConstants.PROVIDER_METHOD_GET_ACCOUNTS;
public class AccountContentProvider extends ContentProvider {
private static final String TAG = "GmsAuthProvider";

View File

@ -16,6 +16,10 @@
package org.microg.gms.auth;
import static android.content.pm.ApplicationInfo.FLAG_SYSTEM;
import static android.content.pm.ApplicationInfo.FLAG_UPDATED_SYSTEM_APP;
import static org.microg.gms.auth.AuthPrefs.isTrustGooglePermitted;
import android.accounts.Account;
import android.accounts.AccountManager;
import android.content.Context;
@ -28,10 +32,6 @@ import org.microg.mgms.settings.SettingsContract;
import java.io.IOException;
import static android.content.pm.ApplicationInfo.FLAG_SYSTEM;
import static android.content.pm.ApplicationInfo.FLAG_UPDATED_SYSTEM_APP;
import static org.microg.gms.auth.AuthPrefs.isTrustGooglePermitted;
public class AuthManager {
private static final String TAG = "GmsAuthManager";

View File

@ -16,27 +16,23 @@
package org.microg.gms.auth;
import static android.accounts.AccountManager.KEY_ACCOUNTS;
import static android.accounts.AccountManager.KEY_ACCOUNT_NAME;
import static android.accounts.AccountManager.KEY_ACCOUNT_TYPE;
import static android.accounts.AccountManager.KEY_AUTHTOKEN;
import static android.accounts.AccountManager.KEY_CALLER_PID;
import android.accounts.Account;
import android.accounts.AccountManager;
import android.accounts.AuthenticatorException;
import android.accounts.OperationCanceledException;
import android.annotation.SuppressLint;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.os.Bundle;
import android.os.Parcel;
import android.os.RemoteException;
import android.util.Base64;
import android.util.Log;
import androidx.core.app.NotificationCompat;
import androidx.core.app.NotificationManagerCompat;
import com.google.android.auth.IAuthManagerService;
import com.mgoogle.android.gms.R;
import com.google.android.gms.auth.AccountChangeEventsRequest;
import com.google.android.gms.auth.AccountChangeEventsResponse;
import com.google.android.gms.auth.TokenData;
@ -49,12 +45,6 @@ import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.TimeUnit;
import static android.accounts.AccountManager.KEY_ACCOUNTS;
import static android.accounts.AccountManager.KEY_ACCOUNT_NAME;
import static android.accounts.AccountManager.KEY_ACCOUNT_TYPE;
import static android.accounts.AccountManager.KEY_AUTHTOKEN;
import static android.accounts.AccountManager.KEY_CALLER_PID;
public class AuthManagerServiceImpl extends IAuthManagerService.Stub {
private static final String TAG = "GmsAuthManagerSvc";

View File

@ -16,21 +16,21 @@
package org.microg.gms.auth;
import static org.microg.gms.common.HttpFormClient.RequestContent;
import static org.microg.gms.common.HttpFormClient.RequestHeader;
import android.content.Context;
import org.microg.gms.checkin.LastCheckinInfo;
import org.microg.gms.profile.Build;
import org.microg.gms.common.Constants;
import org.microg.gms.common.HttpFormClient;
import org.microg.gms.common.Utils;
import org.microg.gms.profile.Build;
import org.microg.gms.profile.ProfileManager;
import java.io.IOException;
import java.util.Locale;
import static org.microg.gms.common.HttpFormClient.RequestContent;
import static org.microg.gms.common.HttpFormClient.RequestHeader;
public class AuthRequest extends HttpFormClient.Request {
private static final String SERVICE_URL = "https://android.googleapis.com/auth";
private static final String USER_AGENT = "GoogleAuth/1.4 (%s %s); gzip";

View File

@ -16,12 +16,12 @@
package org.microg.gms.auth;
import static org.microg.gms.common.HttpFormClient.ResponseField;
import android.util.Log;
import java.lang.reflect.Field;
import static org.microg.gms.common.HttpFormClient.ResponseField;
public class AuthResponse {
private static final String TAG = "GmsAuthResponse";

View File

@ -16,12 +16,29 @@
package org.microg.gms.auth.login;
import static android.accounts.AccountManager.PACKAGE_NAME_KEY_LEGACY_NOT_VISIBLE;
import static android.accounts.AccountManager.VISIBILITY_USER_MANAGED_VISIBLE;
import static android.os.Build.VERSION.SDK_INT;
import static android.os.Build.VERSION_CODES.GINGERBREAD_MR1;
import static android.os.Build.VERSION_CODES.HONEYCOMB;
import static android.os.Build.VERSION_CODES.LOLLIPOP;
import static android.telephony.TelephonyManager.SIM_STATE_UNKNOWN;
import static android.view.KeyEvent.KEYCODE_BACK;
import static android.view.View.INVISIBLE;
import static android.view.View.VISIBLE;
import static android.view.inputmethod.InputMethodManager.SHOW_IMPLICIT;
import static org.microg.gms.auth.AuthPrefs.isAuthVisible;
import static org.microg.gms.checkin.CheckinPrefs.hideLauncherIcon;
import static org.microg.gms.checkin.CheckinPrefs.isSpoofingEnabled;
import static org.microg.gms.checkin.CheckinPrefs.setSpoofingEnabled;
import static org.microg.gms.common.Constants.GMS_PACKAGE_NAME;
import static org.microg.gms.common.Constants.GMS_VERSION_CODE;
import android.accounts.Account;
import android.accounts.AccountManager;
import android.annotation.SuppressLint;
import android.annotation.TargetApi;
import android.content.Context;
import android.content.Intent;
import android.graphics.Color;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
@ -43,7 +60,6 @@ import android.widget.RelativeLayout;
import android.widget.TextView;
import androidx.annotation.StringRes;
import androidx.preference.PreferenceManager;
import com.mgoogle.android.gms.R;
@ -52,7 +68,6 @@ import org.microg.gms.auth.AuthConstants;
import org.microg.gms.auth.AuthManager;
import org.microg.gms.auth.AuthRequest;
import org.microg.gms.auth.AuthResponse;
import org.microg.gms.checkin.CheckinClient;
import org.microg.gms.checkin.CheckinManager;
import org.microg.gms.checkin.LastCheckinInfo;
import org.microg.gms.common.HttpFormClient;
@ -63,24 +78,6 @@ import org.microg.gms.ui.UtilsKt;
import java.io.IOException;
import java.util.Locale;
import static android.accounts.AccountManager.PACKAGE_NAME_KEY_LEGACY_NOT_VISIBLE;
import static android.accounts.AccountManager.VISIBILITY_USER_MANAGED_VISIBLE;
import static android.os.Build.VERSION.SDK_INT;
import static android.os.Build.VERSION_CODES.GINGERBREAD_MR1;
import static android.os.Build.VERSION_CODES.HONEYCOMB;
import static android.os.Build.VERSION_CODES.LOLLIPOP;
import static android.telephony.TelephonyManager.SIM_STATE_UNKNOWN;
import static android.view.KeyEvent.KEYCODE_BACK;
import static android.view.View.INVISIBLE;
import static android.view.View.VISIBLE;
import static android.view.inputmethod.InputMethodManager.SHOW_IMPLICIT;
import static org.microg.gms.auth.AuthPrefs.isAuthVisible;
import static org.microg.gms.checkin.CheckinPrefs.hideLauncherIcon;
import static org.microg.gms.checkin.CheckinPrefs.isSpoofingEnabled;
import static org.microg.gms.checkin.CheckinPrefs.setSpoofingEnabled;
import static org.microg.gms.common.Constants.GMS_PACKAGE_NAME;
import static org.microg.gms.common.Constants.GMS_VERSION_CODE;
public class LoginActivity extends AssistantActivity {
public static final String TMPL_NEW_ACCOUNT = "new_account";
public static final String EXTRA_TMPL = "tmpl";

View File

@ -16,6 +16,16 @@
package org.microg.gms.auth.loginservice;
import static android.accounts.AccountManager.KEY_ACCOUNT_AUTHENTICATOR_RESPONSE;
import static android.accounts.AccountManager.KEY_ACCOUNT_NAME;
import static android.accounts.AccountManager.KEY_ACCOUNT_TYPE;
import static android.accounts.AccountManager.KEY_ANDROID_PACKAGE_NAME;
import static android.accounts.AccountManager.KEY_AUTHTOKEN;
import static android.accounts.AccountManager.KEY_BOOLEAN_RESULT;
import static android.accounts.AccountManager.KEY_CALLER_PID;
import static android.accounts.AccountManager.KEY_CALLER_UID;
import static android.accounts.AccountManager.KEY_INTENT;
import android.accounts.AbstractAccountAuthenticator;
import android.accounts.Account;
import android.accounts.AccountAuthenticatorResponse;
@ -24,7 +34,6 @@ import android.accounts.NetworkErrorException;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.util.Base64;
import android.util.Log;
import org.microg.gms.auth.AuthConstants;
@ -36,16 +45,6 @@ import org.microg.gms.common.PackageUtils;
import java.util.Arrays;
import java.util.List;
import static android.accounts.AccountManager.KEY_ACCOUNT_AUTHENTICATOR_RESPONSE;
import static android.accounts.AccountManager.KEY_ACCOUNT_NAME;
import static android.accounts.AccountManager.KEY_ACCOUNT_TYPE;
import static android.accounts.AccountManager.KEY_ANDROID_PACKAGE_NAME;
import static android.accounts.AccountManager.KEY_AUTHTOKEN;
import static android.accounts.AccountManager.KEY_BOOLEAN_RESULT;
import static android.accounts.AccountManager.KEY_CALLER_PID;
import static android.accounts.AccountManager.KEY_CALLER_UID;
import static android.accounts.AccountManager.KEY_INTENT;
class AccountAuthenticator extends AbstractAccountAuthenticator {
private static final String TAG = "GmsAuthenticator";
private final Context context;

View File

@ -16,12 +16,12 @@
package org.microg.gms.auth.loginservice;
import static android.accounts.AccountManager.ACTION_AUTHENTICATOR_INTENT;
import android.app.Service;
import android.content.Intent;
import android.os.IBinder;
import static android.accounts.AccountManager.ACTION_AUTHENTICATOR_INTENT;
public class GoogleLoginService extends Service {
private AccountAuthenticator authenticator;

View File

@ -16,9 +16,6 @@
package org.microg.gms.cast;
import java.io.IOException;
import java.util.ArrayList;
import android.content.Context;
import android.os.Bundle;
import android.os.RemoteException;
@ -35,15 +32,18 @@ import com.google.android.gms.cast.internal.ICastDeviceControllerListener;
import com.google.android.gms.common.api.CommonStatusCodes;
import com.google.android.gms.common.internal.BinderWrapper;
import java.io.IOException;
import java.util.ArrayList;
import su.litvak.chromecast.api.v2.Application;
import su.litvak.chromecast.api.v2.ChromeCast;
import su.litvak.chromecast.api.v2.Namespace;
import su.litvak.chromecast.api.v2.ChromeCastConnectionEventListener;
import su.litvak.chromecast.api.v2.ChromeCastSpontaneousEventListener;
import su.litvak.chromecast.api.v2.ChromeCastRawMessageListener;
import su.litvak.chromecast.api.v2.ChromeCastConnectionEvent;
import su.litvak.chromecast.api.v2.ChromeCastSpontaneousEvent;
import su.litvak.chromecast.api.v2.ChromeCastConnectionEventListener;
import su.litvak.chromecast.api.v2.ChromeCastRawMessage;
import su.litvak.chromecast.api.v2.ChromeCastRawMessageListener;
import su.litvak.chromecast.api.v2.ChromeCastSpontaneousEvent;
import su.litvak.chromecast.api.v2.ChromeCastSpontaneousEventListener;
import su.litvak.chromecast.api.v2.Namespace;
public class CastDeviceControllerImpl extends ICastDeviceController.Stub implements
ChromeCastConnectionEventListener,

View File

@ -16,6 +16,8 @@
package org.microg.gms.checkin;
import static org.microg.gms.checkin.CheckinPrefs.isSpoofingEnabled;
import android.accounts.Account;
import android.accounts.AccountManager;
import android.content.ContentResolver;
@ -32,8 +34,6 @@ import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import static org.microg.gms.checkin.CheckinPrefs.isSpoofingEnabled;
public class CheckinManager {
private static final String TAG = "GmsCheckinManager";
private static final long MIN_CHECKIN_INTERVAL = 3 * 60 * 60 * 1000; // 3 hours

View File

@ -32,12 +32,12 @@ import android.util.Log;
import androidx.legacy.content.WakefulBroadcastReceiver;
import com.mgoogle.android.gms.R;
import com.google.android.gms.checkin.internal.ICheckinService;
import com.mgoogle.android.gms.R;
import org.microg.gms.auth.AuthConstants;
import org.microg.gms.common.ForegroundServiceInfo;
import org.microg.gms.common.ForegroundServiceContext;
import org.microg.gms.common.ForegroundServiceInfo;
import org.microg.gms.gcm.McsService;
import org.microg.gms.people.PeopleManager;

View File

@ -16,6 +16,12 @@
package org.microg.gms.checkin;
import static android.app.PendingIntent.FLAG_UPDATE_CURRENT;
import static android.net.NetworkCapabilities.NET_CAPABILITY_INTERNET;
import static android.os.Build.VERSION.SDK_INT;
import static org.microg.gms.checkin.CheckinService.EXTRA_FORCE_CHECKIN;
import static org.microg.gms.checkin.CheckinService.REGULAR_CHECKIN_INTERVAL;
import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
@ -28,12 +34,6 @@ import androidx.legacy.content.WakefulBroadcastReceiver;
import org.microg.gms.common.ForegroundServiceContext;
import static android.app.PendingIntent.FLAG_UPDATE_CURRENT;
import static android.net.NetworkCapabilities.NET_CAPABILITY_INTERNET;
import static android.os.Build.VERSION.SDK_INT;
import static org.microg.gms.checkin.CheckinService.EXTRA_FORCE_CHECKIN;
import static org.microg.gms.checkin.CheckinService.REGULAR_CHECKIN_INTERVAL;
public class TriggerReceiver extends WakefulBroadcastReceiver {
private static final String TAG = "GmsCheckinTrigger";

View File

@ -16,6 +16,10 @@
package org.microg.gms.common;
import static android.os.Build.VERSION.SDK_INT;
import static org.microg.gms.common.Constants.GMS_PACKAGE_NAME;
import static org.microg.gms.common.Constants.GMS_PACKAGE_SIGNATURE_SHA1;
import android.app.ActivityManager;
import android.app.Application;
import android.app.PendingIntent;
@ -36,10 +40,6 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
import static android.os.Build.VERSION.SDK_INT;
import static org.microg.gms.common.Constants.GMS_PACKAGE_NAME;
import static org.microg.gms.common.Constants.GMS_PACKAGE_SIGNATURE_SHA1;
public class PackageUtils {
private static final String GOOGLE_PLATFORM_KEY = GMS_PACKAGE_SIGNATURE_SHA1;

View File

@ -16,6 +16,8 @@
package org.microg.gms.common;
import static android.content.pm.PackageManager.PERMISSION_GRANTED;
import android.content.Context;
import android.util.Log;
@ -24,8 +26,6 @@ import java.io.IOException;
import java.io.InputStream;
import java.util.Locale;
import static android.content.pm.PackageManager.PERMISSION_GRANTED;
public class Utils {
public static Locale getLocale(Context context) {

View File

@ -16,6 +16,17 @@
package org.microg.gms.gcm;
import static org.microg.gms.gcm.McsConstants.MCS_CLOSE_TAG;
import static org.microg.gms.gcm.McsConstants.MCS_DATA_MESSAGE_STANZA_TAG;
import static org.microg.gms.gcm.McsConstants.MCS_HEARTBEAT_ACK_TAG;
import static org.microg.gms.gcm.McsConstants.MCS_HEARTBEAT_PING_TAG;
import static org.microg.gms.gcm.McsConstants.MCS_IQ_STANZA_TAG;
import static org.microg.gms.gcm.McsConstants.MCS_LOGIN_REQUEST_TAG;
import static org.microg.gms.gcm.McsConstants.MCS_LOGIN_RESPONSE_TAG;
import static org.microg.gms.gcm.McsConstants.MSG_INPUT;
import static org.microg.gms.gcm.McsConstants.MSG_INPUT_ERROR;
import static org.microg.gms.gcm.McsConstants.MSG_TEARDOWN;
import android.os.Handler;
import android.util.Log;
@ -33,17 +44,6 @@ import java.io.Closeable;
import java.io.IOException;
import java.io.InputStream;
import static org.microg.gms.gcm.McsConstants.MCS_CLOSE_TAG;
import static org.microg.gms.gcm.McsConstants.MCS_DATA_MESSAGE_STANZA_TAG;
import static org.microg.gms.gcm.McsConstants.MCS_HEARTBEAT_ACK_TAG;
import static org.microg.gms.gcm.McsConstants.MCS_HEARTBEAT_PING_TAG;
import static org.microg.gms.gcm.McsConstants.MCS_IQ_STANZA_TAG;
import static org.microg.gms.gcm.McsConstants.MCS_LOGIN_REQUEST_TAG;
import static org.microg.gms.gcm.McsConstants.MCS_LOGIN_RESPONSE_TAG;
import static org.microg.gms.gcm.McsConstants.MSG_INPUT;
import static org.microg.gms.gcm.McsConstants.MSG_INPUT_ERROR;
import static org.microg.gms.gcm.McsConstants.MSG_TEARDOWN;
public class McsInputStream extends Thread implements Closeable {
private static final String TAG = "GmsGcmMcsInput";

View File

@ -16,6 +16,13 @@
package org.microg.gms.gcm;
import static org.microg.gms.gcm.McsConstants.MCS_VERSION_CODE;
import static org.microg.gms.gcm.McsConstants.MSG_OUTPUT;
import static org.microg.gms.gcm.McsConstants.MSG_OUTPUT_DONE;
import static org.microg.gms.gcm.McsConstants.MSG_OUTPUT_ERROR;
import static org.microg.gms.gcm.McsConstants.MSG_OUTPUT_READY;
import static org.microg.gms.gcm.McsConstants.MSG_TEARDOWN;
import android.os.Handler;
import android.os.Looper;
import android.util.Log;
@ -26,13 +33,6 @@ import java.io.Closeable;
import java.io.IOException;
import java.io.OutputStream;
import static org.microg.gms.gcm.McsConstants.MCS_VERSION_CODE;
import static org.microg.gms.gcm.McsConstants.MSG_OUTPUT;
import static org.microg.gms.gcm.McsConstants.MSG_OUTPUT_DONE;
import static org.microg.gms.gcm.McsConstants.MSG_OUTPUT_ERROR;
import static org.microg.gms.gcm.McsConstants.MSG_OUTPUT_READY;
import static org.microg.gms.gcm.McsConstants.MSG_TEARDOWN;
public class McsOutputStream extends Thread implements Handler.Callback, Closeable {
private static final String TAG = "GmsGcmMcsOutput";

View File

@ -16,6 +16,44 @@
package org.microg.gms.gcm;
import static android.app.AlarmManager.ELAPSED_REALTIME_WAKEUP;
import static android.os.Build.VERSION.SDK_INT;
import static org.microg.gms.common.PackageUtils.warnIfNotPersistentProcess;
import static org.microg.gms.gcm.GcmConstants.ACTION_C2DM_RECEIVE;
import static org.microg.gms.gcm.GcmConstants.EXTRA_APP;
import static org.microg.gms.gcm.GcmConstants.EXTRA_APP_OVERRIDE;
import static org.microg.gms.gcm.GcmConstants.EXTRA_COLLAPSE_KEY;
import static org.microg.gms.gcm.GcmConstants.EXTRA_FROM;
import static org.microg.gms.gcm.GcmConstants.EXTRA_MESSAGE_ID;
import static org.microg.gms.gcm.GcmConstants.EXTRA_MESSENGER;
import static org.microg.gms.gcm.GcmConstants.EXTRA_REGISTRATION_ID;
import static org.microg.gms.gcm.GcmConstants.EXTRA_SEND_FROM;
import static org.microg.gms.gcm.GcmConstants.EXTRA_SEND_TO;
import static org.microg.gms.gcm.GcmConstants.EXTRA_TTL;
import static org.microg.gms.gcm.McsConstants.ACTION_ACK;
import static org.microg.gms.gcm.McsConstants.ACTION_CONNECT;
import static org.microg.gms.gcm.McsConstants.ACTION_HEARTBEAT;
import static org.microg.gms.gcm.McsConstants.ACTION_RECONNECT;
import static org.microg.gms.gcm.McsConstants.ACTION_SEND;
import static org.microg.gms.gcm.McsConstants.EXTRA_REASON;
import static org.microg.gms.gcm.McsConstants.MCS_CLOSE_TAG;
import static org.microg.gms.gcm.McsConstants.MCS_DATA_MESSAGE_STANZA_TAG;
import static org.microg.gms.gcm.McsConstants.MCS_HEARTBEAT_ACK_TAG;
import static org.microg.gms.gcm.McsConstants.MCS_HEARTBEAT_PING_TAG;
import static org.microg.gms.gcm.McsConstants.MCS_IQ_STANZA_TAG;
import static org.microg.gms.gcm.McsConstants.MCS_LOGIN_REQUEST_TAG;
import static org.microg.gms.gcm.McsConstants.MCS_LOGIN_RESPONSE_TAG;
import static org.microg.gms.gcm.McsConstants.MSG_ACK;
import static org.microg.gms.gcm.McsConstants.MSG_CONNECT;
import static org.microg.gms.gcm.McsConstants.MSG_HEARTBEAT;
import static org.microg.gms.gcm.McsConstants.MSG_INPUT;
import static org.microg.gms.gcm.McsConstants.MSG_INPUT_ERROR;
import static org.microg.gms.gcm.McsConstants.MSG_OUTPUT;
import static org.microg.gms.gcm.McsConstants.MSG_OUTPUT_DONE;
import static org.microg.gms.gcm.McsConstants.MSG_OUTPUT_ERROR;
import static org.microg.gms.gcm.McsConstants.MSG_OUTPUT_READY;
import static org.microg.gms.gcm.McsConstants.MSG_TEARDOWN;
import android.app.AlarmManager;
import android.app.PendingIntent;
import android.app.Service;
@ -73,44 +111,6 @@ import javax.net.ssl.SSLContext;
import okio.ByteString;
import static android.app.AlarmManager.ELAPSED_REALTIME_WAKEUP;
import static android.os.Build.VERSION.SDK_INT;
import static org.microg.gms.common.PackageUtils.warnIfNotPersistentProcess;
import static org.microg.gms.gcm.GcmConstants.ACTION_C2DM_RECEIVE;
import static org.microg.gms.gcm.GcmConstants.EXTRA_APP;
import static org.microg.gms.gcm.GcmConstants.EXTRA_APP_OVERRIDE;
import static org.microg.gms.gcm.GcmConstants.EXTRA_COLLAPSE_KEY;
import static org.microg.gms.gcm.GcmConstants.EXTRA_FROM;
import static org.microg.gms.gcm.GcmConstants.EXTRA_MESSAGE_ID;
import static org.microg.gms.gcm.GcmConstants.EXTRA_MESSENGER;
import static org.microg.gms.gcm.GcmConstants.EXTRA_REGISTRATION_ID;
import static org.microg.gms.gcm.GcmConstants.EXTRA_SEND_FROM;
import static org.microg.gms.gcm.GcmConstants.EXTRA_SEND_TO;
import static org.microg.gms.gcm.GcmConstants.EXTRA_TTL;
import static org.microg.gms.gcm.McsConstants.ACTION_ACK;
import static org.microg.gms.gcm.McsConstants.ACTION_CONNECT;
import static org.microg.gms.gcm.McsConstants.ACTION_HEARTBEAT;
import static org.microg.gms.gcm.McsConstants.ACTION_RECONNECT;
import static org.microg.gms.gcm.McsConstants.ACTION_SEND;
import static org.microg.gms.gcm.McsConstants.EXTRA_REASON;
import static org.microg.gms.gcm.McsConstants.MCS_CLOSE_TAG;
import static org.microg.gms.gcm.McsConstants.MCS_DATA_MESSAGE_STANZA_TAG;
import static org.microg.gms.gcm.McsConstants.MCS_HEARTBEAT_ACK_TAG;
import static org.microg.gms.gcm.McsConstants.MCS_HEARTBEAT_PING_TAG;
import static org.microg.gms.gcm.McsConstants.MCS_IQ_STANZA_TAG;
import static org.microg.gms.gcm.McsConstants.MCS_LOGIN_REQUEST_TAG;
import static org.microg.gms.gcm.McsConstants.MCS_LOGIN_RESPONSE_TAG;
import static org.microg.gms.gcm.McsConstants.MSG_ACK;
import static org.microg.gms.gcm.McsConstants.MSG_CONNECT;
import static org.microg.gms.gcm.McsConstants.MSG_HEARTBEAT;
import static org.microg.gms.gcm.McsConstants.MSG_INPUT;
import static org.microg.gms.gcm.McsConstants.MSG_INPUT_ERROR;
import static org.microg.gms.gcm.McsConstants.MSG_OUTPUT;
import static org.microg.gms.gcm.McsConstants.MSG_OUTPUT_DONE;
import static org.microg.gms.gcm.McsConstants.MSG_OUTPUT_ERROR;
import static org.microg.gms.gcm.McsConstants.MSG_OUTPUT_READY;
import static org.microg.gms.gcm.McsConstants.MSG_TEARDOWN;
@ForegroundServiceInfo(value = "Cloud messaging", res = R.string.service_name_mcs)
public class McsService extends Service implements Handler.Callback {
private static final String TAG = "GmsGcmMcsSvc";

View File

@ -16,6 +16,12 @@
package org.microg.gms.gcm;
import static org.microg.gms.gcm.GcmConstants.ERROR_SERVICE_NOT_AVAILABLE;
import static org.microg.gms.gcm.GcmConstants.EXTRA_ERROR;
import static org.microg.gms.gcm.GcmConstants.EXTRA_REGISTRATION_ID;
import static org.microg.gms.gcm.GcmConstants.EXTRA_RETRY_AFTER;
import static org.microg.gms.gcm.GcmConstants.EXTRA_UNREGISTERED;
import android.content.Context;
import android.os.Bundle;
import android.util.Log;
@ -23,16 +29,9 @@ import android.util.Log;
import org.microg.gms.checkin.LastCheckinInfo;
import org.microg.gms.common.HttpFormClient;
import org.microg.gms.common.PackageUtils;
import org.microg.gms.common.Utils;
import java.io.IOException;
import static org.microg.gms.gcm.GcmConstants.ERROR_SERVICE_NOT_AVAILABLE;
import static org.microg.gms.gcm.GcmConstants.EXTRA_ERROR;
import static org.microg.gms.gcm.GcmConstants.EXTRA_REGISTRATION_ID;
import static org.microg.gms.gcm.GcmConstants.EXTRA_RETRY_AFTER;
import static org.microg.gms.gcm.GcmConstants.EXTRA_UNREGISTERED;
public class PushRegisterManager {
private static final String TAG = "GmsGcmRegisterMgr";

View File

@ -16,8 +16,11 @@
package org.microg.gms.gcm;
import android.content.Context;
import static org.microg.gms.common.HttpFormClient.RequestContent;
import static org.microg.gms.common.HttpFormClient.RequestContentDynamic;
import static org.microg.gms.common.HttpFormClient.RequestHeader;
import android.content.Context;
import android.os.Bundle;
import android.text.TextUtils;
@ -30,10 +33,6 @@ import java.io.IOException;
import java.util.LinkedHashMap;
import java.util.Map;
import static org.microg.gms.common.HttpFormClient.RequestContent;
import static org.microg.gms.common.HttpFormClient.RequestContentDynamic;
import static org.microg.gms.common.HttpFormClient.RequestHeader;
public class RegisterRequest extends HttpFormClient.Request {
private static final String SERVICE_URL = "https://android.clients.google.com/c2dm/register3";
private static final String USER_AGENT = "Android-GCM/1.5 (%s %s)";

View File

@ -16,11 +16,11 @@
package org.microg.gms.gcm;
import static org.microg.gms.common.HttpFormClient.ResponseField;
import org.microg.gms.common.HttpFormClient.ResponseHeader;
import org.microg.gms.common.HttpFormClient.ResponseStatusText;
import static org.microg.gms.common.HttpFormClient.ResponseField;
public class RegisterResponse {
@ResponseField("token")
public String token;

View File

@ -16,6 +16,8 @@
package org.microg.gms.gcm;
import static org.microg.gms.gcm.McsConstants.ACTION_SEND;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
@ -23,8 +25,6 @@ import android.util.Log;
import androidx.legacy.content.WakefulBroadcastReceiver;
import static org.microg.gms.gcm.McsConstants.ACTION_SEND;
public class SendReceiver extends WakefulBroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {

View File

@ -16,6 +16,12 @@
package org.microg.gms.gcm;
import static android.os.Build.VERSION.SDK_INT;
import static android.os.Build.VERSION_CODES.N;
import static org.microg.gms.gcm.McsConstants.ACTION_CONNECT;
import static org.microg.gms.gcm.McsConstants.ACTION_HEARTBEAT;
import static org.microg.gms.gcm.McsConstants.EXTRA_REASON;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
@ -29,12 +35,6 @@ import org.microg.gms.checkin.CheckinPrefs;
import org.microg.gms.checkin.LastCheckinInfo;
import org.microg.gms.common.ForegroundServiceContext;
import static android.os.Build.VERSION.SDK_INT;
import static android.os.Build.VERSION_CODES.N;
import static org.microg.gms.gcm.McsConstants.ACTION_CONNECT;
import static org.microg.gms.gcm.McsConstants.ACTION_HEARTBEAT;
import static org.microg.gms.gcm.McsConstants.EXTRA_REASON;
public class TriggerReceiver extends WakefulBroadcastReceiver {
private static final String TAG = "GmsGcmTrigger";
public static final String FORCE_TRY_RECONNECT = "org.microg.gms.gcm.FORCE_TRY_RECONNECT";

View File

@ -1,5 +1,11 @@
package org.microg.gms.gcm;
import static android.content.Intent.ACTION_PACKAGE_DATA_CLEARED;
import static android.content.Intent.ACTION_PACKAGE_FULLY_REMOVED;
import static android.content.Intent.ACTION_PACKAGE_REMOVED;
import static android.content.Intent.EXTRA_DATA_REMOVED;
import static android.content.Intent.EXTRA_REPLACING;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
@ -7,12 +13,6 @@ import android.util.Log;
import java.util.List;
import static android.content.Intent.ACTION_PACKAGE_REMOVED;
import static android.content.Intent.ACTION_PACKAGE_DATA_CLEARED;
import static android.content.Intent.ACTION_PACKAGE_FULLY_REMOVED;
import static android.content.Intent.EXTRA_DATA_REMOVED;
import static android.content.Intent.EXTRA_REPLACING;
public class UnregisterReceiver extends BroadcastReceiver {
private static final String TAG = "GmsGcmUnregisterRcvr";

View File

@ -18,16 +18,12 @@ package org.microg.gms.gservices;
import android.content.ContentProvider;
import android.content.ContentValues;
import android.content.Intent;
import android.database.Cursor;
import android.database.MatrixCursor;
import android.net.Uri;
import android.os.Build;
import android.util.Log;
import org.microg.gms.checkin.CheckinPrefs;
import org.microg.gms.gcm.GcmPrefs;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;

View File

@ -16,6 +16,12 @@
package org.microg.gms.location;
import static android.Manifest.permission.ACCESS_COARSE_LOCATION;
import static android.Manifest.permission.ACCESS_FINE_LOCATION;
import static android.content.pm.PackageManager.PERMISSION_GRANTED;
import static android.location.LocationManager.GPS_PROVIDER;
import static com.google.android.gms.location.LocationRequest.PRIORITY_HIGH_ACCURACY;
import android.Manifest;
import android.app.PendingIntent;
import android.content.Context;
@ -27,6 +33,8 @@ import android.os.Looper;
import android.os.RemoteException;
import android.util.Log;
import androidx.lifecycle.Lifecycle;
import com.google.android.gms.common.api.Status;
import com.google.android.gms.location.ILocationListener;
import com.google.android.gms.location.LocationRequest;
@ -40,15 +48,6 @@ import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.List;
import static android.Manifest.permission.ACCESS_COARSE_LOCATION;
import static android.Manifest.permission.ACCESS_FINE_LOCATION;
import static android.content.pm.PackageManager.PERMISSION_GRANTED;
import static android.location.LocationManager.GPS_PROVIDER;
import static com.google.android.gms.location.LocationRequest.PRIORITY_HIGH_ACCURACY;
import static com.google.android.gms.location.LocationRequest.PRIORITY_NO_POWER;
import androidx.lifecycle.Lifecycle;
public class GoogleLocationManager implements LocationChangeListener {
private static final String TAG = "LocationManager";
private static final String MOCK_PROVIDER = "mock";

View File

@ -17,9 +17,7 @@
package org.microg.gms.location;
import android.os.RemoteException;
import android.util.Log;
import com.google.android.gms.common.Feature;
import com.google.android.gms.common.internal.GetServiceRequest;
import com.google.android.gms.common.internal.IGmsCallbacks;

View File

@ -16,6 +16,9 @@
package org.microg.gms.location;
import static android.Manifest.permission.ACCESS_COARSE_LOCATION;
import static android.Manifest.permission.ACCESS_FINE_LOCATION;
import android.annotation.TargetApi;
import android.app.AppOpsManager;
import android.app.PendingIntent;
@ -37,9 +40,6 @@ import com.google.android.gms.location.internal.LocationRequestUpdateData;
import java.util.Arrays;
import java.util.UUID;
import static android.Manifest.permission.ACCESS_COARSE_LOCATION;
import static android.Manifest.permission.ACCESS_FINE_LOCATION;
public class LocationRequestHelper {
public static final String TAG = "GmsLocRequestHelper";
private final Context context;

View File

@ -16,11 +16,11 @@
package org.microg.gms.location;
import static org.microg.gms.location.LocationConstants.KEY_MOCK_LOCATION;
import android.location.Location;
import android.os.Bundle;
import static org.microg.gms.location.LocationConstants.KEY_MOCK_LOCATION;
public class MockLocationProvider {
private boolean mockEnabled = false;
private Location mockLocation = null;

View File

@ -20,9 +20,9 @@ import android.os.Parcel;
import android.os.RemoteException;
import android.util.Log;
import com.google.android.gms.clearcut.internal.PlayLoggerContext;
import com.google.android.gms.playlog.internal.IPlayLogService;
import com.google.android.gms.playlog.internal.LogEvent;
import com.google.android.gms.clearcut.internal.PlayLoggerContext;
import java.util.List;

View File

@ -16,6 +16,11 @@
package org.microg.gms.ui;
import static android.accounts.AccountManager.PACKAGE_NAME_KEY_LEGACY_NOT_VISIBLE;
import static android.accounts.AccountManager.VISIBILITY_USER_MANAGED_NOT_VISIBLE;
import static android.accounts.AccountManager.VISIBILITY_USER_MANAGED_VISIBLE;
import static org.microg.gms.auth.AuthManager.PREF_AUTH_VISIBLE;
import android.accounts.Account;
import android.accounts.AccountManager;
import android.os.Build;
@ -31,11 +36,6 @@ import org.microg.gms.auth.AuthConstants;
import org.microg.tools.ui.AbstractSettingsActivity;
import org.microg.tools.ui.ResourceSettingsFragment;
import static android.accounts.AccountManager.PACKAGE_NAME_KEY_LEGACY_NOT_VISIBLE;
import static android.accounts.AccountManager.VISIBILITY_USER_MANAGED_NOT_VISIBLE;
import static android.accounts.AccountManager.VISIBILITY_USER_MANAGED_VISIBLE;
import static org.microg.gms.auth.AuthManager.PREF_AUTH_VISIBLE;
public class AccountSettingsActivity extends AbstractSettingsActivity {
@Override

View File

@ -20,7 +20,6 @@ import androidx.fragment.app.Fragment;
import com.mgoogle.android.gms.R;
//import org.microg.nlp.Preferences;
import org.microg.tools.ui.AbstractDashboardActivity;
public class SettingsDashboardActivity extends AbstractDashboardActivity {

View File

@ -17,7 +17,6 @@ import com.android.volley.VolleyError
import com.android.volley.toolbox.Volley
import com.mgoogle.android.gms.BuildConfig
import kotlinx.coroutines.CompletableDeferred
import kotlinx.coroutines.runBlocking
import kotlinx.coroutines.sync.Mutex
import kotlinx.coroutines.sync.withLock
import okio.ByteString.Companion.of

View File

@ -7,7 +7,6 @@ package org.microg.gms.chimera
import android.content.ContentProvider
import android.content.ContentValues
import android.content.Context
import android.content.Intent
import android.database.Cursor
import android.database.MatrixCursor
@ -17,7 +16,6 @@ import android.util.Log
import androidx.core.os.bundleOf
import org.microg.gms.DummyService
import org.microg.gms.common.GmsService
import org.microg.gms.common.RemoteListenerProxy
class ServiceProvider : ContentProvider() {

View File

@ -5,7 +5,6 @@
package org.microg.gms.clearcut
import android.os.Parcel
import android.os.RemoteException
import androidx.lifecycle.Lifecycle
import androidx.lifecycle.LifecycleOwner
import androidx.lifecycle.lifecycleScope

View File

@ -2,7 +2,8 @@ package org.microg.gms.gcm
import android.content.Context
import android.content.Intent
import android.net.*
import android.net.ConnectivityManager
import android.net.NetworkInfo
import android.util.Log
import org.microg.gms.gcm.TriggerReceiver.FORCE_TRY_RECONNECT
import org.microg.mgms.settings.SettingsContract

View File

@ -6,7 +6,6 @@
package org.microg.gms.gcm
import android.app.Activity
import android.app.PendingIntent
import android.content.Context
import android.content.Intent
@ -22,7 +21,6 @@ import org.microg.gms.checkin.CheckinService
import org.microg.gms.checkin.LastCheckinInfo
import org.microg.gms.common.ForegroundServiceContext
import org.microg.gms.common.PackageUtils
import org.microg.gms.common.Utils
import org.microg.gms.gcm.GcmConstants.*
import java.util.concurrent.atomic.AtomicBoolean
import kotlin.coroutines.resume

View File

@ -6,9 +6,6 @@
package org.microg.gms.profile
import android.annotation.TargetApi
import android.content.Context
import android.os.Build
import kotlin.random.Random
object Build {
@JvmField

View File

@ -9,9 +9,9 @@ import android.annotation.SuppressLint
import android.content.Context
import android.content.res.XmlResourceParser
import android.util.Log
import org.microg.gms.utils.FileXmlResourceParser
import org.microg.mgms.settings.SettingsContract
import org.microg.mgms.settings.SettingsContract.Profile
import org.microg.gms.utils.FileXmlResourceParser
import org.xmlpull.v1.XmlPullParser
import java.io.File
import java.util.*

View File

@ -9,9 +9,10 @@ import androidx.lifecycle.lifecycleScope
import androidx.preference.ListPreference
import androidx.preference.Preference
import androidx.preference.PreferenceFragmentCompat
import androidx.preference.TwoStatePreference
import com.mgoogle.android.gms.R
import org.microg.gms.gcm.*
import org.microg.gms.gcm.GcmPrefs
import org.microg.gms.gcm.getGcmServiceInfo
import org.microg.gms.gcm.setGcmServiceConfiguration
class PushNotificationAdvancedFragment : PreferenceFragmentCompat() {
private lateinit var networkMobile: ListPreference

View File

@ -9,16 +9,12 @@ import android.content.ComponentName
import android.content.Context
import android.content.pm.PackageManager
import android.os.Bundle
import androidx.lifecycle.lifecycleScope
import androidx.navigation.fragment.findNavController
import androidx.preference.Preference
import androidx.preference.SwitchPreferenceCompat
import com.google.android.gms.cast.media.CastMediaRouteProviderService
import com.mgoogle.android.gms.R
import org.microg.gms.checkin.CheckinClient
import org.microg.gms.checkin.CheckinPrefs
import org.microg.gms.gcm.GcmDatabase
import org.microg.gms.gcm.McsService
import org.microg.gms.gcm.getGcmServiceInfo
import org.microg.mgms.settings.SettingsContract
import org.microg.tools.ui.ResourceSettingsFragment

View File

@ -7,7 +7,6 @@ package org.microg.gms.ui
import android.content.Context
import android.util.AttributeSet
import android.util.TypedValue
import android.view.Gravity
import android.view.ViewGroup.LayoutParams.MATCH_PARENT
import android.widget.LinearLayout

View File

@ -17,10 +17,10 @@ import android.net.Uri
import android.preference.PreferenceManager
import org.microg.gms.common.PackageUtils.warnIfNotMainProcess
import org.microg.gms.gcm.GcmPrefs
import org.microg.mgms.settings.SettingsContract.Profile
import org.microg.mgms.settings.SettingsContract.Auth
import org.microg.mgms.settings.SettingsContract.CheckIn
import org.microg.mgms.settings.SettingsContract.Gcm
import org.microg.mgms.settings.SettingsContract.Profile
import org.microg.mgms.settings.SettingsContract.getAuthority
import java.io.File

View File

@ -1,4 +1,4 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android" xmlns:aapt="http://schemas.android.com/aapt"
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:viewportWidth="256"
android:viewportHeight="256"
android:width="256dp"

View File

@ -5,7 +5,6 @@
-->
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools">
<data>

View File

@ -5,8 +5,7 @@
-->
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools">
xmlns:app="http://schemas.android.com/apk/res-auto">
<data>

View File

@ -5,7 +5,6 @@
-->
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:title="Push notifications">
<PreferenceCategory

View File

@ -3,8 +3,7 @@
~ SPDX-FileCopyrightText: 2021, microG Project Team
~ SPDX-License-Identifier: Apache-2.0
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.microg.gms.net.core">
<manifest package="org.microg.gms.net.core">
<application>
</application>

View File

@ -16,6 +16,9 @@
package com.google.android.gms.iid;
import static android.os.Build.VERSION.SDK_INT;
import static android.os.Build.VERSION_CODES.LOLLIPOP;
import android.os.Binder;
import android.os.Handler;
import android.os.IBinder;
@ -25,9 +28,6 @@ import android.os.Parcel;
import android.os.Parcelable;
import android.os.RemoteException;
import static android.os.Build.VERSION.SDK_INT;
import static android.os.Build.VERSION_CODES.LOLLIPOP;
public class MessengerCompat implements Parcelable {
private Messenger messenger;
private IMessengerCompat messengerCompat;

View File

@ -7,7 +7,6 @@ package com.google.android.gms.location;
import org.microg.gms.common.PublicApi;
import org.microg.safeparcel.AutoSafeParcelable;
import org.microg.safeparcel.SafeParceled;
import java.util.ArrayList;
import java.util.Collection;

View File

@ -19,7 +19,6 @@ package com.google.android.gms.location.internal;
import com.google.android.gms.location.LocationRequest;
import org.microg.safeparcel.AutoSafeParcelable;
import org.microg.safeparcel.SafeParceled;
import java.util.List;

View File

@ -22,7 +22,6 @@ import android.location.Location;
import android.os.Looper;
import com.google.android.gms.common.api.GoogleApiClient;
import com.google.android.gms.common.api.PendingResult;
import org.microg.gms.common.ForwardConnectionCallbacks;
import org.microg.gms.common.ForwardConnectionFailedListener;

View File

@ -21,9 +21,9 @@ import android.os.Looper;
import com.google.android.gms.common.api.Api.ApiOptions.NoOptions;
import org.microg.gms.common.api.ApiClient;
import org.microg.gms.common.api.ApiClientBuilder;
import org.microg.gms.common.api.ApiClientSettings;
import org.microg.gms.common.api.ApiClient;
import org.microg.gms.common.api.ConnectionCallbacks;
import org.microg.gms.common.api.OnConnectionFailedListener;

View File

@ -18,7 +18,6 @@ package org.microg.gms.location;
import android.app.PendingIntent;
import android.os.RemoteException;
import android.util.Log;
import com.google.android.gms.common.api.GoogleApiClient;
import com.google.android.gms.common.api.PendingResult;

View File

@ -21,9 +21,9 @@ import android.os.Looper;
import com.google.android.gms.common.api.Api.ApiOptions.NoOptions;
import org.microg.gms.common.api.ApiClient;
import org.microg.gms.common.api.ApiClientBuilder;
import org.microg.gms.common.api.ApiClientSettings;
import org.microg.gms.common.api.ApiClient;
import org.microg.gms.common.api.ConnectionCallbacks;
import org.microg.gms.common.api.OnConnectionFailedListener;

View File

@ -16,6 +16,9 @@
package org.microg.gms.location;
import static android.location.LocationManager.KEY_LOCATION_CHANGED;
import static android.location.LocationManager.KEY_PROXIMITY_ENTERING;
import android.app.PendingIntent;
import android.content.BroadcastReceiver;
import android.content.Context;
@ -45,9 +48,6 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
import static android.location.LocationManager.KEY_LOCATION_CHANGED;
import static android.location.LocationManager.KEY_PROXIMITY_ENTERING;
@SuppressWarnings("MissingPermission")
public class NativeLocationClientImpl {
private final static String TAG = "GmsToNativeLocClient";

View File

@ -5,6 +5,8 @@
package org.microg.gms.tasks;
import static com.google.android.gms.tasks.TaskExecutors.MAIN_THREAD;
import android.app.Activity;
import com.google.android.gms.tasks.Continuation;
@ -22,8 +24,6 @@ import java.util.concurrent.CancellationException;
import java.util.concurrent.Executor;
import java.util.concurrent.LinkedBlockingQueue;
import static com.google.android.gms.tasks.TaskExecutors.MAIN_THREAD;
public class TaskImpl<TResult> extends Task<TResult> {
private final Object lock = new Object();
private boolean completed;