Add various missing stubs

This commit is contained in:
Marvin W 2018-08-28 01:11:24 +02:00
parent 0cfb703b11
commit bdb04c9b20
No known key found for this signature in database
GPG Key ID: 072E9235DB996F2A
7 changed files with 160 additions and 71 deletions

2
extern/GmsApi vendored

@ -1 +1 @@
Subproject commit db0be6ba010f52b4d12e69aed2482c38a3c2406c
Subproject commit 216861e7dd86b11d6fcaafb87f64c22fa35af445

2
extern/GmsLib vendored

@ -1 +1 @@
Subproject commit 90e9b7b79dcaddfce887f87b94f80adeed8791e6
Subproject commit 7015d9e7f8f793e3b6d009a6e453f84f35b9d1c8

View File

@ -491,6 +491,20 @@
<!-- Other -->
<provider
android:name="org.microg.gms.phenotype.ConfigurationProvider"
android:authorities="com.google.android.gms.phenotype"
android:exported="true"/>
<service
android:name="org.microg.gms.measurement.MeasurementBrokerService"
android:exported="true">
<intent-filter>
<action android:name="com.google.android.gms.measurement.START"/>
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
</service>
<service android:name="org.microg.gms.mdm.NetworkQualityService">
<intent-filter>
<action android:name="com.google.android.gms.mdm.services.START"/>

View File

@ -16,7 +16,6 @@
package com.google.android.gms.cast.framework.internal;
import android.os.Bundle;
import android.os.RemoteException;
import android.util.Log;
@ -26,14 +25,12 @@ import com.google.android.gms.cast.framework.ICastContext;
import com.google.android.gms.cast.framework.ICastSession;
import com.google.android.gms.cast.framework.IReconnectionService;
import com.google.android.gms.cast.framework.ISession;
import com.google.android.gms.cast.framework.ISessionManager;
import com.google.android.gms.cast.framework.ISessionProxy;
import com.google.android.gms.cast.framework.media.CastMediaOptions;
import com.google.android.gms.cast.framework.media.IMediaNotificationService;
import com.google.android.gms.cast.framework.media.internal.IFetchBitmapTask;
import com.google.android.gms.cast.framework.media.internal.IFetchBitmapTaskProgressPublisher;
import com.google.android.gms.dynamic.IObjectWrapper;
import com.google.android.gms.dynamic.ObjectWrapper;
import java.util.Map;
@ -43,96 +40,36 @@ public class CastDynamiteModuleImpl extends ICastDynamiteModule.Stub {
@Override
public ICastContext newCastContextImpl(IObjectWrapper context, CastOptions options, IMediaRouter router, Map map) throws RemoteException {
Log.d(TAG, "unimplemented Method: newCastContextImpl");
return new ICastContext.Stub() {
@Override
public Bundle getMergedSelectorAsBundle() throws RemoteException {
Log.d(TAG, "unimplemented Method: getMergedSelectorAsBundle");
return new Bundle();
}
@Override
public boolean isApplicationVisible() throws RemoteException {
Log.d(TAG, "unimplemented Method: isApplicationVisible");
return true;
}
@Override
public ISessionManager getSessionManager() throws RemoteException {
Log.d(TAG, "unimplemented Method: getSessionManager");
return new ISessionManager.Stub(){
@Override
public IObjectWrapper getWrappedCurrentSession() throws RemoteException {
Log.d(TAG, "unimplemented Method: getWrappedCurrentSession");
return ObjectWrapper.wrap(null);
}
@Override
public void endCurrentSession(boolean b, boolean stopCasting) throws RemoteException {
Log.d(TAG, "unimplemented Method: endCurrentSession");
}
@Override
public IObjectWrapper getWrappedThis() throws RemoteException {
Log.d(TAG, "unimplemented Method: getWrappedThis");
return ObjectWrapper.wrap(this);
}
};
}
@Override
public void destroy() throws RemoteException {
Log.d(TAG, "unimplemented Method: destroy");
}
@Override
public void onActivityResumed(IObjectWrapper activity) throws RemoteException {
Log.d(TAG, "unimplemented Method: onActivityResumed");
}
@Override
public void onActivityPaused(IObjectWrapper activity) throws RemoteException {
Log.d(TAG, "unimplemented Method: onActivityPaused");
}
};
return null;
}
@Override
public ISession newSessionImpl(String s1, String s2, ISessionProxy proxy) throws RemoteException {
Log.d(TAG, "unimplemented Method: newSessionImpl");
return new ISession.Stub() {
};
return null;
}
@Override
public ICastSession newCastSessionImpl(CastOptions options, IObjectWrapper session, ICastConnectionController controller) throws RemoteException {
Log.d(TAG, "unimplemented Method: newCastSessionImpl");
return new ICastSession.Stub() {
};
return null;
}
@Override
public IMediaNotificationService newMediaNotificationServiceImpl(IObjectWrapper service, IObjectWrapper castContext, IObjectWrapper resources, CastMediaOptions options) throws RemoteException {
Log.d(TAG, "unimplemented Method: newMediaNotificationServiceImpl");
return new IMediaNotificationService.Stub() {
};
return null;
}
@Override
public IReconnectionService newReconnectionServiceImpl(IObjectWrapper service, IObjectWrapper sessionManager, IObjectWrapper discoveryManager) throws RemoteException {
Log.d(TAG, "unimplemented Method: newReconnectionServiceImpl");
return new IReconnectionService.Stub() {
};
return null;
}
@Override
public IFetchBitmapTask newFetchBitmapTaskImpl(IObjectWrapper asyncTask, IFetchBitmapTaskProgressPublisher progressPublisher, int i1, int i2, boolean b1, long l1, int i3, int i4, int i5) throws RemoteException {
Log.d(TAG, "unimplemented Method: newFetchBitmapTaskImpl");
return new IFetchBitmapTask.Stub() {
};
return null;
}
}

View File

@ -0,0 +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.
*/
package org.microg.gms.measurement;
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 org.microg.gms.BaseService;
import org.microg.gms.common.GmsService;
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);
}
}

View File

@ -0,0 +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.
*/
package org.microg.gms.measurement;
import android.os.Parcel;
import android.os.RemoteException;
import android.util.Log;
import com.google.android.gms.measurement.internal.IMeasurementService;
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;
}
}

View File

@ -0,0 +1,65 @@
/*
* 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.phenotype;
import android.content.ContentProvider;
import android.content.ContentValues;
import android.database.Cursor;
import android.database.MatrixCursor;
import android.net.Uri;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.util.Log;
public class ConfigurationProvider extends ContentProvider {
private static final String TAG = "GmsPhenotypeCfgProvider";
@Override
public boolean onCreate() {
Log.d(TAG, "unimplemented Method: onCreate");
return false;
}
@Nullable
@Override
public Cursor query(@NonNull Uri uri, @Nullable String[] projection, @Nullable String selection, @Nullable String[] selectionArgs, @Nullable String sortOrder) {
selection = Uri.decode(uri.getLastPathSegment());
if (selection == null) return null;
return new MatrixCursor(new String[]{"key", "value"});
}
@Nullable
@Override
public String getType(@NonNull Uri uri) {
return null;
}
@Nullable
@Override
public Uri insert(@NonNull Uri uri, @Nullable ContentValues contentValues) {
throw new UnsupportedOperationException();
}
@Override
public int delete(@NonNull Uri uri, @Nullable String s, @Nullable String[] strings) {
throw new UnsupportedOperationException();
}
@Override
public int update(@NonNull Uri uri, @Nullable ContentValues contentValues, @Nullable String s, @Nullable String[] strings) {
throw new UnsupportedOperationException();
}
}