Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ package com.google.android.gms.semanticlocation.internal;

import android.app.PendingIntent;
import android.os.IInterface;
import com.google.android.gms.common.api.ApiMetadata;
import com.google.android.gms.semanticlocation.SemanticLocationEventRequest;
import com.google.android.gms.semanticlocation.internal.SemanticLocationParameters;
import com.google.android.gms.common.api.internal.IStatusCallback;
Expand All @@ -15,4 +16,6 @@ interface ISemanticLocationService {
void unregisterSemanticLocationEvents(in SemanticLocationParameters params, IStatusCallback callback, in PendingIntent pendingIntent) = 1;

void setIncognitoMode(in SemanticLocationParameters params, IStatusCallback callback, boolean mode) = 4;

void setIncognitoModeWithMetadata(in SemanticLocationParameters params, IStatusCallback callback, boolean mode, in ApiMetadata metadata) = 5;
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ import android.app.PendingIntent
import android.util.Log
import com.google.android.gms.common.ConnectionResult
import com.google.android.gms.common.Feature
import com.google.android.gms.common.api.ApiMetadata
import com.google.android.gms.common.api.CommonStatusCodes
import com.google.android.gms.common.api.Status
import com.google.android.gms.common.api.internal.IStatusCallback
import com.google.android.gms.common.internal.ConnectionInfo
import com.google.android.gms.common.internal.GetServiceRequest
Expand Down Expand Up @@ -47,13 +50,21 @@ class SemanticLocationServiceImpl : ISemanticLocationService.Stub() {
pendingIntent: PendingIntent
) {
Log.d(TAG, "registerSemanticLocationEvents: $params")
callback.onResult(Status(CommonStatusCodes.SUCCESS))
}

override fun setIncognitoMode(params: SemanticLocationParameters, callback: IStatusCallback, mode: Boolean) {
Log.d(TAG, "setIncognitoMode: $params")
Log.d(TAG, "setIncognitoMode (legacy): $params mode=$mode")
callback.onResult(Status(CommonStatusCodes.SUCCESS))
}

override fun setIncognitoModeWithMetadata(params: SemanticLocationParameters, callback: IStatusCallback, mode: Boolean, metadata: ApiMetadata) {
Log.d(TAG, "setIncognitoModeWithMetadata: $params mode=$mode")
callback.onResult(Status(CommonStatusCodes.SUCCESS))
}

override fun unregisterSemanticLocationEvents(params: SemanticLocationParameters, callback: IStatusCallback, pendingIntent: PendingIntent) {
Log.d(TAG, "unregisterSemanticLocationEvents: $params")
callback.onResult(Status(CommonStatusCodes.SUCCESS))
}
}