Skip to content

Commit

Permalink
fix bug: NullPointerException after stopping service
Browse files Browse the repository at this point in the history
  • Loading branch information
warren-bank committed Apr 21, 2023
1 parent fa50a0b commit 0a54a29
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
Expand Up @@ -57,12 +57,14 @@ public void updateTimeInterval(int timeInterval) {
Runnable mUpdateLocation = new Runnable() {
@Override
public void run() {
LocPoint locPoint = mLocationThreadManager.getUpdateLocPoint();
if (locPoint != null) {
MockLocationProviderManager.exec(locPoint.getLatitude(), locPoint.getLongitude());
}
if (mLocationThreadManager.shouldContinue()) {
mHandler.postDelayed(mUpdateLocation, mTimeInterval);
if (mLocationThreadManager != null) {
LocPoint locPoint = mLocationThreadManager.getUpdateLocPoint();
if (locPoint != null) {
MockLocationProviderManager.exec(locPoint.getLatitude(), locPoint.getLongitude());
}
if (mLocationThreadManager.shouldContinue()) {
mHandler.postDelayed(mUpdateLocation, mTimeInterval);
}
}
}
};
Expand Down
4 changes: 2 additions & 2 deletions android-studio-project/constants.gradle
Expand Up @@ -4,8 +4,8 @@ project.ext {
buildToolsVersion = '33.0.1'
javaVersion = JavaVersion.VERSION_1_8

base_releaseVersionCode = Integer.parseInt("002030000", 10) //Integer.MAX_VALUE == 2147483647
base_releaseVersion = '002.03.00'
base_releaseVersionCode = Integer.parseInt("002030100", 10) //Integer.MAX_VALUE == 2147483647
base_releaseVersion = '002.03.01'

app_aosp_minSdkVersion = 3
app_aosp_releaseVersionCode = project.ext.base_releaseVersionCode + project.ext.app_aosp_minSdkVersion
Expand Down

0 comments on commit 0a54a29

Please sign in to comment.