Add Global Search API classes, use SafeParcel from maven

This commit is contained in:
Marvin W 2016-09-24 20:37:20 +02:00
parent 18da23b482
commit a421ff5d95
No known key found for this signature in database
GPG Key ID: 072E9235DB996F2A
29 changed files with 529 additions and 8 deletions

3
.gitmodules vendored
View File

@ -1,3 +0,0 @@
[submodule "SafeParcel"]
path = extern/SafeParcel
url = https://github.com/microg/android_external_SafeParcel.git

1
extern/SafeParcel vendored

@ -1 +0,0 @@
Subproject commit 7e7fcee20047116b87406ae0e1296489a46bac73

View File

@ -0,0 +1,5 @@
package com.google.android.gms.location.places.internal;
interface IGooglePlaceDetectionService {
}

View File

@ -0,0 +1,5 @@
package com.google.android.gms.location.places.internal;
interface IGooglePlacesService {
}

View File

@ -0,0 +1,3 @@
package com.google.android.gms.search.global;
parcelable GetCurrentExperimentIdsRequest;

View File

@ -0,0 +1,3 @@
package com.google.android.gms.search.global;
parcelable GetCurrentExperimentIdsResponse;

View File

@ -0,0 +1,3 @@
package com.google.android.gms.search.global;
parcelable GetGlobalSearchSourcesRequest;

View File

@ -0,0 +1,3 @@
package com.google.android.gms.search.global;
parcelable GetGlobalSearchSourcesResponse;

View File

@ -0,0 +1,3 @@
package com.google.android.gms.search.global;
parcelable GetPendingExperimentIdsRequest;

View File

@ -0,0 +1,3 @@
package com.google.android.gms.search.global;
parcelable GetPendingExperimentIdsResponse;

View File

@ -0,0 +1,3 @@
package com.google.android.gms.search.global;
parcelable SetExperimentIdsRequest;

View File

@ -0,0 +1,3 @@
package com.google.android.gms.search.global;
parcelable SetExperimentIdsResponse;

View File

@ -0,0 +1,3 @@
package com.google.android.gms.search.global;
parcelable SetIncludeInGlobalSearchRequest;

View File

@ -0,0 +1,3 @@
package com.google.android.gms.search.global;
parcelable SetIncludeInGlobalSearchResponse;

View File

@ -0,0 +1,16 @@
package com.google.android.gms.search.global.internal;
import com.google.android.gms.search.global.GetCurrentExperimentIdsResponse;
import com.google.android.gms.search.global.GetGlobalSearchSourcesResponse;
import com.google.android.gms.search.global.GetPendingExperimentIdsResponse;
import com.google.android.gms.search.global.SetExperimentIdsResponse;
import com.google.android.gms.search.global.SetIncludeInGlobalSearchResponse;
interface IGlobalSearchAdminCallbacks {
void onGetGlobalSearchSourcesResponse(in GetGlobalSearchSourcesResponse request) = 1;
void onSetExperimentIdsResponse(in SetExperimentIdsResponse response) = 2;
void onGetCurrentExperimentIdsResponse(in GetCurrentExperimentIdsResponse response) = 3;
void onGetPendingExperimentIdsResponse(in GetPendingExperimentIdsResponse response) = 4;
void onSetIncludeInGlobalSearchResponse(in SetIncludeInGlobalSearchResponse response) = 7;
}

View File

@ -1,5 +1,17 @@
package com.google.android.gms.search.global.internal;
interface IGlobalSearchAdminService {
import com.google.android.gms.search.global.GetCurrentExperimentIdsRequest;
import com.google.android.gms.search.global.GetGlobalSearchSourcesRequest;
import com.google.android.gms.search.global.GetPendingExperimentIdsRequest;
import com.google.android.gms.search.global.SetExperimentIdsRequest;
import com.google.android.gms.search.global.SetIncludeInGlobalSearchRequest;
import com.google.android.gms.search.global.internal.IGlobalSearchAdminCallbacks;
interface IGlobalSearchAdminService {
void getGlobalSearchSources(in GetGlobalSearchSourcesRequest request, IGlobalSearchAdminCallbacks callbacks) = 1;
void setExperimentIds(in SetExperimentIdsRequest request, IGlobalSearchAdminCallbacks callbacks) = 2;
void getCurrentExperimentIds(in GetCurrentExperimentIdsRequest request, IGlobalSearchAdminCallbacks callbacks) = 3;
void getPendingExperimentIds(in GetPendingExperimentIdsRequest request, IGlobalSearchAdminCallbacks callbacks) = 4;
void setIncludeInGlobalSearch(in SetIncludeInGlobalSearchRequest request, IGlobalSearchAdminCallbacks callbacks) = 7;
}

View File

@ -0,0 +1,28 @@
/*
* Copyright 2013-2016 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.search.global;
import org.microg.safeparcel.AutoSafeParcelable;
import org.microg.safeparcel.SafeParceled;
public class GetCurrentExperimentIdsRequest extends AutoSafeParcelable {
@SafeParceled(1000)
private int versionCode = 1;
public static final Creator<GetCurrentExperimentIdsRequest> CREATOR = new AutoCreator<GetCurrentExperimentIdsRequest>(GetCurrentExperimentIdsRequest.class);
}

View File

@ -0,0 +1,57 @@
/*
* Copyright 2013-2016 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.search.global;
import com.google.android.gms.common.api.Status;
import org.microg.safeparcel.AutoSafeParcelable;
import org.microg.safeparcel.SafeParceled;
import java.util.Arrays;
public class GetCurrentExperimentIdsResponse extends AutoSafeParcelable {
@SafeParceled(1000)
private int versionCode = 1;
@SafeParceled(1)
public final Status status;
@SafeParceled(2)
public final int[] experimentIds;
private GetCurrentExperimentIdsResponse() {
status = null;
experimentIds = null;
}
public GetCurrentExperimentIdsResponse(Status status, int[] experimentIds) {
this.status = status;
this.experimentIds = experimentIds;
}
@Override
public String toString() {
final StringBuilder sb = new StringBuilder("GetCurrentExperimentIdsResponse{");
sb.append("status=").append(status);
sb.append(", experimentIds=").append(Arrays.toString(experimentIds));
sb.append('}');
return sb.toString();
}
public static final Creator<GetCurrentExperimentIdsResponse> CREATOR = new AutoCreator<GetCurrentExperimentIdsResponse>(GetCurrentExperimentIdsResponse.class);
}

View File

@ -0,0 +1,39 @@
/*
* Copyright 2013-2016 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.search.global;
import org.microg.safeparcel.AutoSafeParcelable;
import org.microg.safeparcel.SafeParceled;
public class GetGlobalSearchSourcesRequest extends AutoSafeParcelable {
@SafeParceled(1000)
private int versionCode = 1;
@SafeParceled(1)
public boolean bool;
@Override
public String toString() {
final StringBuilder sb = new StringBuilder("GetGlobalSearchSourcesRequest{");
sb.append("bool=").append(bool);
sb.append('}');
return sb.toString();
}
public static final Creator<GetGlobalSearchSourcesRequest> CREATOR = new AutoCreator<GetGlobalSearchSourcesRequest>(GetGlobalSearchSourcesRequest.class);
}

View File

@ -0,0 +1,59 @@
/*
* Copyright 2013-2016 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.search.global;
import android.os.Parcelable;
import com.google.android.gms.common.api.Status;
import org.microg.safeparcel.AutoSafeParcelable;
import org.microg.safeparcel.SafeParceled;
import java.util.Arrays;
public class GetGlobalSearchSourcesResponse extends AutoSafeParcelable {
@SafeParceled(1000)
private int versionCode = 1;
@SafeParceled(1)
public final Status status;
@SafeParceled(2)
public final Parcelable[] sources;
private GetGlobalSearchSourcesResponse() {
status = null;
sources = null;
}
public GetGlobalSearchSourcesResponse(Status status, Parcelable[] sources) {
this.status = status;
this.sources = sources;
}
@Override
public String toString() {
final StringBuilder sb = new StringBuilder("GetGlobalSearchSourcesResponse{");
sb.append("status=").append(status);
sb.append(", sources=").append(Arrays.toString(sources));
sb.append('}');
return sb.toString();
}
public static final Creator<GetGlobalSearchSourcesResponse> CREATOR = new AutoCreator<GetGlobalSearchSourcesResponse>(GetGlobalSearchSourcesResponse.class);
}

View File

@ -0,0 +1,28 @@
/*
* Copyright 2013-2016 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.search.global;
import org.microg.safeparcel.AutoSafeParcelable;
import org.microg.safeparcel.SafeParceled;
public class GetPendingExperimentIdsRequest extends AutoSafeParcelable {
@SafeParceled(1000)
private int versionCode = 1;
public static final Creator<GetPendingExperimentIdsRequest> CREATOR = new AutoCreator<GetPendingExperimentIdsRequest>(GetPendingExperimentIdsRequest.class);
}

View File

@ -0,0 +1,57 @@
/*
* Copyright 2013-2016 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.search.global;
import com.google.android.gms.common.api.Status;
import org.microg.safeparcel.AutoSafeParcelable;
import org.microg.safeparcel.SafeParceled;
import java.util.Arrays;
public class GetPendingExperimentIdsResponse extends AutoSafeParcelable {
@SafeParceled(1000)
private int versionCode = 1;
@SafeParceled(1)
public final Status status;
@SafeParceled(2)
public final int[] experimentIds;
private GetPendingExperimentIdsResponse() {
status = null;
experimentIds = null;
}
public GetPendingExperimentIdsResponse(Status status, int[] experimentIds) {
this.status = status;
this.experimentIds = experimentIds;
}
@Override
public String toString() {
final StringBuilder sb = new StringBuilder("GetPendingExperimentIdsResponse{");
sb.append("status=").append(status);
sb.append(", experimentIds=").append(Arrays.toString(experimentIds));
sb.append('}');
return sb.toString();
}
public static final Creator<GetPendingExperimentIdsResponse> CREATOR = new AutoCreator<GetPendingExperimentIdsResponse>(GetPendingExperimentIdsResponse.class);
}

View File

@ -0,0 +1,45 @@
/*
* Copyright 2013-2016 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.search.global;
import org.microg.safeparcel.AutoSafeParcelable;
import org.microg.safeparcel.SafeParceled;
import java.util.Arrays;
public class SetExperimentIdsRequest extends AutoSafeParcelable {
@SafeParceled(1000)
private int versionCode = 1;
@SafeParceled(1)
public byte[] experimentIds;
@SafeParceled(2)
public boolean enable;
@Override
public String toString() {
final StringBuilder sb = new StringBuilder("SetExperimentIdsRequest{");
sb.append("experimentIds=").append(Arrays.toString(experimentIds));
sb.append(", enable=").append(enable);
sb.append('}');
return sb.toString();
}
public static final Creator<SetExperimentIdsRequest> CREATOR = new AutoCreator<SetExperimentIdsRequest>(SetExperimentIdsRequest.class);
}

View File

@ -0,0 +1,49 @@
/*
* Copyright 2013-2016 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.search.global;
import com.google.android.gms.common.api.Status;
import org.microg.safeparcel.AutoSafeParcelable;
import org.microg.safeparcel.SafeParceled;
public class SetExperimentIdsResponse extends AutoSafeParcelable {
@SafeParceled(1000)
private int versionCode = 1;
@SafeParceled(1)
public final Status status;
private SetExperimentIdsResponse() {
status = null;
}
public SetExperimentIdsResponse(Status status) {
this.status = status;
}
@Override
public String toString() {
final StringBuilder sb = new StringBuilder("SetExperimentIdsResponse{");
sb.append("status=").append(status);
sb.append('}');
return sb.toString();
}
public static final Creator<SetExperimentIdsResponse> CREATOR = new AutoCreator<SetExperimentIdsResponse>(SetExperimentIdsResponse.class);
}

View File

@ -0,0 +1,47 @@
/*
* Copyright 2013-2016 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.search.global;
import org.microg.safeparcel.AutoSafeParcelable;
import org.microg.safeparcel.SafeParceled;
public class SetIncludeInGlobalSearchRequest extends AutoSafeParcelable {
@SafeParceled(1000)
private int versionCode = 1;
@SafeParceled(1)
public String packageName;
@SafeParceled(2)
public String source;
@SafeParceled(3)
public boolean enabled;
@Override
public String toString() {
final StringBuilder sb = new StringBuilder("SetIncludeInGlobalSearchRequest{");
sb.append("packageName='").append(packageName).append('\'');
sb.append(", source='").append(source).append('\'');
sb.append(", enabled=").append(enabled);
sb.append('}');
return sb.toString();
}
public static final Creator<SetIncludeInGlobalSearchRequest> CREATOR = new AutoCreator<SetIncludeInGlobalSearchRequest>(SetIncludeInGlobalSearchRequest.class);
}

View File

@ -0,0 +1,49 @@
/*
* Copyright 2013-2016 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.search.global;
import com.google.android.gms.common.api.Status;
import org.microg.safeparcel.AutoSafeParcelable;
import org.microg.safeparcel.SafeParceled;
public class SetIncludeInGlobalSearchResponse extends AutoSafeParcelable {
@SafeParceled(1000)
private int versionCode = 1;
@SafeParceled(1)
public final Status status;
private SetIncludeInGlobalSearchResponse() {
status = null;
}
public SetIncludeInGlobalSearchResponse(Status status) {
this.status = status;
}
@Override
public String toString() {
final StringBuilder sb = new StringBuilder("SetIncludeInGlobalSearchResponse{");
sb.append("status=").append(status);
sb.append('}');
return sb.toString();
}
public static final Creator<SetIncludeInGlobalSearchResponse> CREATOR = new AutoCreator<SetIncludeInGlobalSearchResponse>(SetIncludeInGlobalSearchResponse.class);
}

View File

@ -48,5 +48,5 @@ android {
dependencies {
compile 'com.android.support:support-v4:23.4.0'
compile project(':safe-parcel')
compile 'org.microg:safe-parcel:1.4.0'
}

View File

@ -66,7 +66,7 @@ public enum GmsService {
CONTEXT_MANAGER(47, "com.google.android.contextmanager.service.ContextManagerService.START"),
AUDIO_MODEM(48, "com.google.android.gms.audiomodem.service.AudioModemService.START"),
NEARBY_SHARING(49, "com.google.android.gms.nearby.sharing.service.NearbySharingService.START"),
LIGHTWEIGHT_NETWORK_QUALITY(51, "com.google.android.gms.herrevad.services.LightweightNetworkQualityAndroidService.START"),
LIGHTWEIGHT_NETWORK_QUALITY(50, "com.google.android.gms.herrevad.services.LightweightNetworkQualityAndroidService.START"),
PHENOTYPE(51, "com.google.android.gms.phenotype.service.START"),
VOICE_UNLOCK(52, "com.google.android.gms.speech.service.START"),
NEARBY_CONNECTIONS(54, "com.google.android.gms.nearby.connection.service.START"),

View File

@ -1 +0,0 @@
extern/SafeParcel/safe-parcel