This repository has been archived by the owner on Sep 19, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
57 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
.../src/main/aidl/com/google/android/finsky/externalreferrer/IGetInstallReferrerService.aidl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
/* | ||
* SPDX-FileCopyrightText: 2023 microG Project Team | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package com.google.android.finsky.externalreferrer; | ||
|
||
interface IGetInstallReferrerService { | ||
Bundle getInstallReferrer(in Bundle request); | ||
} |
38 changes: 38 additions & 0 deletions
38
...e/src/main/java/com/google/android/finsky/externalreferrer/GetInstallReferrerService.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/* | ||
* SPDX-FileCopyrightText: 2023 microG Project Team | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package com.google.android.finsky.externalreferrer; | ||
|
||
import android.app.Service; | ||
import android.content.Intent; | ||
import android.os.Bundle; | ||
import android.os.IBinder; | ||
import android.os.RemoteException; | ||
|
||
public class GetInstallReferrerService extends Service { | ||
private static final String TAG = "FakeReferrerService"; | ||
|
||
private final IGetInstallReferrerService.Stub service = new IGetInstallReferrerService.Stub() { | ||
// https://developer.android.com/google/play/installreferrer/igetinstallreferrerservice | ||
@Override | ||
public Bundle getInstallReferrer(Bundle request) throws RemoteException { | ||
String packageName = request.getString("package_name"); | ||
Bundle result = new Bundle(); | ||
result.putString("install_referrer", "https://play.google.com/store/apps/details?utm_source=google-play&utm_medium=organic&id="+packageName); | ||
result.putLong("referrer_click_timestamp_seconds", 0); | ||
result.putLong("referrer_click_timestamp_server_seconds", 0); | ||
result.putLong("install_begin_timestamp_seconds", 0); | ||
result.putLong("install_begin_timestamp_server_seconds", 0); | ||
result.putString("install_version", null); | ||
result.putBoolean("google_play_instant", false); | ||
return result; | ||
} | ||
}; | ||
|
||
@Override | ||
public IBinder onBind(Intent intent) { | ||
return service.asBinder(); | ||
} | ||
} |