Skip to content

Commit

Permalink
Add basic dummy for Google Help and Feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
mar-v-in committed Aug 18, 2023
1 parent e73704f commit 8590f6d
Show file tree
Hide file tree
Showing 21 changed files with 594 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
package com.google.android.gms.feedback;

parcelable FeedbackOptions;
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
package com.google.android.gms.googlehelp;

parcelable GoogleHelp;
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
package com.google.android.gms.googlehelp;

parcelable InProductHelp;
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
package com.google.android.gms.googlehelp;

parcelable SupportRequestHelp;
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package com.google.android.gms.googlehelp.internal.common;

import android.graphics.Bitmap;
import android.os.Bundle;
import android.os.IBinder;
import android.os.Parcel;

import com.google.android.gms.googlehelp.GoogleHelp;
import com.google.android.gms.googlehelp.InProductHelp;

interface IGoogleHelpCallbacks {
void onProcessGoogleHelpFinished(in GoogleHelp googleHelp) = 0;
oneway void onSaveAsyncPsdFinished() = 6;
oneway void onSaveAsyncPsbdFinished() = 7;
void onRequestChatSupportSuccess(int chatQueuePosition) = 8;
void onRequestChatSupportFailed() = 9;
void onRequestC2cSupportSuccess() = 10;
void onRequestC2cSupportFailed() = 11;
void onSuggestions(in byte[] suggestions) = 12;
void onNoSuggestions() = 13;
void onEscalationOptions(in byte[] options) = 14;
void onNoEscalationOptions() = 15;
void onProcessInProductHelpFinished(in InProductHelp inProductHelp) = 16;
void onRealtimeSupportStatus(in byte[] status) = 17;
void onNoRealtimeSupportStatus() = 18;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package com.google.android.gms.googlehelp.internal.common;

import android.graphics.Bitmap;
import android.os.Bundle;

import com.google.android.gms.feedback.FeedbackOptions;
import com.google.android.gms.googlehelp.GoogleHelp;
import com.google.android.gms.googlehelp.InProductHelp;
import com.google.android.gms.googlehelp.SupportRequestHelp;
import com.google.android.gms.googlehelp.internal.common.IGoogleHelpCallbacks;

interface IGoogleHelpService {
void processGoogleHelpAndPip(in GoogleHelp googleHelp, IGoogleHelpCallbacks callbacks) = 0;
void processGoogleHelpAndPipWithBitmap(in GoogleHelp googleHelp, in Bitmap bitmap, IGoogleHelpCallbacks callbacks) = 1;
oneway void saveAsyncHelpPsd(in Bundle bundle, long timestamp, in GoogleHelp googleHelp, IGoogleHelpCallbacks callbacks) = 7;
oneway void saveAsyncFeedbackPsd(in Bundle bundle, long timestamp, in GoogleHelp googleHelp, IGoogleHelpCallbacks callbacks) = 8;
oneway void saveAsyncFeedbackPsbd(in FeedbackOptions options, in Bundle bundle, long timestamp, in GoogleHelp googleHelp, IGoogleHelpCallbacks callbacks) = 9;
oneway void requestChatSupport(in GoogleHelp googleHelp, String phoneNumber, String s2, IGoogleHelpCallbacks callbacks) = 10;
oneway void requestC2cSupport(in GoogleHelp googleHelp, String phoneNumber, String s2, IGoogleHelpCallbacks callbacks) = 11;
oneway void getSuggestions(in GoogleHelp googleHelp, IGoogleHelpCallbacks callbacks) = 12;
oneway void getEscalationOptions(in GoogleHelp googleHelp, IGoogleHelpCallbacks callbacks) = 13;
oneway void requestChatSupportWithSupportRequest(in SupportRequestHelp supportRequestHelp, IGoogleHelpCallbacks callbacks) = 14;
oneway void requestC2cSupportWithSupportRequest(in SupportRequestHelp supportRequestHelp, IGoogleHelpCallbacks callbacks) = 15;
void processInProductHelpAndPip(in InProductHelp inProductHelp, in Bitmap bitmap, IGoogleHelpCallbacks callbacks) = 16;
oneway void getRealtimeSupportStatus(in GoogleHelp googleHelp, IGoogleHelpCallbacks callbacks) = 17;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
/*
* SPDX-FileCopyrightText: 2023 microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/

package com.google.android.gms.feedback;

import android.app.ApplicationErrorReport;
import android.graphics.Bitmap;
import org.microg.safeparcel.AutoSafeParcelable;

public class ErrorReport extends AutoSafeParcelable {
@Field(2)
public ApplicationErrorReport applicationErrorReport;
@Field(4)
public int unknownInt4;
@Field(12)
public int unknownInt12;
@Field(24)
public int unknownInt24;
@Field(25)
public int unknownInt25;
@Field(26)
public int unknownInt26;
@Field(27)
public int unknownInt27;
@Field(32)
public boolean unknownBool32;
@Field(33)
public int unknownInt33;
@Field(34)
public int unknownInt34;
@Field(35)
public boolean unknownBool35;
@Field(36)
public String exceptionClassName;
@Field(37)
public String throwFileName;
@Field(38)
public int throwLineNumber;
@Field(39)
public String throwClassName;
@Field(40)
public String throwMethodName;
@Field(41)
public String stackTrace;
@Field(42)
public String exceptionMessage;
@Field(50)
public boolean unknownBool50;
@Field(51)
public String unknownString51;
@Field(52)
public ThemeSettings themeSettings;
@Field(53)
public LogOptions logOptions;
@Field(55)
public boolean unknownBool55;
@Field(58)
public boolean unknownBool58;
@Field(59)
public Bitmap unknownBitmap59;
@Field(60)
public String unknownString60;
@Field(62)
public int unknownInt62;
@Field(63)
public int unknownInt63;
@Field(67)
public boolean unknownBool67;
@Field(68)
public boolean unknownBool68;
public static final Creator<ErrorReport> CREATOR = findCreator(ErrorReport.class);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/*
* SPDX-FileCopyrightText: 2023 microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/

package com.google.android.gms.feedback;

import android.app.ApplicationErrorReport;
import android.graphics.Bitmap;
import android.os.Bundle;
import org.microg.safeparcel.AutoSafeParcelable;

import java.util.List;

public class FeedbackOptions extends AutoSafeParcelable {
@Field(3)
public Bundle unknownBundle3;
@Field(6)
public ApplicationErrorReport applicationErrorReport;
@Field(9)
public String packageName;
@Field(10)
public List<FileTeleporter> files;
@Field(11)
public boolean unknownBool11;
@Field(12)
public ThemeSettings themeSettings;
@Field(13)
public LogOptions logOptions;
@Field(15)
public Bitmap screenshot;
@Field(17)
public boolean unknownBool17;
@Field(18)
public long unknownLong18;
@Field(19)
public boolean unknownBool19;
public static final Creator<FeedbackOptions> CREATOR = findCreator(FeedbackOptions.class);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/*
* SPDX-FileCopyrightText: 2023 microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/

package com.google.android.gms.feedback;

import org.microg.safeparcel.AutoSafeParcelable;

public class FileTeleporter extends AutoSafeParcelable {
public static final Creator<FileTeleporter> CREATOR = findCreator(FileTeleporter.class);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/*
* SPDX-FileCopyrightText: 2023 microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/

package com.google.android.gms.feedback;

import org.microg.safeparcel.AutoSafeParcelable;

public class LogOptions extends AutoSafeParcelable {
public static final Creator<LogOptions> CREATOR = findCreator(LogOptions.class);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/*
* SPDX-FileCopyrightText: 2023 microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/

package com.google.android.gms.feedback;

import androidx.annotation.NonNull;
import org.microg.gms.utils.ToStringHelper;
import org.microg.safeparcel.AutoSafeParcelable;

public class ThemeSettings extends AutoSafeParcelable {
@Field(2)
public int unknownInt2;
@Field(3)
public int unknownInt3;

@NonNull
@Override
public String toString() {
return ToStringHelper.name("ThemeSettings")
.field("2", unknownInt2)
.field("3", unknownInt3)
.end();
}

public static final Creator<ThemeSettings> CREATOR = findCreator(ThemeSettings.class);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/*
* SPDX-FileCopyrightText: 2023 microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/

package com.google.android.gms.googlehelp;

import org.microg.safeparcel.AutoSafeParcelable;

public class FRDProductSpecificDataEntry extends AutoSafeParcelable {
public static final Creator<FRDProductSpecificDataEntry> CREATOR = findCreator(FRDProductSpecificDataEntry.class);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
/*
* SPDX-FileCopyrightText: 2023 microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/

package com.google.android.gms.googlehelp;

import android.accounts.Account;
import android.app.PendingIntent;
import android.graphics.Bitmap;
import android.net.Uri;
import android.os.Bundle;
import androidx.annotation.NonNull;
import com.google.android.gms.feedback.ErrorReport;
import com.google.android.gms.feedback.ThemeSettings;
import com.google.android.gms.googlehelp.internal.common.OverflowMenuItem;
import com.google.android.gms.googlehelp.internal.common.TogglingData;
import org.microg.gms.utils.ToStringHelper;
import org.microg.safeparcel.AutoSafeParcelable;

import java.util.List;

public class GoogleHelp extends AutoSafeParcelable {
@Field(1)
private int versionCode;
@Field(2)
public String appContext;
@Field(3)
public Account account;
@Field(4)
public Bundle extras;
@Field(5)
public boolean unknownBool5;
@Field(6)
public boolean unknownBool6;
@Field(7)
public List<String> unknownStringList7;
@Field(15)
public Uri uri;
@Field(16)
public List<OverflowMenuItem> overflowMenuItems;
@Field(17)
public int unknownAlwaysZero17;
@Field(18)
public List<OfflineSuggestion> offlineSuggestions;
@Field(20)
public int unknownInt20;
@Field(21)
public int unknownInt21;
@Field(22)
public boolean unknownBool22;
@Field(23)
public ErrorReport errorReport;
@Field(25)
public ThemeSettings themeSettings;
@Field(28)
public String appPackageName;
@Field(31)
public TogglingData togglingData;
@Field(32)
public int unknownInt32;
@Field(33)
public PendingIntent customFeedbackPendingIntent;
@Field(34)
public String title;
@Field(35)
public Bitmap icon;
@Field(36)
public int unknownInt36;
@Field(37)
public boolean unknownBool37;
@Field(38)
public boolean unknownBool38;
@Field(39)
public int timeout;
@Field(40)
public String sessionId;
@Field(41)
public boolean unknownBool41;
@Field(42)
public String clientPackageName;
@Field(43)
public boolean unknownBool43;
@Field(44)
public ND4CSettings nd4CSettings;
@Field(45)
public boolean unknownBool45;
@Field(46)
public List<FRDProductSpecificDataEntry> productSpecificDataEntries;

@NonNull
@Override
public String toString() {
return ToStringHelper.name("GoogleHelp")
.field("appContext", appContext)
.field("account", account)
.field("extras", extras)
.field("5", unknownBool5)
.field("6", unknownBool6)
.field("7", unknownStringList7)
.field("uri", uri)
.field("overflowMenuItems", overflowMenuItems)
.field("17", unknownAlwaysZero17)
.field("offlineSuggestions", offlineSuggestions)
.field("20", unknownInt20)
.field("21", unknownInt21)
.field("22", unknownBool22)
.field("errorReport", errorReport)
.field("themeSettings", themeSettings)
.field("appPackageName", appPackageName)
.field("togglingData", togglingData)
.field("32", unknownInt32)
.field("customFeedbackPendingIntent", customFeedbackPendingIntent)
.field("title", title)
.field("icon", icon)
.field("36", unknownInt36)
.field("37", unknownBool37)
.field("38", unknownBool38)
.field("timeout", timeout)
.field("sessionId", sessionId)
.field("41", unknownBool41)
.field("clientPackageName", clientPackageName)
.field("43", unknownBool43)
.field("nd4CSettings", nd4CSettings)
.field("45", unknownBool45)
.field("productSpecificDataEntries", productSpecificDataEntries)
.end();
}

public static final Creator<GoogleHelp> CREATOR = findCreator(GoogleHelp.class);
}
Loading

3 comments on commit 8590f6d

@ale5000-git
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mar-v-in
Is it possible to have a new nightly build to test the latest changes?

@mar-v-in
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I still have a bunch of other stuff locally that I plan to push today or the next days. I'll make sure we have a nightly by Sunday.

@ale5000-git
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, thanks.

Please sign in to comment.