mirror of
https://github.com/TeamVanced/VancedMicroG
synced 2024-11-18 18:19:26 +01:00
Merge pull request #7 from Mattis6666/master
Write readme, remove unnecessary MicroG settings ui elements
This commit is contained in:
commit
b25b177c61
33
README.md
33
README.md
@ -1,24 +1,19 @@
|
||||
<img src="http://i.imgur.com/hXY4lcC.png" height="42px" alt="microG" /> Services Core (GmsCore)
|
||||
=======
|
||||
[![Build Status](https://travis-ci.org/microg/android_packages_apps_GmsCore.svg?branch=master)](https://travis-ci.org/microg/android_packages_apps_GmsCore)
|
||||
# Vanced MicroG
|
||||
|
||||
[![Build Status](https://travis-ci.org/YTVanced/VancedMicroG.svg?branch=master)](https://travis-ci.com/github/YTVanced/VancedMicroG)
|
||||
|
||||
microG GmsCore is a FLOSS (Free/Libre Open Source Software) framework to allow applications designed for Google Play Services to run on systems, where Play Services is not available.
|
||||
|
||||
### Please refer to the [wiki](https://github.com/microg/android_packages_apps_GmsCore/wiki) for downloads and instructions
|
||||
This fork tweaks MicroG to be usable by applications that require Google authentication such as Youtube Vanced.
|
||||
|
||||
## Notable changes
|
||||
|
||||
License
|
||||
-------
|
||||
Copyright 2013-2019 microG 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.
|
||||
- No longer a system app
|
||||
- Package name changed from `com.google.android.gms` to `com.mgoogle.android.gms` to support installation alongside the official MicroG
|
||||
- Removed unnecessary features:
|
||||
- Maps & Location
|
||||
- Wear-Api
|
||||
- Safetynet
|
||||
- Games
|
||||
- Car
|
||||
- Removed all permissions, as none are required for Google authentication
|
||||
|
@ -197,38 +197,6 @@
|
||||
</intent-filter>
|
||||
</service>
|
||||
|
||||
<!-- Car -->
|
||||
|
||||
<service android:name="org.microg.gms.car.CarService">
|
||||
<intent-filter>
|
||||
<action android:name="com.google.android.gms.car.service.START" />
|
||||
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
</intent-filter>
|
||||
</service>
|
||||
|
||||
<!-- People -->
|
||||
|
||||
<service android:name="org.microg.gms.people.PeopleService">
|
||||
<intent-filter>
|
||||
<action android:name="com.google.android.gms.people.service.START" />
|
||||
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
</intent-filter>
|
||||
</service>
|
||||
|
||||
<service
|
||||
android:name="org.microg.gms.people.ContactSyncService"
|
||||
android:exported="false">
|
||||
<intent-filter>
|
||||
<action android:name="android.content.SyncAdapter" />
|
||||
</intent-filter>
|
||||
<meta-data
|
||||
android:name="android.content.SyncAdapter"
|
||||
android:resource="@xml/contact_syncadapter" />
|
||||
</service>
|
||||
|
||||
|
||||
<!-- Auth -->
|
||||
|
||||
<service android:name="org.microg.gms.auth.loginservice.GoogleLoginService">
|
||||
@ -295,24 +263,6 @@
|
||||
android:authorities="com.mgoogle.android.gms.auth.accounts"
|
||||
android:exported="true" />
|
||||
|
||||
<!-- Games -->
|
||||
|
||||
<service android:name="org.microg.gms.games.GamesStubService">
|
||||
<intent-filter>
|
||||
<action android:name="com.google.android.gms.games.service.START" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
</intent-filter>
|
||||
</service>
|
||||
|
||||
<activity
|
||||
android:name="org.microg.gms.games.UpgradeActivity"
|
||||
android:theme="@style/Theme.AppCompat.DayNight.Dialog">
|
||||
<intent-filter>
|
||||
<action android:name="com.google.android.gms.games.PLAY_GAMES_UPGRADE" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
|
||||
<!-- Cast -->
|
||||
|
||||
<service android:name="com.google.android.gms.cast.media.CastMediaRouteProviderService">
|
||||
@ -321,12 +271,6 @@
|
||||
</intent-filter>
|
||||
</service>
|
||||
|
||||
<!-- Chimera spoof -->
|
||||
<provider
|
||||
android:name="org.microg.gms.ChimeraSpoofProvider"
|
||||
android:authorities="com.mgoogle.android.gms.chimera"
|
||||
android:exported="true" />
|
||||
|
||||
<!-- microG custom UI -->
|
||||
|
||||
<!-- microG Settings shown in Launcher -->
|
||||
@ -477,60 +421,18 @@
|
||||
android:name="com.google.android.gms.gcm.http.GoogleHttpService"
|
||||
android:exported="true" />
|
||||
|
||||
<service android:name="org.microg.gms.ads.GService">
|
||||
<intent-filter>
|
||||
<action android:name="com.google.android.gms.ads.gservice.START" />
|
||||
</intent-filter>
|
||||
</service>
|
||||
<service android:name="org.microg.gms.feedback.FeedbackService">
|
||||
<intent-filter>
|
||||
<action android:name="com.google.android.gms.feedback.internal.IFeedbackService" />
|
||||
</intent-filter>
|
||||
</service>
|
||||
<service android:name="org.microg.gms.ads.AdvertisingIdService">
|
||||
<intent-filter>
|
||||
<action android:name="com.google.android.gms.ads.identifier.service.START" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
</intent-filter>
|
||||
</service>
|
||||
<service android:name="org.microg.gms.clearcut.ClearcutLoggerService">
|
||||
<intent-filter>
|
||||
<action android:name="com.google.android.gms.clearcut.service.START" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
</intent-filter>
|
||||
</service>
|
||||
<service android:name="org.microg.gms.drive.api.DriveApiService">
|
||||
<intent-filter>
|
||||
<action android:name="com.google.android.gms.drive.ApiService.START" />
|
||||
<action android:name="com.google.android.gms.drive.ApiService.STOP" />
|
||||
<action android:name="com.google.android.gms.drive.ApiService.RESET_AFTER_BOOT" />
|
||||
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
</intent-filter>
|
||||
</service>
|
||||
<service android:name="org.microg.gms.auth.SignInService">
|
||||
<intent-filter>
|
||||
<action android:name="com.google.android.gms.signin.service.START" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
</intent-filter>
|
||||
</service>
|
||||
<service android:name="org.microg.gms.reminders.RemindersService">
|
||||
<intent-filter>
|
||||
<action android:name="com.google.android.gms.reminders.service.START" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
</intent-filter>
|
||||
</service>
|
||||
|
||||
<service android:name="org.microg.gms.wallet.PaymentService">
|
||||
<intent-filter>
|
||||
<action android:name="com.google.android.gms.wallet.service.BIND" />
|
||||
</intent-filter>
|
||||
</service>
|
||||
<service android:name="org.microg.gms.tapandpay.TapAndPayService">
|
||||
<intent-filter>
|
||||
<action android:name="com.google.android.gms.tapandpay.service.BIND" />
|
||||
</intent-filter>
|
||||
</service>
|
||||
|
||||
<service android:name="org.microg.gms.cast.CastDeviceControllerService">
|
||||
<intent-filter>
|
||||
|
@ -1,22 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2013-2017 microG 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 com.google.android.gms.ads;
|
||||
|
||||
import android.app.Activity;
|
||||
|
||||
public class AdActivity extends Activity {
|
||||
}
|
@ -1,20 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2013-2017 microG 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 com.google.android.gms.ads;
|
||||
|
||||
public class AdManagerCreatorImpl extends AdManagerCreator.Stub {
|
||||
}
|
@ -1,72 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2013-2017 microG 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 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;
|
||||
|
||||
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;
|
||||
|
||||
public class DynamiteLoaderImpl extends IDynamiteLoader.Stub {
|
||||
private static final String TAG = "GmsDynamiteLoaderImpl";
|
||||
|
||||
@Override
|
||||
public IObjectWrapper createModuleContext(IObjectWrapper wrappedContext, String moduleId, int minVersion) throws RemoteException {
|
||||
Log.d(TAG, "unimplemented Method: createModuleContext for " + moduleId + " at version " + minVersion + ", returning gms context");
|
||||
final Context context = (Context) ObjectWrapper.unwrap(wrappedContext);
|
||||
try {
|
||||
return ObjectWrapper.wrap(new ContextWrapper(context.createPackageContext(Constants.GMS_PACKAGE_NAME, Context.CONTEXT_INCLUDE_CODE | Context.CONTEXT_IGNORE_SECURITY)) {
|
||||
@Override
|
||||
public Context getApplicationContext() {
|
||||
return context;
|
||||
}
|
||||
});
|
||||
} catch (PackageManager.NameNotFoundException e) {
|
||||
Log.w(TAG, "returning null instead", e);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getModuleVersion(IObjectWrapper context, String moduleId) throws RemoteException {
|
||||
return getModuleVersion2(context, moduleId, true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getModuleVersion2(IObjectWrapper context, String moduleId, boolean updateConfigIfRequired) throws RemoteException {
|
||||
if (moduleId.equals("com.google.android.gms.firebase_database")) {
|
||||
Log.d(TAG, "returning temp fix module version for " + moduleId + ". Firebase Database will not be functional!");
|
||||
return com.google.android.gms.dynamite.descriptors.com.google.android.gms.firebase_database.ModuleDescriptor.MODULE_VERSION;
|
||||
}
|
||||
if (moduleId.equals("com.google.android.gms.googlecertificates")) {
|
||||
return com.google.android.gms.dynamite.descriptors.com.google.android.gms.googlecertificates.ModuleDescriptor.MODULE_VERSION;
|
||||
}
|
||||
if (moduleId.equals("com.google.android.gms.cast.framework.dynamite")) {
|
||||
Log.d(TAG, "returning temp fix module version for " + moduleId + ". Cast API wil not be functional!");
|
||||
return 1;
|
||||
}
|
||||
Log.d(TAG, "unimplemented Method: getModuleVersion for " + moduleId);
|
||||
return 0;
|
||||
}
|
||||
}
|
@ -1,40 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2013-2017 microG 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 com.google.android.gms.plus.plusone;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.RemoteException;
|
||||
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.auth.AuthConstants;
|
||||
import org.microg.gms.plus.PlusOneButtonImpl;
|
||||
|
||||
public class PlusOneButtonCreatorImpl extends IPlusOneButtonCreator.Stub {
|
||||
@Override
|
||||
public IObjectWrapper create(IObjectWrapper context, int size, int annotation, String url, int activityRequestCode) throws RemoteException {
|
||||
Context ctx = (Context) ObjectWrapper.unwrap(context);
|
||||
return ObjectWrapper.wrap(new PlusOneButtonImpl(ctx, size, annotation, url, AuthConstants.DEFAULT_ACCOUNT));
|
||||
}
|
||||
|
||||
@Override
|
||||
public IObjectWrapper createForAccount(IObjectWrapper context, int size, int annotation, String url, String account) throws RemoteException {
|
||||
Context ctx = (Context) ObjectWrapper.unwrap(context);
|
||||
return ObjectWrapper.wrap(new PlusOneButtonImpl(ctx, size, annotation, url, account));
|
||||
}
|
||||
}
|
@ -1,20 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2013-2017 microG 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 com.google.android.gms.wallet.dynamite;
|
||||
|
||||
public class WalletDynamiteCreatorImpl {
|
||||
}
|
@ -1,28 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2013-2017 microG 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.ads;
|
||||
|
||||
import android.app.Service;
|
||||
import android.content.Intent;
|
||||
import android.os.IBinder;
|
||||
|
||||
public class AdvertisingIdService extends Service {
|
||||
@Override
|
||||
public IBinder onBind(Intent intent) {
|
||||
return new AdvertisingIdServiceImpl().asBinder();
|
||||
}
|
||||
}
|
@ -1,45 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2013-2017 microG 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.ads;
|
||||
|
||||
import android.os.RemoteException;
|
||||
|
||||
import com.google.android.gms.ads.identifier.internal.IAdvertisingIdService;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
public class AdvertisingIdServiceImpl extends IAdvertisingIdService.Stub {
|
||||
@Override
|
||||
public String getAdvertisingId() throws RemoteException {
|
||||
return generateAdvertisingId(null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isAdTrackingLimited(boolean defaultHint) throws RemoteException {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String generateAdvertisingId(String packageName) throws RemoteException {
|
||||
return UUID.randomUUID().toString();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setAdTrackingLimited(String packageName, boolean limited) throws RemoteException {
|
||||
// Ignored, sorry :)
|
||||
}
|
||||
}
|
@ -1,35 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2013-2017 microG 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.ads;
|
||||
|
||||
import com.google.android.gms.common.internal.GetServiceRequest;
|
||||
import com.google.android.gms.common.internal.IGmsCallbacks;
|
||||
|
||||
import org.microg.gms.BaseService;
|
||||
import org.microg.gms.common.GmsService;
|
||||
|
||||
public class GService extends BaseService {
|
||||
|
||||
public GService() {
|
||||
super("GmsAdsGSvc", GmsService.GSERVICES, GmsService.ADREQUEST);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handleServiceRequest(IGmsCallbacks callback, GetServiceRequest request, GmsService service) {
|
||||
// TODO
|
||||
}
|
||||
}
|
@ -1,34 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2013-2017 microG 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.car;
|
||||
|
||||
import com.google.android.gms.common.internal.GetServiceRequest;
|
||||
import com.google.android.gms.common.internal.IGmsCallbacks;
|
||||
|
||||
import org.microg.gms.BaseService;
|
||||
import org.microg.gms.common.GmsService;
|
||||
|
||||
public class CarService extends BaseService {
|
||||
public CarService() {
|
||||
super("GmsCarSvc", GmsService.CAR);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handleServiceRequest(IGmsCallbacks callback, GetServiceRequest request, GmsService service) {
|
||||
// TODO
|
||||
}
|
||||
}
|
@ -1,38 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2013-2017 microG 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.drive.api;
|
||||
|
||||
import android.os.RemoteException;
|
||||
|
||||
import com.google.android.gms.common.internal.GetServiceRequest;
|
||||
import com.google.android.gms.common.internal.IGmsCallbacks;
|
||||
|
||||
import org.microg.gms.BaseService;
|
||||
import org.microg.gms.common.GmsService;
|
||||
|
||||
public class DriveApiService extends BaseService {
|
||||
private DriveServiceImpl impl = new DriveServiceImpl();
|
||||
|
||||
public DriveApiService() {
|
||||
super("GmsDriveApiSvc", GmsService.DRIVE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handleServiceRequest(IGmsCallbacks callback, GetServiceRequest request, GmsService service) throws RemoteException {
|
||||
callback.onPostInitComplete(0, impl.asBinder(), null);
|
||||
}
|
||||
}
|
@ -1,318 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2013-2017 microG 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.drive.api;
|
||||
|
||||
import android.content.IntentSender;
|
||||
import android.os.RemoteException;
|
||||
import android.util.Log;
|
||||
|
||||
import com.google.android.gms.drive.internal.AddEventListenerRequest;
|
||||
import com.google.android.gms.drive.internal.AddPermissionRequest;
|
||||
import com.google.android.gms.drive.internal.AuthorizeAccessRequest;
|
||||
import com.google.android.gms.drive.internal.CancelPendingActionsRequest;
|
||||
import com.google.android.gms.drive.internal.ChangeResourceParentsRequest;
|
||||
import com.google.android.gms.drive.internal.CheckResourceIdsExistRequest;
|
||||
import com.google.android.gms.drive.internal.CloseContentsAndUpdateMetadataRequest;
|
||||
import com.google.android.gms.drive.internal.CloseContentsRequest;
|
||||
import com.google.android.gms.drive.internal.ControlProgressRequest;
|
||||
import com.google.android.gms.drive.internal.CreateContentsRequest;
|
||||
import com.google.android.gms.drive.internal.CreateFileIntentSenderRequest;
|
||||
import com.google.android.gms.drive.internal.CreateFileRequest;
|
||||
import com.google.android.gms.drive.internal.CreateFolderRequest;
|
||||
import com.google.android.gms.drive.internal.DeleteResourceRequest;
|
||||
import com.google.android.gms.drive.internal.DisconnectRequest;
|
||||
import com.google.android.gms.drive.internal.DriveServiceResponse;
|
||||
import com.google.android.gms.drive.internal.FetchThumbnailRequest;
|
||||
import com.google.android.gms.drive.internal.GetChangesRequest;
|
||||
import com.google.android.gms.drive.internal.GetDriveIdFromUniqueIdRequest;
|
||||
import com.google.android.gms.drive.internal.GetMetadataRequest;
|
||||
import com.google.android.gms.drive.internal.GetPermissionsRequest;
|
||||
import com.google.android.gms.drive.internal.IDriveService;
|
||||
import com.google.android.gms.drive.internal.IDriveServiceCallbacks;
|
||||
import com.google.android.gms.drive.internal.IEventCallback;
|
||||
import com.google.android.gms.drive.internal.ListParentsRequest;
|
||||
import com.google.android.gms.drive.internal.LoadRealtimeRequest;
|
||||
import com.google.android.gms.drive.internal.OpenContentsRequest;
|
||||
import com.google.android.gms.drive.internal.OpenFileIntentSenderRequest;
|
||||
import com.google.android.gms.drive.internal.RealtimeDocumentSyncRequest;
|
||||
import com.google.android.gms.drive.internal.RemoveEventListenerRequest;
|
||||
import com.google.android.gms.drive.internal.RemovePermissionRequest;
|
||||
import com.google.android.gms.drive.internal.SetDrivePreferencesRequest;
|
||||
import com.google.android.gms.drive.internal.SetFileUploadPreferencesRequest;
|
||||
import com.google.android.gms.drive.internal.SetResourceParentsRequest;
|
||||
import com.google.android.gms.drive.internal.StreamContentsRequest;
|
||||
import com.google.android.gms.drive.internal.TrashResourceRequest;
|
||||
import com.google.android.gms.drive.internal.UnsubscribeResourceRequest;
|
||||
import com.google.android.gms.drive.internal.UntrashResourceRequest;
|
||||
import com.google.android.gms.drive.internal.UpdateMetadataRequest;
|
||||
import com.google.android.gms.drive.internal.UpdatePermissionRequest;
|
||||
|
||||
public class DriveServiceImpl extends IDriveService.Stub {
|
||||
private static final String TAG = "GmsDriveSvcImpl";
|
||||
|
||||
@Override
|
||||
public void getMetadata(GetMetadataRequest request, IDriveServiceCallbacks callbacks) throws RemoteException {
|
||||
Log.d(TAG, "unimplemented Method: getMetadata");
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateMetadata(UpdateMetadataRequest request, IDriveServiceCallbacks callbacks) throws RemoteException {
|
||||
Log.d(TAG, "unimplemented Method: updateMetadata");
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void createContents(CreateContentsRequest request, IDriveServiceCallbacks callbacks) throws RemoteException {
|
||||
Log.d(TAG, "unimplemented Method: createContents");
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void createFile(CreateFileRequest request, IDriveServiceCallbacks callbacks) throws RemoteException {
|
||||
Log.d(TAG, "unimplemented Method: createFile");
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void createFolder(CreateFolderRequest request, IDriveServiceCallbacks callbacks) throws RemoteException {
|
||||
Log.d(TAG, "unimplemented Method: createFolder");
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public DriveServiceResponse openContents(OpenContentsRequest request, IDriveServiceCallbacks callbacks) throws RemoteException {
|
||||
Log.d(TAG, "unimplemented Method: openContents");
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void closeContents(CloseContentsRequest request, IDriveServiceCallbacks callbacks) throws RemoteException {
|
||||
Log.d(TAG, "unimplemented Method: closeContents");
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void requestSync(IDriveServiceCallbacks callbacks) throws RemoteException {
|
||||
Log.d(TAG, "unimplemented Method: requestSync");
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public IntentSender openFileIntentSender(OpenFileIntentSenderRequest request) throws RemoteException {
|
||||
Log.d(TAG, "unimplemented Method: openFileIntentSender");
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IntentSender createFileIntentSender(CreateFileIntentSenderRequest request) throws RemoteException {
|
||||
Log.d(TAG, "unimplemented Method: createFileIntentSender");
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void authorizeAccess(AuthorizeAccessRequest request, IDriveServiceCallbacks callbacks) throws RemoteException {
|
||||
Log.d(TAG, "unimplemented Method: authorizeAccess");
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void listParents(ListParentsRequest request, IDriveServiceCallbacks callbacks) throws RemoteException {
|
||||
Log.d(TAG, "unimplemented Method: listParents");
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addEventListener(AddEventListenerRequest request, IEventCallback callback, String unused, IDriveServiceCallbacks callbacks) throws RemoteException {
|
||||
Log.d(TAG, "unimplemented Method: addEventListener");
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeEventListener(RemoveEventListenerRequest request, IEventCallback callback, String unused, IDriveServiceCallbacks callbacks) throws RemoteException {
|
||||
Log.d(TAG, "unimplemented Method: removeEventListener");
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void disconnect(DisconnectRequest request) throws RemoteException {
|
||||
Log.d(TAG, "unimplemented Method: disconnect");
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void trashResource(TrashResourceRequest request, IDriveServiceCallbacks callbacks) throws RemoteException {
|
||||
Log.d(TAG, "unimplemented Method: trashResource");
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void closeContentsAndUpdateMetadata(CloseContentsAndUpdateMetadataRequest request, IDriveServiceCallbacks callbacks) throws RemoteException {
|
||||
Log.d(TAG, "unimplemented Method: closeContentsAndUpdateMetadata");
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteResource(DeleteResourceRequest request, IDriveServiceCallbacks callbacks) throws RemoteException {
|
||||
Log.d(TAG, "unimplemented Method: deleteResource");
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadRealtime(LoadRealtimeRequest request, IDriveServiceCallbacks callbacks) throws RemoteException {
|
||||
Log.d(TAG, "unimplemented Method: loadRealtime");
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setResourceParents(SetResourceParentsRequest request, IDriveServiceCallbacks callbacks) throws RemoteException {
|
||||
Log.d(TAG, "unimplemented Method: setResourceParents");
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getDriveIdFromUniqueId(GetDriveIdFromUniqueIdRequest request, IDriveServiceCallbacks callbacks) throws RemoteException {
|
||||
Log.d(TAG, "unimplemented Method: getDriveIdFromUniqueId");
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void checkResourceIdsExist(CheckResourceIdsExistRequest request, IDriveServiceCallbacks callbacks) throws RemoteException {
|
||||
Log.d(TAG, "unimplemented Method: checkResourceIdsExist");
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void completePendingAction(IDriveServiceCallbacks callbacks) throws RemoteException {
|
||||
Log.d(TAG, "unimplemented Method: completePendingAction");
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getDrivePreferences(IDriveServiceCallbacks callbacks) throws RemoteException {
|
||||
Log.d(TAG, "unimplemented Method: getDrivePreferences");
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setDrivePreferences(SetDrivePreferencesRequest request, IDriveServiceCallbacks callbacks) throws RemoteException {
|
||||
Log.d(TAG, "unimplemented Method: setDrivePreferences");
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void realtimeDocumentSync(RealtimeDocumentSyncRequest request, IDriveServiceCallbacks callbacks) throws RemoteException {
|
||||
Log.d(TAG, "unimplemented Method: realtimeDocumentSync");
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getDeviceUsagePreferences(IDriveServiceCallbacks callbacks) throws RemoteException {
|
||||
Log.d(TAG, "unimplemented Method: getDeviceUsagePreferences");
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFileUploadPreferences(SetFileUploadPreferencesRequest request, IDriveServiceCallbacks callbacks) throws RemoteException {
|
||||
Log.d(TAG, "unimplemented Method: setFileUploadPreferences");
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void cancelPendingActions(CancelPendingActionsRequest request, IDriveServiceCallbacks callbacks) throws RemoteException {
|
||||
Log.d(TAG, "unimplemented Method: cancelPendingActions");
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void untrashResource(UntrashResourceRequest request, IDriveServiceCallbacks callbacks) throws RemoteException {
|
||||
Log.d(TAG, "unimplemented Method: untrashResource");
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void isAutoBackupEnabled(IDriveServiceCallbacks callbacks) throws RemoteException {
|
||||
Log.d(TAG, "unimplemented Method: isAutoBackupEnabled");
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fetchThumbnail(FetchThumbnailRequest request, IDriveServiceCallbacks callbacks) throws RemoteException {
|
||||
Log.d(TAG, "unimplemented Method: fetchThumbnail");
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getChanges(GetChangesRequest request, IDriveServiceCallbacks callbacks) throws RemoteException {
|
||||
Log.d(TAG, "unimplemented Method: getChanges");
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void unsubscribeResource(UnsubscribeResourceRequest request, IDriveServiceCallbacks callbacks) throws RemoteException {
|
||||
Log.d(TAG, "unimplemented Method: unsubscribeResource");
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getPermissions(GetPermissionsRequest request, IDriveServiceCallbacks callbacks) throws RemoteException {
|
||||
Log.d(TAG, "unimplemented Method: getPermissions");
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addPermission(AddPermissionRequest request, IDriveServiceCallbacks callbacks) throws RemoteException {
|
||||
Log.d(TAG, "unimplemented Method: addPermission");
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updatePermission(UpdatePermissionRequest request, IDriveServiceCallbacks callbacks) throws RemoteException {
|
||||
Log.d(TAG, "unimplemented Method: updatePermission");
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removePermission(RemovePermissionRequest request, IDriveServiceCallbacks callbacks) throws RemoteException {
|
||||
Log.d(TAG, "unimplemented Method: removePermission");
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeQueryResultListener(IEventCallback callback, IDriveServiceCallbacks callbacks) throws RemoteException {
|
||||
Log.d(TAG, "unimplemented Method: removeQueryResultListener");
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void controlProgress(ControlProgressRequest request, IDriveServiceCallbacks callbacks) throws RemoteException {
|
||||
Log.d(TAG, "unimplemented Method: controlProgress");
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void changeResourceParents(ChangeResourceParentsRequest request, IDriveServiceCallbacks callbacks) throws RemoteException {
|
||||
Log.d(TAG, "unimplemented Method: changeResourceParents");
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public DriveServiceResponse streamContents(StreamContentsRequest request, IDriveServiceCallbacks callbacks) throws RemoteException {
|
||||
Log.d(TAG, "unimplemented Method: streamContents");
|
||||
return null;
|
||||
}
|
||||
}
|
@ -1,34 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2013-2017 microG 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.feedback;
|
||||
|
||||
import com.google.android.gms.common.internal.GetServiceRequest;
|
||||
import com.google.android.gms.common.internal.IGmsCallbacks;
|
||||
|
||||
import org.microg.gms.BaseService;
|
||||
import org.microg.gms.common.GmsService;
|
||||
|
||||
public class FeedbackService extends BaseService {
|
||||
public FeedbackService() {
|
||||
super("GmsFeedbackSvc", GmsService.FEEDBACK);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handleServiceRequest(IGmsCallbacks callback, GetServiceRequest request, GmsService service) {
|
||||
// TODO
|
||||
}
|
||||
}
|
@ -1,58 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2013-2017 microG 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.games;
|
||||
|
||||
import android.app.PendingIntent;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.os.RemoteException;
|
||||
|
||||
import com.google.android.gms.common.api.CommonStatusCodes;
|
||||
import com.google.android.gms.common.internal.GetServiceRequest;
|
||||
import com.google.android.gms.common.internal.IGmsCallbacks;
|
||||
|
||||
import org.microg.gms.BaseService;
|
||||
import org.microg.gms.common.GmsService;
|
||||
|
||||
import static android.app.PendingIntent.FLAG_UPDATE_CURRENT;
|
||||
import static org.microg.gms.common.Constants.GMS_PACKAGE_NAME;
|
||||
import static org.microg.gms.games.UpgradeActivity.ACTION_PLAY_GAMES_UPGRADE;
|
||||
import static org.microg.gms.games.UpgradeActivity.EXTRA_GAME_PACACKE_NAME;
|
||||
|
||||
public class GamesStubService extends BaseService {
|
||||
|
||||
public static final String PARAM_GAME_PACKAGE_NAME = "com.google.android.gms.games.key.gamePackageName";
|
||||
|
||||
public GamesStubService() {
|
||||
super("GmsGamesSvc", GmsService.GAMES);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handleServiceRequest(IGmsCallbacks callback, GetServiceRequest request, GmsService service) throws RemoteException {
|
||||
String packageName = null;
|
||||
if (request.extras != null) {
|
||||
packageName = request.extras.getString(PARAM_GAME_PACKAGE_NAME);
|
||||
}
|
||||
if (packageName == null) packageName = GMS_PACKAGE_NAME;
|
||||
Intent intent = new Intent(ACTION_PLAY_GAMES_UPGRADE);
|
||||
intent.setPackage(GMS_PACKAGE_NAME);
|
||||
intent.putExtra(EXTRA_GAME_PACACKE_NAME, packageName);
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putParcelable("pendingIntent", PendingIntent.getActivity(this, packageName.hashCode(), intent, FLAG_UPDATE_CURRENT));
|
||||
callback.onPostInitComplete(CommonStatusCodes.RESOLUTION_REQUIRED, null, bundle);
|
||||
}
|
||||
}
|
@ -1,73 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2013-2017 microG 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.games;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.pm.ApplicationInfo;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.view.WindowManager;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.mgoogle.android.gms.R;
|
||||
|
||||
public class UpgradeActivity extends Activity {
|
||||
public static final String ACTION_PLAY_GAMES_UPGRADE = "com.google.android.gms.games.PLAY_GAMES_UPGRADE";
|
||||
public static final String EXTRA_GAME_PACACKE_NAME = "com.google.android.gms.games.GAME_PACKAGE_NAME";
|
||||
|
||||
private static final String TAG = "GmsUpgActivity";
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.games_info);
|
||||
|
||||
WindowManager.LayoutParams lp = new WindowManager.LayoutParams();
|
||||
lp.copyFrom(getWindow().getAttributes());
|
||||
lp.width = WindowManager.LayoutParams.MATCH_PARENT;
|
||||
lp.height = WindowManager.LayoutParams.WRAP_CONTENT;
|
||||
getWindow().setAttributes(lp);
|
||||
|
||||
String packageName = getIntent().getStringExtra(EXTRA_GAME_PACACKE_NAME);
|
||||
|
||||
// receive package info
|
||||
PackageManager packageManager = getPackageManager();
|
||||
ApplicationInfo applicationInfo;
|
||||
try {
|
||||
applicationInfo = packageManager.getApplicationInfo(packageName, 0);
|
||||
} catch (PackageManager.NameNotFoundException e) {
|
||||
Log.w(TAG, e);
|
||||
finish();
|
||||
return;
|
||||
}
|
||||
CharSequence appLabel = packageManager.getApplicationLabel(applicationInfo);
|
||||
Drawable appIcon = packageManager.getApplicationIcon(applicationInfo);
|
||||
|
||||
((ImageView) findViewById(R.id.app_icon)).setImageDrawable(appIcon);
|
||||
((TextView) findViewById(R.id.title)).setText(getString(R.string.games_info_title, appLabel));
|
||||
findViewById(android.R.id.button1).setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
finish();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
@ -1,39 +1,39 @@
|
||||
/*
|
||||
* Copyright (C) 2018 microG 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.
|
||||
*/
|
||||
/*
|
||||
* Copyright (C) 2018 microG 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.measurement;
|
||||
package org.microg.gms.measurement;
|
||||
|
||||
import android.os.RemoteException;
|
||||
import android.util.Log;
|
||||
import android.os.RemoteException;
|
||||
import android.util.Log;
|
||||
|
||||
import com.google.android.gms.common.api.CommonStatusCodes;
|
||||
import com.google.android.gms.common.api.Status;
|
||||
import com.google.android.gms.common.internal.GetServiceRequest;
|
||||
import com.google.android.gms.common.internal.IGmsCallbacks;
|
||||
import com.google.android.gms.common.api.CommonStatusCodes;
|
||||
import com.google.android.gms.common.api.Status;
|
||||
import com.google.android.gms.common.internal.GetServiceRequest;
|
||||
import com.google.android.gms.common.internal.IGmsCallbacks;
|
||||
|
||||
import org.microg.gms.BaseService;
|
||||
import org.microg.gms.common.GmsService;
|
||||
import org.microg.gms.BaseService;
|
||||
import org.microg.gms.common.GmsService;
|
||||
|
||||
public class MeasurementBrokerService extends BaseService {
|
||||
public MeasurementBrokerService() {
|
||||
super("GmsMeasureBrokerSvc", GmsService.MEASUREMENT);
|
||||
}
|
||||
public class MeasurementBrokerService extends BaseService {
|
||||
public MeasurementBrokerService() {
|
||||
super("GmsMeasureBrokerSvc", GmsService.MEASUREMENT);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handleServiceRequest(IGmsCallbacks callback, GetServiceRequest request, GmsService service) throws RemoteException {
|
||||
callback.onPostInitComplete(CommonStatusCodes.SUCCESS, new MeasurementServiceImpl().asBinder(), null);
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public void handleServiceRequest(IGmsCallbacks callback, GetServiceRequest request, GmsService service) throws RemoteException {
|
||||
callback.onPostInitComplete(CommonStatusCodes.SUCCESS, new MeasurementServiceImpl().asBinder(), null);
|
||||
}
|
||||
}
|
||||
|
@ -1,34 +1,34 @@
|
||||
/*
|
||||
* Copyright (C) 2018 microG 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.
|
||||
*/
|
||||
/*
|
||||
* Copyright (C) 2018 microG 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.measurement;
|
||||
package org.microg.gms.measurement;
|
||||
|
||||
import android.os.Parcel;
|
||||
import android.os.RemoteException;
|
||||
import android.util.Log;
|
||||
import android.os.Parcel;
|
||||
import android.os.RemoteException;
|
||||
import android.util.Log;
|
||||
|
||||
import com.google.android.gms.measurement.internal.IMeasurementService;
|
||||
import com.google.android.gms.measurement.internal.IMeasurementService;
|
||||
|
||||
public class MeasurementServiceImpl extends IMeasurementService.Stub {
|
||||
private static final String TAG = "GmsMeasureSvcImpl";
|
||||
public class MeasurementServiceImpl extends IMeasurementService.Stub {
|
||||
private static final String TAG = "GmsMeasureSvcImpl";
|
||||
|
||||
@Override
|
||||
public boolean onTransact(int code, Parcel data, Parcel reply, int flags) throws RemoteException {
|
||||
if (super.onTransact(code, data, reply, flags)) return true;
|
||||
Log.d(TAG, "onTransact [unknown]: " + code + ", " + data + ", " + flags);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public boolean onTransact(int code, Parcel data, Parcel reply, int flags) throws RemoteException {
|
||||
if (super.onTransact(code, data, reply, flags)) return true;
|
||||
Log.d(TAG, "onTransact [unknown]: " + code + ", " + data + ", " + flags);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -52,9 +52,7 @@ public class PeopleServiceImpl extends IPeopleService.Stub {
|
||||
@Override
|
||||
public void loadOwners(final IPeopleCallbacks callbacks, boolean var2, boolean var3, final String accountName, String var5, int sortOrder) {
|
||||
Log.d(TAG, "loadOwners: " + var2 + ", " + var3 + ", " + accountName + ", " + var5 + ", " + sortOrder);
|
||||
if (context.checkCallingPermission(Manifest.permission.READ_CONTACTS) != PackageManager.PERMISSION_GRANTED) {
|
||||
PackageUtils.assertExtendedAccess(context);
|
||||
}
|
||||
|
||||
AccountManager accountManager = AccountManager.get(context);
|
||||
Bundle accountMetadata = new Bundle();
|
||||
String accountType = AuthConstants.DEFAULT_ACCOUNT_TYPE;
|
||||
|
@ -1,36 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2013-2017 microG 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.places;
|
||||
|
||||
import android.os.RemoteException;
|
||||
|
||||
import com.google.android.gms.common.internal.GetServiceRequest;
|
||||
import com.google.android.gms.common.internal.IGmsCallbacks;
|
||||
|
||||
import org.microg.gms.BaseService;
|
||||
import org.microg.gms.common.GmsService;
|
||||
|
||||
public class GeoDataService extends BaseService {
|
||||
public GeoDataService() {
|
||||
super("GmsPlcGeoSvc", GmsService.GEODATA);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handleServiceRequest(IGmsCallbacks callback, GetServiceRequest request, GmsService service) throws RemoteException {
|
||||
callback.onPostInitComplete(0, new PlacesServiceImpl().asBinder(), null);
|
||||
}
|
||||
}
|
@ -1,37 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2013-2017 microG 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.places;
|
||||
|
||||
import android.os.RemoteException;
|
||||
import android.util.Log;
|
||||
|
||||
import com.google.android.gms.common.internal.GetServiceRequest;
|
||||
import com.google.android.gms.common.internal.IGmsCallbacks;
|
||||
|
||||
import org.microg.gms.BaseService;
|
||||
import org.microg.gms.common.GmsService;
|
||||
|
||||
public class PlaceDetectionService extends BaseService {
|
||||
public PlaceDetectionService() {
|
||||
super("GmsPlcDtctSvc", GmsService.PLACE_DETECTION);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handleServiceRequest(IGmsCallbacks callback, GetServiceRequest request, GmsService service) throws RemoteException {
|
||||
callback.onPostInitComplete(0, new PlaceDetectionServiceImpl().asBinder(), null);
|
||||
}
|
||||
}
|
@ -1,34 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2013-2017 microG 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.places;
|
||||
|
||||
import android.os.Parcel;
|
||||
import android.os.RemoteException;
|
||||
import android.util.Log;
|
||||
|
||||
import com.google.android.gms.location.places.internal.IGooglePlaceDetectionService;
|
||||
|
||||
public class PlaceDetectionServiceImpl extends IGooglePlaceDetectionService.Stub{
|
||||
private static final String TAG = "GmsPlcDtctSvcImpl";
|
||||
|
||||
@Override
|
||||
public boolean onTransact(int code, Parcel data, Parcel reply, int flags) throws RemoteException {
|
||||
if (super.onTransact(code, data, reply, flags)) return true;
|
||||
Log.d(TAG, "onTransact [unknown]: " + code + ", " + data + ", " + flags);
|
||||
return false;
|
||||
}
|
||||
}
|
@ -1,34 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2013-2017 microG 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.places;
|
||||
|
||||
import android.os.Parcel;
|
||||
import android.os.RemoteException;
|
||||
import android.util.Log;
|
||||
|
||||
import com.google.android.gms.location.places.internal.IGooglePlacesService;
|
||||
|
||||
public class PlacesServiceImpl extends IGooglePlacesService.Stub {
|
||||
private static final String TAG = "GmsPlcSvcImpl";
|
||||
|
||||
@Override
|
||||
public boolean onTransact(int code, Parcel data, Parcel reply, int flags) throws RemoteException {
|
||||
if (super.onTransact(code, data, reply, flags)) return true;
|
||||
Log.d(TAG, "onTransact [unknown]: " + code + ", " + data + ", " + flags);
|
||||
return false;
|
||||
}
|
||||
}
|
@ -1,27 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2013-2017 microG 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.plus;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.View;
|
||||
|
||||
public class PlusOneButtonImpl extends View {
|
||||
public PlusOneButtonImpl(Context context, int size, int annotation, String url,
|
||||
String account) {
|
||||
super(context);
|
||||
}
|
||||
}
|
@ -1,37 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2013-2017 microG 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.reminders;
|
||||
|
||||
import android.os.RemoteException;
|
||||
|
||||
import com.google.android.gms.common.internal.GetServiceRequest;
|
||||
import com.google.android.gms.common.internal.IGmsCallbacks;
|
||||
|
||||
import org.microg.gms.BaseService;
|
||||
import org.microg.gms.common.GmsService;
|
||||
|
||||
public class RemindersService extends BaseService {
|
||||
|
||||
public RemindersService() {
|
||||
super("GmsRemindSvc", GmsService.REMINDERS);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handleServiceRequest(IGmsCallbacks callback, GetServiceRequest request, GmsService service) throws RemoteException {
|
||||
callback.onPostInitComplete(0, new RemindersServiceImpl(), null);
|
||||
}
|
||||
}
|
@ -1,169 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2013-2017 microG 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.reminders;
|
||||
|
||||
import android.os.RemoteException;
|
||||
import android.util.Log;
|
||||
|
||||
import com.google.android.gms.reminders.AccountState;
|
||||
import com.google.android.gms.reminders.CreateReminderOptionsInternal;
|
||||
import com.google.android.gms.reminders.LoadRemindersOptions;
|
||||
import com.google.android.gms.reminders.ReindexDueDatesOptions;
|
||||
import com.google.android.gms.reminders.UpdateRecurrenceOptions;
|
||||
import com.google.android.gms.reminders.internal.IRemindersCallbacks;
|
||||
import com.google.android.gms.reminders.internal.IRemindersService;
|
||||
import com.google.android.gms.reminders.model.CustomizedSnoozePresetEntity;
|
||||
import com.google.android.gms.reminders.model.TaskEntity;
|
||||
import com.google.android.gms.reminders.model.TaskIdEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class RemindersServiceImpl extends IRemindersService.Stub {
|
||||
private static final String TAG = RemindersServiceImpl.class.getSimpleName();
|
||||
|
||||
@Override
|
||||
public void loadReminders(IRemindersCallbacks callbacks, LoadRemindersOptions options) throws RemoteException {
|
||||
Log.d(TAG, "unimplemented Method: loadReminders");
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addListener(IRemindersCallbacks callbacks) throws RemoteException {
|
||||
Log.d(TAG, "unimplemented Method: addListener");
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void createReminder(IRemindersCallbacks callbacks, TaskEntity task) throws RemoteException {
|
||||
Log.d(TAG, "unimplemented Method: createReminder");
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateReminder(IRemindersCallbacks callbacks, TaskEntity task) throws RemoteException {
|
||||
Log.d(TAG, "unimplemented Method: updateReminder");
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteReminder(IRemindersCallbacks callbacks, TaskIdEntity taskId) throws RemoteException {
|
||||
Log.d(TAG, "unimplemented Method: deleteReminder");
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void bumpReminder(IRemindersCallbacks callbacks, TaskIdEntity taskId) throws RemoteException {
|
||||
Log.d(TAG, "unimplemented Method: bumpReminder");
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void hasUpcomingReminders(IRemindersCallbacks callbacks) throws RemoteException {
|
||||
Log.d(TAG, "unimplemented Method: hasUpcomingReminders");
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void createRecurrence(IRemindersCallbacks callbacks, TaskEntity task) throws RemoteException {
|
||||
Log.d(TAG, "unimplemented Method: createRecurrence");
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateRecurrence(IRemindersCallbacks callbacks, String s1, TaskEntity task, UpdateRecurrenceOptions options) throws RemoteException {
|
||||
Log.d(TAG, "unimplemented Method: updateRecurrence");
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteRecurrence(IRemindersCallbacks callbacks, String s1, UpdateRecurrenceOptions options) throws RemoteException {
|
||||
Log.d(TAG, "unimplemented Method: deleteRecurrence");
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void changeRecurrence(IRemindersCallbacks callbacks, String s1, TaskEntity task, UpdateRecurrenceOptions options) throws RemoteException {
|
||||
Log.d(TAG, "unimplemented Method: changeRecurrence");
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void makeTaskRecurring(IRemindersCallbacks callbacks, TaskEntity task) throws RemoteException {
|
||||
Log.d(TAG, "unimplemented Method: makeTaskRecurring");
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void makeRecurrenceSingleInstance(IRemindersCallbacks callbacks, String s1, TaskEntity task, UpdateRecurrenceOptions options) throws RemoteException {
|
||||
Log.d(TAG, "unimplemented Method: makeRecurrenceSingleInstance");
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void clearListeners() throws RemoteException {
|
||||
Log.d(TAG, "unimplemented Method: clearListeners");
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void batchUpdateReminders(IRemindersCallbacks callbacks, List<TaskEntity> tasks) throws RemoteException {
|
||||
Log.d(TAG, "unimplemented Method: batchUpdateReminders");
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void createReminderWithOptions(IRemindersCallbacks callbacks, TaskEntity task, CreateReminderOptionsInternal options) throws RemoteException {
|
||||
Log.d(TAG, "unimplemented Method: createReminderWithOptions");
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getCustomizedSnoozePreset(IRemindersCallbacks callbacks) throws RemoteException {
|
||||
Log.d(TAG, "unimplemented Method: getCustomizedSnoozePreset");
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setCustomizedSnoozePreset(IRemindersCallbacks callbacks, CustomizedSnoozePresetEntity preset) throws RemoteException {
|
||||
Log.d(TAG, "unimplemented Method: setCustomizedSnoozePreset");
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setAccountState(IRemindersCallbacks callbacks, AccountState accountState) throws RemoteException {
|
||||
Log.d(TAG, "unimplemented Method: setAccountState");
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getAccountState(IRemindersCallbacks callbacks) throws RemoteException {
|
||||
Log.d(TAG, "unimplemented Method: getAccountState");
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void checkReindexDueDatesNeeded(IRemindersCallbacks callbacks, ReindexDueDatesOptions options) throws RemoteException {
|
||||
Log.d(TAG, "unimplemented Method: checkReindexDueDatesNeeded");
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void reindexDueDates(IRemindersCallbacks callbacks, ReindexDueDatesOptions options) throws RemoteException {
|
||||
Log.d(TAG, "unimplemented Method: reindexDueDates");
|
||||
|
||||
}
|
||||
}
|
@ -1,33 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2019 microG 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.tapandpay;
|
||||
|
||||
import com.google.android.gms.tapandpay.internal.ITapAndPayService;
|
||||
import android.os.Parcel;
|
||||
import android.os.RemoteException;
|
||||
import android.util.Log;
|
||||
|
||||
public class TapAndPayImpl extends ITapAndPayService.Stub {
|
||||
private static final String TAG = "GmsTapAndPayImpl";
|
||||
|
||||
@Override
|
||||
public boolean onTransact(int code, Parcel data, Parcel reply, int flags) throws RemoteException {
|
||||
if (super.onTransact(code, data, reply, flags)) return true;
|
||||
Log.d(TAG, "onTransact [unknown]: " + code + ", " + data + ", " + flags);
|
||||
return false;
|
||||
}
|
||||
}
|
@ -1,38 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2019 microG 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.tapandpay;
|
||||
|
||||
import android.os.RemoteException;
|
||||
|
||||
import com.google.android.gms.common.api.CommonStatusCodes;
|
||||
import com.google.android.gms.common.internal.GetServiceRequest;
|
||||
import com.google.android.gms.common.internal.IGmsCallbacks;
|
||||
|
||||
import org.microg.gms.BaseService;
|
||||
import org.microg.gms.common.GmsService;
|
||||
|
||||
public class TapAndPayService extends BaseService {
|
||||
public TapAndPayService() {
|
||||
super("GmsTapAndPaySvc", GmsService.TAP_AND_PAY);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handleServiceRequest(IGmsCallbacks callback, GetServiceRequest request, GmsService service) throws RemoteException {
|
||||
callback.onPostInitComplete(CommonStatusCodes.SUCCESS, new TapAndPayImpl(), null);
|
||||
|
||||
}
|
||||
}
|
@ -64,36 +64,4 @@ public class Conditions {
|
||||
v.getContext().startActivity(intent);
|
||||
}
|
||||
}).build();
|
||||
|
||||
private static final String[] REQUIRED_PERMISSIONS = new String[]{ACCESS_COARSE_LOCATION, ACCESS_FINE_LOCATION, READ_EXTERNAL_STORAGE, WRITE_EXTERNAL_STORAGE, GET_ACCOUNTS, READ_PHONE_STATE};
|
||||
public static final Condition PERMISSIONS = new Condition.Builder()
|
||||
.title(R.string.cond_perm_title)
|
||||
.summaryPlurals(R.plurals.cond_perm_summary)
|
||||
.evaluation(new Condition.Evaluation() {
|
||||
int count = 0;
|
||||
@Override
|
||||
public boolean isActive(Context context) {
|
||||
count = 0;
|
||||
if (SDK_INT >= Build.VERSION_CODES.M) {
|
||||
for (String permission : REQUIRED_PERMISSIONS) {
|
||||
if (ContextCompat.checkSelfPermission(context, permission) != PERMISSION_GRANTED)
|
||||
count++;
|
||||
}
|
||||
}
|
||||
return count > 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getPluralsCount() {
|
||||
return count;
|
||||
}
|
||||
})
|
||||
.firstActionPlurals(R.plurals.cond_perm_action, new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if (v.getContext() instanceof Activity) {
|
||||
ActivityCompat.requestPermissions((Activity) v.getContext(), REQUIRED_PERMISSIONS, 0);
|
||||
}
|
||||
}
|
||||
}).build();
|
||||
}
|
||||
|
@ -23,11 +23,9 @@ import android.view.LayoutInflater;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.fragment.app.Fragment;
|
||||
|
||||
import org.microg.tools.selfcheck.InstalledPackagesChecks;
|
||||
//import org.microg.tools.selfcheck.NlpOsCompatChecks;
|
||||
//import org.microg.tools.selfcheck.NlpStatusChecks;
|
||||
import org.microg.tools.selfcheck.PermissionCheckGroup;
|
||||
import org.microg.tools.selfcheck.RomSpoofSignatureChecks;
|
||||
import org.microg.tools.selfcheck.SelfCheckGroup;
|
||||
import org.microg.tools.selfcheck.SystemChecks;
|
||||
import org.microg.tools.ui.AbstractSelfCheckFragment;
|
||||
@ -46,8 +44,6 @@ public class SelfCheckFragment extends AbstractSelfCheckFragment {
|
||||
|
||||
@Override
|
||||
protected void prepareSelfCheckList(List<SelfCheckGroup> checks) {
|
||||
checks.add(new RomSpoofSignatureChecks());
|
||||
checks.add(new InstalledPackagesChecks());
|
||||
if (SDK_INT > LOLLIPOP_MR1) {
|
||||
checks.add(new PermissionCheckGroup(ACCESS_COARSE_LOCATION, "android.permission.ACCESS_BACKGROUND_LOCATION", WRITE_EXTERNAL_STORAGE, GET_ACCOUNTS, READ_PHONE_STATE));
|
||||
}
|
||||
|
@ -38,7 +38,6 @@ public class SettingsActivity extends AbstractDashboardActivity {
|
||||
public SettingsActivity() {
|
||||
preferencesResource = R.xml.preferences_start;
|
||||
addCondition(Conditions.GCM_BATTERY_OPTIMIZATIONS);
|
||||
addCondition(Conditions.PERMISSIONS);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -81,7 +80,6 @@ public class SettingsActivity extends AbstractDashboardActivity {
|
||||
findPreference(PREF_GCM).setSummary(R.string.abc_capital_off);
|
||||
}
|
||||
|
||||
findPreference(PREF_SNET).setSummary(R.string.service_status_disabled);
|
||||
|
||||
// Preferences unifiedNlPrefs = new Preferences(getContext());
|
||||
// int backendCount = TextUtils.isEmpty(unifiedNlPrefs.getLocationBackends()) ? 0 :
|
||||
|
@ -1,38 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2013-2017 microG 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.wallet;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.Parcel;
|
||||
import android.os.RemoteException;
|
||||
import android.util.Log;
|
||||
|
||||
import com.google.android.gms.wallet.internal.IOwService;
|
||||
|
||||
public class OwServiceImpl extends IOwService.Stub {
|
||||
private static final String TAG = "GmsWalletOwSvc";
|
||||
|
||||
public OwServiceImpl(Context context) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onTransact(int code, Parcel data, Parcel reply, int flags) throws RemoteException {
|
||||
if (super.onTransact(code, data, reply, flags)) return true;
|
||||
Log.d(TAG, "onTransact [unknown]: " + code + ", " + data + ", " + flags);
|
||||
return false;
|
||||
}
|
||||
}
|
@ -1,37 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2013-2017 microG 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.wallet;
|
||||
|
||||
import android.os.RemoteException;
|
||||
import android.util.Log;
|
||||
|
||||
import com.google.android.gms.common.internal.GetServiceRequest;
|
||||
import com.google.android.gms.common.internal.IGmsCallbacks;
|
||||
|
||||
import org.microg.gms.BaseService;
|
||||
import org.microg.gms.common.GmsService;
|
||||
|
||||
public class PaymentService extends BaseService {
|
||||
public PaymentService() {
|
||||
super("GmsWalletPaySvc", GmsService.WALLET);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handleServiceRequest(IGmsCallbacks callback, GetServiceRequest request, GmsService service) throws RemoteException {
|
||||
callback.onPostInitComplete(0, new OwServiceImpl(this), null);
|
||||
}
|
||||
}
|
@ -1,68 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2013-2017 microG 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.tools.selfcheck;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.pm.PackageManager;
|
||||
|
||||
import com.mgoogle.android.gms.R;
|
||||
|
||||
import org.microg.gms.common.Constants;
|
||||
import org.microg.gms.common.PackageUtils;
|
||||
|
||||
import static org.microg.tools.selfcheck.SelfCheckGroup.Result.Negative;
|
||||
import static org.microg.tools.selfcheck.SelfCheckGroup.Result.Positive;
|
||||
|
||||
public class InstalledPackagesChecks implements SelfCheckGroup {
|
||||
|
||||
@Override
|
||||
public String getGroupName(Context context) {
|
||||
return context.getString(R.string.self_check_cat_gms_packages);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void doChecks(Context context, ResultCollector collector) {
|
||||
addPackageInstalledAndSignedResult(context, collector, context.getString(R.string.self_check_pkg_gms), Constants.GMS_PACKAGE_NAME, Constants.GMS_PACKAGE_SIGNATURE_SHA1);
|
||||
addPackageInstalledAndSignedResult(context, collector, context.getString(R.string.self_check_pkg_vending), "com.android.vending", Constants.GMS_PACKAGE_SIGNATURE_SHA1);
|
||||
addPackageInstalledResult(context, collector, context.getString(R.string.self_check_pkg_gsf), Constants.GSF_PACKAGE_NAME);
|
||||
}
|
||||
|
||||
private void addPackageInstalledAndSignedResult(Context context, ResultCollector collector, String nicePackageName, String androidPackageName, String signatureHash) {
|
||||
if (addPackageInstalledResult(context, collector, nicePackageName, androidPackageName)) {
|
||||
addPackageSignedResult(context, collector, nicePackageName, androidPackageName, signatureHash);
|
||||
}
|
||||
}
|
||||
|
||||
private boolean addPackageSignedResult(Context context, ResultCollector collector, String nicePackageName, String androidPackageName, String signatureHash) {
|
||||
boolean hashMatches = signatureHash.equals(PackageUtils.firstSignatureDigest(context, androidPackageName));
|
||||
collector.addResult(context.getString(R.string.self_check_name_correct_sig, nicePackageName), hashMatches ? Positive : Negative,
|
||||
context.getString(R.string.self_check_resolution_correct_sig, nicePackageName));
|
||||
return hashMatches;
|
||||
}
|
||||
|
||||
private boolean addPackageInstalledResult(Context context, ResultCollector collector, String nicePackageName, String androidPackageName) {
|
||||
boolean packageExists = true;
|
||||
try {
|
||||
context.getPackageManager().getPackageInfo(androidPackageName, 0);
|
||||
} catch (PackageManager.NameNotFoundException e) {
|
||||
packageExists = false;
|
||||
}
|
||||
collector.addResult(context.getString(R.string.self_check_name_app_installed, nicePackageName), packageExists ? Positive : Negative,
|
||||
context.getString(R.string.self_check_resolution_app_installed, nicePackageName));
|
||||
return packageExists;
|
||||
}
|
||||
}
|
@ -1,84 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2013-2017 microG 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.tools.selfcheck;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.pm.PackageManager;
|
||||
|
||||
import androidx.core.content.ContextCompat;
|
||||
import androidx.fragment.app.Fragment;
|
||||
|
||||
import com.mgoogle.android.gms.R;
|
||||
|
||||
import org.microg.gms.common.Constants;
|
||||
import org.microg.gms.common.PackageUtils;
|
||||
|
||||
import static android.content.pm.PackageManager.PERMISSION_GRANTED;
|
||||
import static org.microg.gms.common.Constants.GMS_PACKAGE_SIGNATURE_SHA1;
|
||||
import static org.microg.tools.selfcheck.SelfCheckGroup.Result.Negative;
|
||||
import static org.microg.tools.selfcheck.SelfCheckGroup.Result.Positive;
|
||||
import static org.microg.tools.selfcheck.SelfCheckGroup.Result.Unknown;
|
||||
|
||||
public class RomSpoofSignatureChecks implements SelfCheckGroup {
|
||||
|
||||
public static final String FAKE_SIGNATURE_PERMISSION = "android.permission.FAKE_PACKAGE_SIGNATURE";
|
||||
|
||||
@Override
|
||||
public String getGroupName(Context context) {
|
||||
return context.getString(R.string.self_check_cat_fake_sig);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void doChecks(Context context, ResultCollector collector) {
|
||||
boolean hasPermission = addRomKnowsFakeSignaturePermission(context, collector);
|
||||
if (hasPermission) {
|
||||
addSystemGrantsFakeSignaturePermission(context, collector);
|
||||
}
|
||||
addSystemSpoofsSignature(context, collector);
|
||||
}
|
||||
|
||||
private boolean addRomKnowsFakeSignaturePermission(Context context, ResultCollector collector) {
|
||||
boolean knowsPermission = true;
|
||||
try {
|
||||
context.getPackageManager().getPermissionInfo(FAKE_SIGNATURE_PERMISSION, 0);
|
||||
} catch (PackageManager.NameNotFoundException e) {
|
||||
knowsPermission = false;
|
||||
}
|
||||
collector.addResult(context.getString(R.string.self_check_name_fake_sig_perm), knowsPermission ? Positive : Unknown,
|
||||
context.getString(R.string.self_check_resolution_fake_sig_perm));
|
||||
return knowsPermission;
|
||||
}
|
||||
|
||||
private boolean addSystemGrantsFakeSignaturePermission(Context context, ResultCollector collector) {
|
||||
boolean grantsPermission = ContextCompat.checkSelfPermission(context, FAKE_SIGNATURE_PERMISSION) == PERMISSION_GRANTED;
|
||||
collector.addResult(context.getString(R.string.self_check_name_perm_granted), grantsPermission ? Positive : Negative,
|
||||
context.getString(R.string.self_check_resolution_perm_granted), new CheckResolver() {
|
||||
@Override
|
||||
public void tryResolve(Fragment fragment) {
|
||||
fragment.requestPermissions(new String[]{FAKE_SIGNATURE_PERMISSION}, 0);
|
||||
}
|
||||
});
|
||||
return grantsPermission;
|
||||
}
|
||||
|
||||
private boolean addSystemSpoofsSignature(Context context, ResultCollector collector) {
|
||||
boolean spoofsSignature = GMS_PACKAGE_SIGNATURE_SHA1.equals(PackageUtils.firstSignatureDigest(context, Constants.GMS_PACKAGE_NAME));
|
||||
collector.addResult(context.getString(R.string.self_check_name_system_spoofs), spoofsSignature ? Positive : Negative,
|
||||
context.getString(R.string.self_check_resolution_system_spoofs));
|
||||
return spoofsSignature;
|
||||
}
|
||||
}
|
@ -1,83 +0,0 @@
|
||||
// Code generated by Wire protocol buffer compiler, do not edit.
|
||||
// Source file: protos-repo/snet.proto
|
||||
package org.microg.gms.snet;
|
||||
|
||||
import com.squareup.wire.Message;
|
||||
import com.squareup.wire.ProtoField;
|
||||
import okio.ByteString;
|
||||
|
||||
import static com.squareup.wire.Message.Datatype.BYTES;
|
||||
import static com.squareup.wire.Message.Datatype.STRING;
|
||||
|
||||
public final class AttestRequest extends Message {
|
||||
|
||||
public static final ByteString DEFAULT_SAFETYNETDATA = ByteString.EMPTY;
|
||||
public static final String DEFAULT_DROIDGUARDRESULT = "";
|
||||
|
||||
@ProtoField(tag = 1, type = BYTES)
|
||||
public final ByteString safetyNetData;
|
||||
|
||||
@ProtoField(tag = 2, type = STRING)
|
||||
public final String droidGuardResult;
|
||||
|
||||
public AttestRequest(ByteString safetyNetData, String droidGuardResult) {
|
||||
this.safetyNetData = safetyNetData;
|
||||
this.droidGuardResult = droidGuardResult;
|
||||
}
|
||||
|
||||
private AttestRequest(Builder builder) {
|
||||
this(builder.safetyNetData, builder.droidGuardResult);
|
||||
setBuilder(builder);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object other) {
|
||||
if (other == this) return true;
|
||||
if (!(other instanceof AttestRequest)) return false;
|
||||
AttestRequest o = (AttestRequest) other;
|
||||
return equals(safetyNetData, o.safetyNetData)
|
||||
&& equals(droidGuardResult, o.droidGuardResult);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int result = hashCode;
|
||||
if (result == 0) {
|
||||
result = safetyNetData != null ? safetyNetData.hashCode() : 0;
|
||||
result = result * 37 + (droidGuardResult != null ? droidGuardResult.hashCode() : 0);
|
||||
hashCode = result;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public static final class Builder extends Message.Builder<AttestRequest> {
|
||||
|
||||
public ByteString safetyNetData;
|
||||
public String droidGuardResult;
|
||||
|
||||
public Builder() {
|
||||
}
|
||||
|
||||
public Builder(AttestRequest message) {
|
||||
super(message);
|
||||
if (message == null) return;
|
||||
this.safetyNetData = message.safetyNetData;
|
||||
this.droidGuardResult = message.droidGuardResult;
|
||||
}
|
||||
|
||||
public Builder safetyNetData(ByteString safetyNetData) {
|
||||
this.safetyNetData = safetyNetData;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder droidGuardResult(String droidGuardResult) {
|
||||
this.droidGuardResult = droidGuardResult;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AttestRequest build() {
|
||||
return new AttestRequest(this);
|
||||
}
|
||||
}
|
||||
}
|
@ -1,62 +0,0 @@
|
||||
// Code generated by Wire protocol buffer compiler, do not edit.
|
||||
// Source file: protos-repo/snet.proto
|
||||
package org.microg.gms.snet;
|
||||
|
||||
import com.squareup.wire.Message;
|
||||
import com.squareup.wire.ProtoField;
|
||||
|
||||
import static com.squareup.wire.Message.Datatype.STRING;
|
||||
|
||||
public final class AttestResponse extends Message {
|
||||
|
||||
public static final String DEFAULT_RESULT = "";
|
||||
|
||||
@ProtoField(tag = 2, type = STRING)
|
||||
public final String result;
|
||||
|
||||
public AttestResponse(String result) {
|
||||
this.result = result;
|
||||
}
|
||||
|
||||
private AttestResponse(Builder builder) {
|
||||
this(builder.result);
|
||||
setBuilder(builder);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object other) {
|
||||
if (other == this) return true;
|
||||
if (!(other instanceof AttestResponse)) return false;
|
||||
return equals(result, ((AttestResponse) other).result);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int result = hashCode;
|
||||
return result != 0 ? result : (hashCode = this.result != null ? this.result.hashCode() : 0);
|
||||
}
|
||||
|
||||
public static final class Builder extends Message.Builder<AttestResponse> {
|
||||
|
||||
public String result;
|
||||
|
||||
public Builder() {
|
||||
}
|
||||
|
||||
public Builder(AttestResponse message) {
|
||||
super(message);
|
||||
if (message == null) return;
|
||||
this.result = message.result;
|
||||
}
|
||||
|
||||
public Builder result(String result) {
|
||||
this.result = result;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AttestResponse build() {
|
||||
return new AttestResponse(this);
|
||||
}
|
||||
}
|
||||
}
|
@ -1,83 +0,0 @@
|
||||
// Code generated by Wire protocol buffer compiler, do not edit.
|
||||
// Source file: protos-repo/snet.proto
|
||||
package org.microg.gms.snet;
|
||||
|
||||
import com.squareup.wire.Message;
|
||||
import com.squareup.wire.ProtoField;
|
||||
import okio.ByteString;
|
||||
|
||||
import static com.squareup.wire.Message.Datatype.BYTES;
|
||||
import static com.squareup.wire.Message.Datatype.STRING;
|
||||
|
||||
public final class FileState extends Message {
|
||||
|
||||
public static final String DEFAULT_FILENAME = "";
|
||||
public static final ByteString DEFAULT_DIGEST = ByteString.EMPTY;
|
||||
|
||||
@ProtoField(tag = 1, type = STRING)
|
||||
public final String fileName;
|
||||
|
||||
@ProtoField(tag = 2, type = BYTES)
|
||||
public final ByteString digest;
|
||||
|
||||
public FileState(String fileName, ByteString digest) {
|
||||
this.fileName = fileName;
|
||||
this.digest = digest;
|
||||
}
|
||||
|
||||
private FileState(Builder builder) {
|
||||
this(builder.fileName, builder.digest);
|
||||
setBuilder(builder);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object other) {
|
||||
if (other == this) return true;
|
||||
if (!(other instanceof FileState)) return false;
|
||||
FileState o = (FileState) other;
|
||||
return equals(fileName, o.fileName)
|
||||
&& equals(digest, o.digest);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int result = hashCode;
|
||||
if (result == 0) {
|
||||
result = fileName != null ? fileName.hashCode() : 0;
|
||||
result = result * 37 + (digest != null ? digest.hashCode() : 0);
|
||||
hashCode = result;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public static final class Builder extends Message.Builder<FileState> {
|
||||
|
||||
public String fileName;
|
||||
public ByteString digest;
|
||||
|
||||
public Builder() {
|
||||
}
|
||||
|
||||
public Builder(FileState message) {
|
||||
super(message);
|
||||
if (message == null) return;
|
||||
this.fileName = message.fileName;
|
||||
this.digest = message.digest;
|
||||
}
|
||||
|
||||
public Builder fileName(String fileName) {
|
||||
this.fileName = fileName;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder digest(ByteString digest) {
|
||||
this.digest = digest;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public FileState build() {
|
||||
return new FileState(this);
|
||||
}
|
||||
}
|
||||
}
|
@ -1,81 +0,0 @@
|
||||
// Code generated by Wire protocol buffer compiler, do not edit.
|
||||
// Source file: protos-repo/snet.proto
|
||||
package org.microg.gms.snet;
|
||||
|
||||
import com.squareup.wire.Message;
|
||||
import com.squareup.wire.ProtoField;
|
||||
|
||||
import static com.squareup.wire.Message.Datatype.BOOL;
|
||||
|
||||
public final class SELinuxState extends Message {
|
||||
|
||||
public static final Boolean DEFAULT_SUPPORTED = false;
|
||||
public static final Boolean DEFAULT_ENABLED = false;
|
||||
|
||||
@ProtoField(tag = 1, type = BOOL)
|
||||
public final Boolean supported;
|
||||
|
||||
@ProtoField(tag = 2, type = BOOL)
|
||||
public final Boolean enabled;
|
||||
|
||||
public SELinuxState(Boolean supported, Boolean enabled) {
|
||||
this.supported = supported;
|
||||
this.enabled = enabled;
|
||||
}
|
||||
|
||||
private SELinuxState(Builder builder) {
|
||||
this(builder.supported, builder.enabled);
|
||||
setBuilder(builder);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object other) {
|
||||
if (other == this) return true;
|
||||
if (!(other instanceof SELinuxState)) return false;
|
||||
SELinuxState o = (SELinuxState) other;
|
||||
return equals(supported, o.supported)
|
||||
&& equals(enabled, o.enabled);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int result = hashCode;
|
||||
if (result == 0) {
|
||||
result = supported != null ? supported.hashCode() : 0;
|
||||
result = result * 37 + (enabled != null ? enabled.hashCode() : 0);
|
||||
hashCode = result;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public static final class Builder extends Message.Builder<SELinuxState> {
|
||||
|
||||
public Boolean supported;
|
||||
public Boolean enabled;
|
||||
|
||||
public Builder() {
|
||||
}
|
||||
|
||||
public Builder(SELinuxState message) {
|
||||
super(message);
|
||||
if (message == null) return;
|
||||
this.supported = message.supported;
|
||||
this.enabled = message.enabled;
|
||||
}
|
||||
|
||||
public Builder supported(Boolean supported) {
|
||||
this.supported = supported;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder enabled(Boolean enabled) {
|
||||
this.enabled = enabled;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public SELinuxState build() {
|
||||
return new SELinuxState(this);
|
||||
}
|
||||
}
|
||||
}
|
@ -1,186 +0,0 @@
|
||||
// Code generated by Wire protocol buffer compiler, do not edit.
|
||||
// Source file: protos-repo/snet.proto
|
||||
package org.microg.gms.snet;
|
||||
|
||||
import com.squareup.wire.Message;
|
||||
import com.squareup.wire.ProtoField;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import okio.ByteString;
|
||||
|
||||
import static com.squareup.wire.Message.Datatype.BOOL;
|
||||
import static com.squareup.wire.Message.Datatype.BYTES;
|
||||
import static com.squareup.wire.Message.Datatype.INT32;
|
||||
import static com.squareup.wire.Message.Datatype.INT64;
|
||||
import static com.squareup.wire.Message.Datatype.STRING;
|
||||
import static com.squareup.wire.Message.Label.REPEATED;
|
||||
|
||||
public final class SafetyNetData extends Message {
|
||||
|
||||
public static final ByteString DEFAULT_NONCE = ByteString.EMPTY;
|
||||
public static final String DEFAULT_PACKAGENAME = "";
|
||||
public static final List<ByteString> DEFAULT_SIGNATUREDIGEST = Collections.emptyList();
|
||||
public static final ByteString DEFAULT_FILEDIGEST = ByteString.EMPTY;
|
||||
public static final Integer DEFAULT_GMSVERSIONCODE = 0;
|
||||
public static final List<FileState> DEFAULT_SUCANDIDATES = Collections.emptyList();
|
||||
public static final Long DEFAULT_CURRENTTIMEMS = 0L;
|
||||
public static final Boolean DEFAULT_GOOGLECN = false;
|
||||
|
||||
@ProtoField(tag = 1, type = BYTES)
|
||||
public final ByteString nonce;
|
||||
|
||||
@ProtoField(tag = 2, type = STRING)
|
||||
public final String packageName;
|
||||
|
||||
@ProtoField(tag = 3, type = BYTES, label = REPEATED)
|
||||
public final List<ByteString> signatureDigest;
|
||||
|
||||
@ProtoField(tag = 4, type = BYTES)
|
||||
public final ByteString fileDigest;
|
||||
|
||||
@ProtoField(tag = 5, type = INT32)
|
||||
public final Integer gmsVersionCode;
|
||||
|
||||
@ProtoField(tag = 6, label = REPEATED, messageType = FileState.class)
|
||||
public final List<FileState> suCandidates;
|
||||
|
||||
@ProtoField(tag = 7)
|
||||
public final SELinuxState seLinuxState;
|
||||
|
||||
@ProtoField(tag = 8, type = INT64)
|
||||
public final Long currentTimeMs;
|
||||
|
||||
@ProtoField(tag = 9, type = BOOL)
|
||||
public final Boolean googleCn;
|
||||
|
||||
public SafetyNetData(ByteString nonce, String packageName, List<ByteString> signatureDigest, ByteString fileDigest, Integer gmsVersionCode, List<FileState> suCandidates, SELinuxState seLinuxState, Long currentTimeMs, Boolean googleCn) {
|
||||
this.nonce = nonce;
|
||||
this.packageName = packageName;
|
||||
this.signatureDigest = immutableCopyOf(signatureDigest);
|
||||
this.fileDigest = fileDigest;
|
||||
this.gmsVersionCode = gmsVersionCode;
|
||||
this.suCandidates = immutableCopyOf(suCandidates);
|
||||
this.seLinuxState = seLinuxState;
|
||||
this.currentTimeMs = currentTimeMs;
|
||||
this.googleCn = googleCn;
|
||||
}
|
||||
|
||||
private SafetyNetData(Builder builder) {
|
||||
this(builder.nonce, builder.packageName, builder.signatureDigest, builder.fileDigest, builder.gmsVersionCode, builder.suCandidates, builder.seLinuxState, builder.currentTimeMs, builder.googleCn);
|
||||
setBuilder(builder);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object other) {
|
||||
if (other == this) return true;
|
||||
if (!(other instanceof SafetyNetData)) return false;
|
||||
SafetyNetData o = (SafetyNetData) other;
|
||||
return equals(nonce, o.nonce)
|
||||
&& equals(packageName, o.packageName)
|
||||
&& equals(signatureDigest, o.signatureDigest)
|
||||
&& equals(fileDigest, o.fileDigest)
|
||||
&& equals(gmsVersionCode, o.gmsVersionCode)
|
||||
&& equals(suCandidates, o.suCandidates)
|
||||
&& equals(seLinuxState, o.seLinuxState)
|
||||
&& equals(currentTimeMs, o.currentTimeMs)
|
||||
&& equals(googleCn, o.googleCn);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int result = hashCode;
|
||||
if (result == 0) {
|
||||
result = nonce != null ? nonce.hashCode() : 0;
|
||||
result = result * 37 + (packageName != null ? packageName.hashCode() : 0);
|
||||
result = result * 37 + (signatureDigest != null ? signatureDigest.hashCode() : 1);
|
||||
result = result * 37 + (fileDigest != null ? fileDigest.hashCode() : 0);
|
||||
result = result * 37 + (gmsVersionCode != null ? gmsVersionCode.hashCode() : 0);
|
||||
result = result * 37 + (suCandidates != null ? suCandidates.hashCode() : 1);
|
||||
result = result * 37 + (seLinuxState != null ? seLinuxState.hashCode() : 0);
|
||||
result = result * 37 + (currentTimeMs != null ? currentTimeMs.hashCode() : 0);
|
||||
result = result * 37 + (googleCn != null ? googleCn.hashCode() : 0);
|
||||
hashCode = result;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public static final class Builder extends Message.Builder<SafetyNetData> {
|
||||
|
||||
public ByteString nonce;
|
||||
public String packageName;
|
||||
public List<ByteString> signatureDigest;
|
||||
public ByteString fileDigest;
|
||||
public Integer gmsVersionCode;
|
||||
public List<FileState> suCandidates;
|
||||
public SELinuxState seLinuxState;
|
||||
public Long currentTimeMs;
|
||||
public Boolean googleCn;
|
||||
|
||||
public Builder() {
|
||||
}
|
||||
|
||||
public Builder(SafetyNetData message) {
|
||||
super(message);
|
||||
if (message == null) return;
|
||||
this.nonce = message.nonce;
|
||||
this.packageName = message.packageName;
|
||||
this.signatureDigest = copyOf(message.signatureDigest);
|
||||
this.fileDigest = message.fileDigest;
|
||||
this.gmsVersionCode = message.gmsVersionCode;
|
||||
this.suCandidates = copyOf(message.suCandidates);
|
||||
this.seLinuxState = message.seLinuxState;
|
||||
this.currentTimeMs = message.currentTimeMs;
|
||||
this.googleCn = message.googleCn;
|
||||
}
|
||||
|
||||
public Builder nonce(ByteString nonce) {
|
||||
this.nonce = nonce;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder packageName(String packageName) {
|
||||
this.packageName = packageName;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder signatureDigest(List<ByteString> signatureDigest) {
|
||||
this.signatureDigest = checkForNulls(signatureDigest);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder fileDigest(ByteString fileDigest) {
|
||||
this.fileDigest = fileDigest;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder gmsVersionCode(Integer gmsVersionCode) {
|
||||
this.gmsVersionCode = gmsVersionCode;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder suCandidates(List<FileState> suCandidates) {
|
||||
this.suCandidates = checkForNulls(suCandidates);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder seLinuxState(SELinuxState seLinuxState) {
|
||||
this.seLinuxState = seLinuxState;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder currentTimeMs(Long currentTimeMs) {
|
||||
this.currentTimeMs = currentTimeMs;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder googleCn(Boolean googleCn) {
|
||||
this.googleCn = googleCn;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public SafetyNetData build() {
|
||||
return new SafetyNetData(this);
|
||||
}
|
||||
}
|
||||
}
|
@ -1,31 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ Copyright (C) 2017 microG 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.
|
||||
-->
|
||||
|
||||
<PreferenceScreen
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<org.microg.tools.ui.LongTextPreference
|
||||
android:selectable="false"
|
||||
android:key="pref_snet_summary"
|
||||
android:summary="@string/snet_intro"/>
|
||||
<PreferenceCategory android:title="@string/prefcat_test">
|
||||
<Preference
|
||||
android:enabled="false"
|
||||
android:key="pref_snet_run_attest"
|
||||
android:summary="Not yet available"
|
||||
android:title="@string/pref_snet_testdrive_title"/>
|
||||
</PreferenceCategory>
|
||||
</PreferenceScreen>
|
@ -1,43 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ Copyright (C) 2017 microG 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.
|
||||
-->
|
||||
|
||||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<PreferenceCategory android:title="@string/prefcat_operation_mode">
|
||||
<org.microg.tools.ui.RadioButtonPreference
|
||||
android:checked="true"
|
||||
android:key="snet_official"
|
||||
android:summary="@string/pref_snet_status_official_summary"
|
||||
android:title="@string/pref_snet_status_official_title"/>
|
||||
<org.microg.tools.ui.RadioButtonPreference
|
||||
android:checked="false"
|
||||
android:enabled="false"
|
||||
android:key="snet_self_signed"
|
||||
android:summary="@string/pref_snet_self_signed_summary"
|
||||
android:title="@string/pref_snet_self_signed_title"/>
|
||||
<org.microg.tools.ui.RadioButtonPreference
|
||||
android:checked="false"
|
||||
android:key="snet_third_party"
|
||||
android:summary="@string/pref_snet_status_third_party_summary"
|
||||
android:title="@string/pref_snet_status_third_party_title"/>
|
||||
<EditTextPreference
|
||||
android:dependency="snet_third_party"
|
||||
android:hint="https://example.com/server?key=123"
|
||||
android:key="snet_custom_url"
|
||||
android:summary="@string/pref_snet_custom_url_summary"
|
||||
android:title="@string/pref_snet_custom_url_title"/>
|
||||
</PreferenceCategory>
|
||||
</PreferenceScreen>
|
@ -15,16 +15,6 @@
|
||||
-->
|
||||
|
||||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<PreferenceCategory android:title="@string/prefcat_setup">
|
||||
<org.microg.tools.ui.TintIconPreference
|
||||
android:icon="@drawable/self_check"
|
||||
android:summary="@string/self_check_desc"
|
||||
android:title="@string/self_check_title">
|
||||
<intent
|
||||
android:targetClass="org.microg.gms.ui.SelfCheckFragment$AsActivity"
|
||||
android:targetPackage="com.mgoogle.android.gms"/>
|
||||
</org.microg.tools.ui.TintIconPreference>
|
||||
</PreferenceCategory>
|
||||
<PreferenceCategory android:title="@string/prefcat_google_services">
|
||||
<org.microg.tools.ui.TintIconPreference
|
||||
android:icon="@drawable/add_account"
|
||||
@ -50,31 +40,6 @@
|
||||
android:targetClass="org.microg.gms.ui.GcmFragment$AsActivity"
|
||||
android:targetPackage="com.mgoogle.android.gms"/>
|
||||
</org.microg.tools.ui.TintIconPreference>
|
||||
<org.microg.tools.ui.TintIconPreference
|
||||
android:icon="@drawable/certificate"
|
||||
android:key="pref_snet"
|
||||
android:title="@string/service_name_snet">
|
||||
<intent
|
||||
android:targetClass="org.microg.gms.ui.SafetyNetFragment$AsActivity"
|
||||
android:targetPackage="com.mgoogle.android.gms"/>
|
||||
</org.microg.tools.ui.TintIconPreference>
|
||||
<org.microg.tools.ui.TintIconPreference
|
||||
android:icon="@drawable/dots_horizontal"
|
||||
android:key="pref_google_more"
|
||||
android:title="@string/pref_more_settings">
|
||||
<intent
|
||||
android:targetClass="org.microg.gms.ui.GoogleMoreFragment$AsActivity"
|
||||
android:targetPackage="com.mgoogle.android.gms"/>
|
||||
</org.microg.tools.ui.TintIconPreference>
|
||||
</PreferenceCategory>
|
||||
<PreferenceCategory android:title="@string/prefcat_configuration">
|
||||
<org.microg.tools.ui.TintIconPreference
|
||||
android:key="pref_unifiednlp"
|
||||
android:title="UnifiedNlp">
|
||||
<intent
|
||||
android:targetClass="org.microg.nlp.ui.BackendSettingsActivity"
|
||||
android:targetPackage="com.mgoogle.android.gms"/>
|
||||
</org.microg.tools.ui.TintIconPreference>
|
||||
</PreferenceCategory>
|
||||
<PreferenceCategory android:title="@string/prefcat_about">
|
||||
<org.microg.tools.ui.TintIconPreference
|
||||
|
Loading…
Reference in New Issue
Block a user