Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Unverified Commit 4a66676a authored by Marvin W.'s avatar Marvin W. 🐿️
Browse files

Update outdated API classes

parent dcf5f1fe
Loading
Loading
Loading
Loading
+17 −17
Original line number Diff line number Diff line
@@ -6,22 +6,22 @@ import com.google.android.gms.measurement.internal.EventParcel;
import com.google.android.gms.measurement.internal.UserAttributeParcel;

interface IMeasurementService {
    void f1(in EventParcel event, in AppMetadata app) = 0;
    void f2(in UserAttributeParcel attribute, in AppMetadata app) = 1;
    void f4(in AppMetadata app) = 3;
//    void f5(in EventParcel p0, String p1, String p2) = 4;
//    void f6(in AppMetadata p0) = 5;
//    List<UserAttributeParcel> f7(in AppMetadata p0, boolean p1) = 6;
//    byte[] f9(in EventParcel p0, String p1) = 8;
    void f10(long p0, String p1, String p2, String p3) = 9;
    String f11(in AppMetadata app) = 10;
    void f12(in ConditionalUserPropertyParcel property, in AppMetadata app) = 11;
    void sendEvent(in EventParcel event, in AppMetadata app) = 0;
    void sendUserProperty(in UserAttributeParcel attribute, in AppMetadata app) = 1;
    void sendAppLaunch(in AppMetadata app) = 3;
//    void f5(in EventParcel event, String p1, String p2) = 4;
    void sendMeasurementEnabled(in AppMetadata p0) = 5;
    List<UserAttributeParcel> getAllUserProperties(in AppMetadata app, boolean includeInternal) = 6;
//    byte[] f9(in EventParcel event, String p1) = 8;
    void sendCurrentScreen(long id, String name, String referrer, String packageName) = 9;
    String getAppInstanceId(in AppMetadata app) = 10;
    void sendConditionalUserProperty(in ConditionalUserPropertyParcel property, in AppMetadata app) = 11;
//    void f13(ConditionalUserPropertyParcel p0) = 12;
//    List<UserAttributeParcel> getUserProperties(String p0, String p1, boolean p2, in AppMetadata p3) = 13;
//    List<UserAttributeParcel> getUserPropertiesAs(String p0, String p1, String p2, boolean p3) = 14;
//    List<ConditionalUserPropertyParcel> getConditionalUserProperties(String p0, String p1, in AppMetadata p2) = 15;
//    List<ConditionalUserPropertyParcel> getCondtionalUserPropertiesAs(String p0, String p1, String p2) = 16;
//    void f18(in AppMetadata p0) = 17;
    void setDefaultEventParameters(in Bundle params, in AppMetadata app) = 18;
//    void f20(in AppMetadata p0) = 19;
    List<UserAttributeParcel> getUserProperties(String origin, String propertyNamePrefix, boolean includeInternal, in AppMetadata app) = 13;
    List<UserAttributeParcel> getUserPropertiesAs(String packageName, String origin, String propertyNamePrefix, boolean includeInternal) = 14;
    List<ConditionalUserPropertyParcel> getConditionalUserProperties(String origin, String propertyNamePrefix, in AppMetadata app) = 15;
    List<ConditionalUserPropertyParcel> getConditionalUserPropertiesAs(String packageName, String origin, String propertyNamePrefix) = 16;
    void reset(in AppMetadata app) = 17;
    void sendDefaultEventParameters(in Bundle params, in AppMetadata app) = 18;
    void sendConsentSettings(in AppMetadata app) = 19;
}
+6 −0
Original line number Diff line number Diff line
@@ -64,6 +64,12 @@ public class AppMetadata extends AutoSafeParcelable {
    private boolean sgtmUploadEnabled;
    @Field(29)
    private long targetOsVersion;
    @Field(30)
    private int consentSource;
    @Field(31)
    private String dmaConsent;
    @Field(32)
    private int adServicesVersion;

    public String toString() {
        return "AppMetadata[" + packageName + "]";
+5 −3
Original line number Diff line number Diff line
@@ -26,13 +26,15 @@ import org.microg.safeparcel.AutoSafeParcelable;
import org.microg.safeparcel.SafeParceled;

public class GoogleCertificatesQuery extends AutoSafeParcelable {
    @SafeParceled(1)
    @Field(1)
    private String packageName;
    @SafeParceled(2)
    @Field(2)
    private IBinder certDataBinder;
    private CertData certData;
    @SafeParceled(3)
    @Field(3)
    private boolean allowNonRelease;
    @Field(4)
    private boolean allowTestKeys;

    public String getPackageName() {
        return packageName;
+5 −3
Original line number Diff line number Diff line
@@ -93,7 +93,7 @@ public final class SafeParcelReflectionUtil {
                try {
                    readField(object, parcel, header, fieldDescriptor);
                } catch (Exception e) {
                    Log.w(TAG, String.format("Error reading field: %d in %s, skipping.", fieldId, descriptor.tClass.getName()), e);
                    Log.w(TAG, String.format("Error reading field: %d of type %s in %s, skipping.", fieldId, fieldDescriptor.type, descriptor.tClass.getName()), e);
                    SafeParcelReader.skip(parcel, header);
                }
            }
@@ -182,7 +182,9 @@ public final class SafeParcelReflectionUtil {
                SafeParcelWriter.write(parcel, descriptor.id, (IBinder) descriptor.field.get(object), descriptor.mayNull);
                break;
            case Interface:
                SafeParcelWriter.write(parcel, descriptor.id, ((IInterface) descriptor.field.get(object)).asBinder(), descriptor.mayNull);
                IInterface iInterface = ((IInterface) descriptor.field.get(object));
                IBinder iBinder = iInterface != null ? iInterface.asBinder() : null;
                SafeParcelWriter.write(parcel, descriptor.id, iBinder, descriptor.mayNull);
                break;
            case StringList:
                SafeParcelWriter.writeStringList(parcel, descriptor.id, ((List<String>) descriptor.field.get(object)), descriptor.mayNull);
@@ -492,7 +494,7 @@ public final class SafeParcelReflectionUtil {
                    return SafeParcelType.Interface;
                if (clazz == List.class || clazz == ArrayList.class) {
                    listItemClass = getListItemClass(field);
                    if (listItemClass == String.class && useValueParcel) return SafeParcelType.StringList;
                    if (listItemClass == String.class && !useValueParcel) return SafeParcelType.StringList;
                    if (listItemClass == Integer.class && annotation.useDirectList()) return SafeParcelType.IntegerList;
                    if (listItemClass == Boolean.class && annotation.useDirectList()) return SafeParcelType.BooleanList;
                    if (listItemClass == Long.class && annotation.useDirectList()) return SafeParcelType.LongList;
+77 −16
Original line number Diff line number Diff line
/*
 * 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.
 * SPDX-FileCopyrightText: 2016 microG Project Team
 * SPDX-License-Identifier: Apache-2.0
 * Notice: Portions of this file are reproduced from work created and shared by Google and used
 *         according to terms described in the Creative Commons 4.0 Attribution License.
 *         See https://developers.google.com/readme/policies for details.
 */

package com.google.android.gms.cast.framework;
@@ -26,6 +18,10 @@ import com.google.android.gms.cast.LaunchOptions;
import java.util.ArrayList;
import java.util.List;

/**
 * Configuration parameters for initializing the {@link CastContext}. The {@link CastOptions.Builder} is used to create an instance of
 * {@link CastOptions}, and so contains the corresponding setter methods.
 */
public class CastOptions extends AutoSafeParcelable {
    @Field(1)
    private int versionCode = 1;
@@ -45,19 +41,84 @@ public class CastOptions extends AutoSafeParcelable {
    private boolean enableReconnectionService;
    @Field(9)
    private double volumeDeltaBeforeIceCreamSandwich;
    @Field(10)
    private boolean enableIpv6Support;
    @Field(11)
    private boolean outputSwitcherEnabled;
    @Field(12)
    private boolean isRemoteToLocalEnabled;
    @Field(13)
    private List<String> routeDiscoveryReceiverApplicationIds;
    @Field(14)
    private boolean sessionTransferEnabled;
    @Field(15)
    private int persistCastButtonEnabled;
    @Field(16)
    private boolean resumeSessionAfterTransferEnabled;

    public String getReceiverApplicationId() {
        return this.receiverApplicationId;
    /**
     * Returns the {@link CastMediaOptions} that is used to configure a media session.
     */
    public CastMediaOptions getCastMediaOptions() {
        return castMediaOptions;
    }

    /**
     * Returns {@code true} if {@link ReconnectionService} should be enabled when needed to better handle session recovery.
     */
    public boolean getEnableReconnectionService() {
        return enableReconnectionService;
    }

    /**
     * Returns the {@link LaunchOptions}.
     */
    public LaunchOptions getLaunchOptions() {
        return this.launchOptions;
        return launchOptions;
    }

    /**
     * Returns the cast receiver application ID. This ID is used in discovering supported receivers, and launching an application
     * when starting a new session.
     */
    public String getReceiverApplicationId() {
        return receiverApplicationId;
    }

    /**
     * Returns {@code true} if the saved session should be resumed if it was dropped unexpectedly. Returns {@code false} if the saved
     * session should not be resumed in this case.
     */
    public boolean getResumeSavedSession() {
        return resumeSavedSession;
    }

    /**
     * Returns {@code true} if the receiver application should be stopped when the session is ended by the user. Returns {@code false} if the
     * receiver application should not be stopped in this case.
     */
    public boolean getStopReceiverApplicationWhenEndingSession() {
        return stopReceiverApplicationWhenEndingSession;
    }

    /**
     * Returns the list of supported cast namespaces.
     */
    @NonNull
    public List<String> getSupportedNamespaces() {
        return supportedNamespaces;
    }

    /**
     * Returns the amount of receiver device volume to increase or decrease when the physical volume key is pressed on an
     * Android device older than ICE CREAM SANDWICH. The SDK will call this method to obtain the volume delta when
     * {@link CastContext#onDispatchVolumeKeyEventBeforeJellyBean(KeyEvent)} is called. The return value is not used on
     * Android devices running ICE CREAM SANDWICH or newer.
     */
    @Deprecated
    public double getVolumeDeltaBeforeIceCreamSandwich() {
        return volumeDeltaBeforeIceCreamSandwich;
    }

    public static Creator<CastOptions> CREATOR = new AutoCreator<CastOptions>(CastOptions.class);
}
Loading