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

Verified Commit 2e286a7e authored by Marvin W.'s avatar Marvin W. 🐿️
Browse files

Mark oneway functions as oneway in aidl

parent 60d26b80
Loading
Loading
Loading
Loading
+11 −11
Original line number Diff line number Diff line
@@ -8,15 +8,15 @@ import com.google.firebase.auth.api.internal.GetTokenResponse;
import com.google.firebase.auth.api.internal.ResetPasswordResponse;

interface IFirebaseAuthCallbacks {
    void onGetTokenResponse(in GetTokenResponse response) = 0;
    void onGetTokenResponseAndUser(in GetTokenResponse response, in GetAccountInfoUser user) = 1;
    void onCreateAuthUriResponse(in CreateAuthUriResponse response) = 2;
    void onResetPasswordResponse(in ResetPasswordResponse response) = 3;
    void onFailure(in Status status) = 4;
    void onDeleteAccountResponse() = 5;
    void onEmailVerificationResponse() = 6;

    void onSendVerificationCodeResponse(String sessionInfo) = 8;
    void onVerificationCompletedResponse(in PhoneAuthCredential credential) = 9;
    void onVerificationAutoTimeOut(String sessionInfo) = 10;
    oneway void onGetTokenResponse(in GetTokenResponse response) = 0;
    oneway void onGetTokenResponseAndUser(in GetTokenResponse response, in GetAccountInfoUser user) = 1;
    oneway void onCreateAuthUriResponse(in CreateAuthUriResponse response) = 2;
    oneway void onResetPasswordResponse(in ResetPasswordResponse response) = 3;
    oneway void onFailure(in Status status) = 4;
    oneway void onDeleteAccountResponse() = 5;
    oneway void onEmailVerificationResponse() = 6;
    //oneway void onSetAccountInfo(String s) = 7
    oneway void onSendVerificationCodeResponse(String sessionInfo) = 8;
    oneway void onVerificationCompletedResponse(in PhoneAuthCredential credential) = 9;
    oneway void onVerificationAutoTimeOut(String sessionInfo) = 10;
}
+2 −2
Original line number Diff line number Diff line
@@ -4,6 +4,6 @@ import com.google.android.gms.common.api.Status;
import com.google.android.gms.phenotype.Configurations;

interface IPhenotypeCallbacks {
    void onRegister(in Status status) = 0;
    void onConfigurations(in Status status, in Configurations configurations) = 3;
    oneway void onRegister(in Status status) = 0;
    oneway void onConfigurations(in Status status, in Configurations configurations) = 3;
}
+8 −8
Original line number Diff line number Diff line
@@ -9,12 +9,12 @@ import com.google.android.gms.safetynet.RemoveHarmfulAppData;
import com.google.android.gms.safetynet.SafeBrowsingData;

interface ISafetyNetCallbacks {
    void onAttestationData(in Status status, in AttestationData attestationData) = 0;
    void onString(String s) = 1;
    void onSafeBrowsingData(in Status status, in SafeBrowsingData safeBrowsingData) = 2;
    void onBoolean(in Status status, boolean b) = 3;
    void onHarmfulAppsData(in Status status, in List<HarmfulAppsData> harmfulAppsData) = 4;
    void onRecaptchaResult(in Status status, in RecaptchaResultData recaptchaResultData) = 5;
    void onHarmfulAppsInfo(in Status status, in HarmfulAppsInfo harmfulAppsInfo) = 7;
    void onRemoveHarmfulAppData(in Status status, in RemoveHarmfulAppData removeHarmfulAppData) = 14;
    oneway void onAttestationData(in Status status, in AttestationData attestationData) = 0;
    oneway void onString(String s) = 1;
    oneway void onSafeBrowsingData(in Status status, in SafeBrowsingData safeBrowsingData) = 2;
    oneway void onBoolean(in Status status, boolean b) = 3;
    oneway void onHarmfulAppsData(in Status status, in List<HarmfulAppsData> harmfulAppsData) = 4;
    oneway void onRecaptchaResult(in Status status, in RecaptchaResultData recaptchaResultData) = 5;
    oneway void onHarmfulAppsInfo(in Status status, in HarmfulAppsInfo harmfulAppsInfo) = 7;
    oneway void onRemoveHarmfulAppData(in Status status, in RemoveHarmfulAppData removeHarmfulAppData) = 14;
}
+21 −0
Original line number Diff line number Diff line
/*
 * SPDX-FileCopyrightText: 2021, microG Project Team
 * SPDX-License-Identifier: Apache-2.0
 */

package org.microg.gms.utils

import android.os.Binder
import android.os.Parcel
import android.util.Log

fun warnOnTransactionIssues(tag: String, code: Int, reply: Parcel?, flags: Int, base: () -> Boolean): Boolean {
    if (base.invoke()) {
        if ((flags and Binder.FLAG_ONEWAY) > 0 && (reply?.dataSize() ?: 0) > 0) {
            Log.w(tag, "onTransact[$code] is oneway, but returned data")
        }
        return true
    }
    Log.w(tag, "onTransact[$code] is not processed.")
    return (flags and Binder.FLAG_ONEWAY) > 0 // Don't return false on oneway transaction to suppress warning
}
+7 −7
Original line number Diff line number Diff line
@@ -4,11 +4,11 @@ import com.google.android.gms.cast.LaunchOptions;
import com.google.android.gms.cast.JoinOptions;

interface ICastDeviceController {
  void disconnect() = 0;
  void stopApplication(String sessionId) = 4;
  void sendMessage(String namespace, String message, long requestId) = 8;
  void registerNamespace(String namespace) = 10;
  void unregisterNamespace(String namespace) = 11;
  void launchApplication(String applicationId, in LaunchOptions launchOptions) = 12;
  void joinApplication(String applicationId, String sessionId, in JoinOptions joinOptions) = 13;
  oneway void disconnect() = 0;
  oneway void stopApplication(String sessionId) = 4;
  oneway void sendMessage(String namespace, String message, long requestId) = 8;
  oneway void registerNamespace(String namespace) = 10;
  oneway void unregisterNamespace(String namespace) = 11;
  oneway void launchApplication(String applicationId, in LaunchOptions launchOptions) = 12;
  oneway void joinApplication(String applicationId, String sessionId, in JoinOptions joinOptions) = 13;
}
Loading