Skip to content

Commit

Permalink
Release 6.6.6
Browse files Browse the repository at this point in the history
  • Loading branch information
weiqiangliu committed Mar 31, 2023
1 parent 5daf981 commit d5d9f90
Show file tree
Hide file tree
Showing 7 changed files with 64 additions and 6 deletions.
6 changes: 6 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ buildscript {
maven{
url 'https://maven.aliyun.com/nexus/content/repositories/jcenter'
}
maven {
url 'https://maven.aliyun.com/repository/google'
}
maven {
url './repo'
}
Expand Down Expand Up @@ -37,6 +40,9 @@ allprojects {
maven{
url 'https://maven.aliyun.com/nexus/content/repositories/jcenter'
}
maven {
url 'https://maven.aliyun.com/repository/google'
}
maven {
url '../repo'
}
Expand Down
19 changes: 19 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@


#
# Created by dengshiwei on 2023/03/30.
# Copyright 2015?2023 Sensors Data Inc.
#
# 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.
#

## Project-wide Gradle settings.
#
# For more details on how to configure your build environment visit
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@
import android.view.View;
import android.webkit.WebView;

import com.sensorsdata.analytics.android.sdk.core.SAContextManager;
import com.sensorsdata.analytics.android.sdk.core.business.exposure.SAExposureData;
import com.sensorsdata.analytics.android.sdk.core.event.InputData;
import com.sensorsdata.analytics.android.sdk.deeplink.SensorsDataDeepLinkCallback;
import com.sensorsdata.analytics.android.sdk.deeplink.SensorsDataDeferredDeepLinkCallback;
import com.sensorsdata.analytics.android.sdk.listener.SAEventListener;
Expand All @@ -39,6 +41,7 @@

public class SensorsDataAPIEmptyImplementation extends SensorsDataAPI {
SensorsDataAPIEmptyImplementation() {
mSAContextManager = new EmptySAContext();
}

@Override
Expand Down Expand Up @@ -814,4 +817,16 @@ public void removeExposureView(View view) {
public void registerLimitKeys(Map<String, String> limitKeys) {

}

static class EmptySAContext extends SAContextManager {

public EmptySAContext() {
super(null, null);
}

@Override
public void trackEvent(InputData inputData) {

}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,11 @@ public PropertyPluginManager getPluginManager() {
}

public void trackEvent(InputData inputData) {
mTrackEventProcessor.trackEvent(inputData);
try {
mTrackEventProcessor.trackEvent(inputData);
} catch (Exception e) {
SALog.printStackTrace(e);
}
}

public Context getContext() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

package com.sensorsdata.analytics.android.sdk.core;

import com.sensorsdata.analytics.android.sdk.SALog;
import com.sensorsdata.analytics.android.sdk.SensorsDataAPI;
import com.sensorsdata.analytics.android.sdk.TrackTaskManager;
import com.sensorsdata.analytics.android.sdk.core.event.InputData;
Expand All @@ -40,10 +41,18 @@ public static SACoreHelper getInstance() {
}

public void trackEvent(InputData inputData) {
SensorsDataAPI.sharedInstance().getSAContextManager().trackEvent(inputData);
try {
SensorsDataAPI.sharedInstance().getSAContextManager().trackEvent(inputData);
} catch (Exception e) {
SALog.printStackTrace(e);
}
}

public void trackQueueEvent(Runnable runnable) {
TrackTaskManager.getInstance().addTrackEventTask(runnable);
try {
TrackTaskManager.getInstance().addTrackEventTask(runnable);
} catch (Exception e) {
SALog.printStackTrace(e);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@

import com.sensorsdata.analytics.android.sdk.SALog;
import com.sensorsdata.analytics.android.sdk.SensorsDataAPI;
import com.sensorsdata.analytics.android.sdk.SensorsDataAPIEmptyImplementation;
import com.sensorsdata.analytics.android.sdk.core.SAContextManager;
import com.sensorsdata.analytics.android.sdk.data.adapter.DbAdapter;
import com.sensorsdata.analytics.android.sdk.data.adapter.DbParams;
Expand Down Expand Up @@ -70,7 +71,11 @@ public void onChange(boolean selfChange, Uri uri) {
SensorsDataAPI.enableSDK();
}
} else if (DbParams.getInstance().getUserIdentities().equals(uri)) {
SAContextManager saContextManager = SensorsDataAPI.sharedInstance().getSAContextManager();
SensorsDataAPI sensorsDataAPI = SensorsDataAPI.sharedInstance();
if (sensorsDataAPI instanceof SensorsDataAPIEmptyImplementation) {
return;
}
SAContextManager saContextManager = sensorsDataAPI.getSAContextManager();
if (saContextManager != null) {
saContextManager.getUserIdentityAPI().getIdentitiesInstance().updateIdentities();
}
Expand Down
4 changes: 2 additions & 2 deletions script_config/config.gradle
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
ext {
versions = [
// 全量 SDK 版本号
sdk_version : "6.6.5",
sdk_version : "6.6.6",
// 最小插件版本号依赖
min_plugin_version: "3.5.2",
// 子模块版本号
module_version : "0.1.8"
module_version : "0.1.9"
]

publish = [
Expand Down

0 comments on commit d5d9f90

Please sign in to comment.