Skip to content

Commit 83c28f5

Browse files
committed
Merge branch 'release/4.4.0-rc1' of https://github.com/smartdevicelink/sdl_android
2 parents 13a70ef + e8c439e commit 83c28f5

File tree

334 files changed

+20880
-8876
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

334 files changed

+20880
-8876
lines changed
File renamed without changes.

.github/ISSUE_TEMPLATE.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
[Delete any non-applicable sections, but we may ask for more information.]
2+
3+
### Bug Report
4+
[Summary]
5+
6+
##### Reproduction Steps
7+
1. [Step 1]
8+
2. [Step 2]
9+
3. [Step 3]
10+
11+
##### Expected Behavior
12+
[Some expected behavior]
13+
14+
##### Observed Behavior
15+
[Some observed behavior]
16+
17+
##### OS & Version Information
18+
* Android Version: [What version of Android are you using when the bug occurred]
19+
* SDL Android Version: [What version of the library has this bug been seen on]
20+
* Testing Against: [What you tested with to observe this behavior]
21+
22+
##### Test Case, Sample Code, and / or Example App
23+
[Paste a link to a PR, gist, or other code that exemplifies this behavior]

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
[Things to note: Pull Requests **must** fix an issue. Discussion about the feature / bug takes place in the issue, discussion of the implementation takes place in the PR. Please also see the [Contributing Guide](https://github.com/smartdevicelink/sdl_android/blob/master/.github/CONTRIBUTING.md) for information on branch naming and the CLA.
2+
3+
Delete the above section when you've read it.]
4+
5+
Fixes #[issue number]
6+
7+
This PR is **[ready / not ready]** for review.
8+
9+
### Risk
10+
This PR makes **[no / minor / major]** API changes.
11+
12+
### Testing Plan
13+
[Describe how you plan to unit test the changes in this PR]
14+
15+
### Summary
16+
[Summary of PR changes]
17+
18+
### Changelog
19+
##### Breaking Changes
20+
* [Breaking change info]
21+
22+
##### Enhancements
23+
* [Enhancement info]
24+
25+
##### Bug Fixes
26+
* [Bug Fix Info]
27+
28+
### Tasks Remaining:
29+
- [ ] [Task 1]
30+
- [ ] [Task 2]
31+
32+
### CLA
33+
- [ ] I have signed [the CLA](https://docs.google.com/forms/d/e/1FAIpQLSdsgJY33VByaX482zHzi-xUm49JNnmuJOyAM6uegPQ2LXYVfA/viewform)

.travis.yml

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,30 @@ sudo: false
44
android:
55
components:
66
# use the latest revision of Android SDK Tools
7-
- platform-tools
87
- tools
8+
- tools
9+
- platform-tools
10+
- ndk-bundle
911

1012
# The BuildTools version used by your project
11-
- build-tools-25.0.2
13+
- build-tools-26.0.1
1214

1315
# The SDK version used to compile your project
14-
- android-19
16+
- android-26
17+
- android-22 #For emulator
1518
# Specify at least one system image,
1619
# if you need to run emulator(s) during your tests
17-
- sys-img-armeabi-v7a-android-21
18-
# - sys-img-x86-android-17
20+
- sys-img-armeabi-v7a-android-22
21+
# - sys-img-x86-android-26
22+
23+
# Android Support Repos
24+
- extra-android-m2repository
25+
- extra-google-m2repository
26+
27+
licenses:
28+
- 'android-sdk-preview-license-.+'
29+
- 'android-sdk-license-.+'
30+
- 'google-gdk-license-.+'
1931

2032
env:
2133
global:
@@ -24,11 +36,17 @@ env:
2436

2537
# Emulator Management: Create, Start and Wait
2638
before_script:
27-
- echo no | android create avd --force -n test -t android-21 --abi armeabi-v7a
39+
- echo no | android create avd --force -n test -t android-22 --abi armeabi-v7a
2840
- emulator -avd test -no-skin -no-audio -no-window &
2941
- android-wait-for-emulator
3042
- adb shell input keyevent 82 &
3143

3244
script:
3345
- android list target
3446
- ./gradlew connectedAndroidTest
47+
48+
before_install:
49+
- pip install --user codecov #Install codecov
50+
51+
after_success:
52+
- codecov #Run codecov

CHANGELOG.md

Lines changed: 41 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,48 @@
1-
# 4.3.0 Release Notes
1+
# 4.4.0 Release Notes
22

33
### API New Features & Breaking Changes
4-
* The library has now moved to Android Studio as its default IDE. All files and folders have been moved to align with proper Android Studio project structure.
5-
* The target API level is now `19` instead of `18`. Apps will also need to target this version or higher to continue using this library.
6-
* `Java 7` is now used to compile the library and its features can be used moving forward.
4+
- Now uses compile version 26 to handle breaking changes in Android Oreo
5+
- `MOBILE_PROJECTION` added as an app type
6+
- Gesture cancellation was added as a touch even type
7+
- More languages were added to the `Language` enum
8+
- `SystemCapaibilityQuery` was added with a new `SystemCapabilityManager` that can retrieve capabilities
9+
- `VideoStreamingCapabilities` were added. Includes supported codecs, resolution, etc
10+
- Added constructed payloads using BSON
11+
- SDL Remote Control functionality was added. Supports radio and climate controls.
12+
- Added `MetadataType` to `Show` lines
13+
- Spatial data for video streaming apps added with `HapticData`
14+
715

816
### Enhancements
9-
* Multiplexing bluetooth, legacy bluetooth, and TCP transport has been improved in performance by switching to buffer reads vs single byte read from transport.
10-
* Trusted router service checking feature is now adjustable by developers.
11-
* More unit tests were created.
12-
* Router service will now check to make sure the app that propagated it has permissions to use bluetooth.
13-
* Packet streaming classes will now use the agreed upon MTU instead of the hardcoded 1024 when the stream is not encrypted.
14-
* App IDs sent between the client apps and the router service are now Strings instead of Longs to support longer IDs.
17+
- Enhanced video streaming APIs
18+
- Added much more test coverage
19+
- Updated buffer read in sizes and streaming packetizers to use TLS max record size
20+
- Consolidated all references to `sdl.router.startservice` string into single constant
21+
- Refactored RPC classes to consolidate redundant code for retrieving items from underlying data structures
22+
- `MultiplexBluetoothTransport` is no longer a singleton
23+
- Improved inline documentation
24+
- h.264 streaming now includes SPS/PPS NAL units with every I frame to match iOS library
25+
- Real-time Transport Protocol (RTP) video streaming is now supported
26+
- Correlation IDs are now set automatically. Can be retrieved or overwritten by developer.
27+
- Introduced new video streaming callback and deprecated used of pipped streams
28+
- Added an internal interface for common functions between different managers
1529

1630
### Bug Fixes
17-
* Fixed issue with AOA transport not clearing old accessory reference after disconnect
18-
* Fixed missing setting of error state in multiplexing bluetooth transport
19-
* Fixed potential OOMs when corrupted packets are recieved in:
20-
* `SdlPsm`
21-
* `WiProProtocol`
22-
* `BinaryFrameHeader`
23-
* Fixed possible NPEs in:
24-
* `SdlRouterService` when checking for correct process
25-
* `MultiplexingBluetoothTransport` during reads and writes
26-
* `SdlConnection` during session registration
27-
* `SdlProxyBase` when clearing RPC response and notification listeners during close
28-
* `TransportBroker` when sending a message to router service
29-
* `SdlBroadcastReceiver` during check for running router service
30-
* `HttpRequestTask` that happens when a server can't be reached
31-
* `SdlSecurityBase` when a security lib would become initialized after the base has been reset.
32-
* Added synchronization to a cancel call in the `MultiplexTransport`
33-
* Refactor code in `SdlBroadcastReceiver` to protect against a potential SecurityException
34-
* Added try/catch around bluetooth system calls that can fail in Android classes
35-
* Added try/catch when attempting to build `LocalRouterService` object from parcel when parcel could be corrupt
36-
* Fixed version checking flow in the router service to be cleaner and correctly synched
31+
- Fixed potential out of bounds exception in `BinaryFrameHeader`
32+
- Fixed issues with unit tests and TravisCI
33+
- Fixed potential NPE in `SdlProxyBase`method, `performBaseCommon()`
34+
- Fixed potential NPE in `MultiplexTransport` constructor
35+
- Fixed potential NPE in `SdlRouterService`method, `handleMessaage()` for `AltTransportHandler`
36+
- Fixed potential NPE in `SdlRouterService`method, `writeBytesToTransport()`
37+
- Removed hardcoded `androidDebuggable = "true"` from manifest
38+
- Added fixes to be compatible with Android Oreo (Does not supported target API level 26 yet)
39+
- Fixed issue where intent from router service was delayed
40+
- Apps now trust themselves as router service hosts
41+
- Removed ambiguous validation call in `SdlBroadcastReceiver` and unused intent extra
42+
- Cleared all warnings from `SdlProxyBase`
3743

44+
### Meta
45+
- Added integration that will deploy to Bintray
46+
- Issue and pull request templates were added for GitHub
47+
- Codecov integration was added
48+
- Updated README links

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1+
[![Build Status](https://travis-ci.org/smartdevicelink/sdl_android.svg?branch=master)](https://travis-ci.org/smartdevicelink/sdl_android)
2+
[![codecov](https://codecov.io/gh/smartdevicelink/sdl_android/branch/master/graph/badge.svg)](https://codecov.io/gh/smartdevicelink/sdl_android)
13
[![Slack Status](http://sdlslack.herokuapp.com/badge.svg)](http://slack.smartdevicelink.com)
4+
[ ![Download](https://api.bintray.com/packages/smartdevicelink/sdl_android/sdl_android/images/download.svg) ](https://bintray.com/smartdevicelink/sdl_android/sdl_android/_latestVersion)
25
# SmartDeviceLink (SDL)
36

47
SmartDeviceLink (SDL) is a standard set of protocols and messages that connect applications on a smartphone to a vehicle head unit. This messaging enables a consumer to interact with their application using common in-vehicle interfaces such as a touch screen display, embedded voice recognition, steering wheel controls and various vehicle knobs and buttons. There are three main components that make up the SDL ecosystem.
@@ -19,6 +22,8 @@ The mobile library component of SDL is meant to run on the end user’s smart-de
1922

2023
## SmartDeviceLink Android
2124

22-
We're still working on creating documentation for each of these individual repositories, but in the meantime, you can find more information about SmartDeviceLink [here](https://github.com/smartdevicelink/sdl_core/blob/master/README.md) and [here](http://projects.genivi.org/smartdevicelink/about).
25+
We're still working on creating documentation for each of these individual repositories, but in the meantime, you can find more information about SmartDeviceLink [here](https://smartdevicelink.com)
2326

2427
You can also find some branches that have yet to be merged into this GitHub project on the GENIVI page [here](http://git.projects.genivi.org/?p=smartdevicelink_android.git;a=summary).
28+
29+
For easy integration of SmartDeviceLink Android into your project using Gradle, Maven or Ivy please grab a snippet from [Bintray](https://bintray.com/smartdevicelink/sdl_android/sdl_android)

sdl_android/bintray.gradle

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
apply plugin: "com.jfrog.bintray"
2+
apply plugin: 'com.github.dcendents.android-maven'
3+
apply plugin: 'maven-publish'
4+
5+
def siteUrl = 'https://github.com/smartdevicelink/sdl_android' // Homepage URL of the library
6+
def gitUrl = 'https://github.com/smartdevicelink/sdl_android.git' // Git repository URL
7+
group = "com.smartdevicelink" // Maven Group ID for the artifact
8+
def libDescription = 'SmartDeviceLink mobile library for Android'
9+
10+
install {
11+
repositories.mavenInstaller {
12+
pom {
13+
project {
14+
packaging 'aar'
15+
16+
// Add your description here
17+
name 'com.smartdevicelink:sdl_android'
18+
description = libDescription
19+
url siteUrl
20+
21+
// Set your license
22+
licenses {
23+
license {
24+
name 'BSD 3-Clause'
25+
url 'https://opensource.org/licenses/BSD-3-Clause'
26+
}
27+
}
28+
scm {
29+
connection gitUrl
30+
developerConnection gitUrl
31+
url siteUrl
32+
}
33+
}
34+
}
35+
}
36+
}
37+
38+
task sourcesJar(type: Jar) {
39+
from android.sourceSets.main.java.srcDirs
40+
classifier = 'sources'
41+
}
42+
43+
artifacts {
44+
archives sourcesJar
45+
}
46+
47+
bintray {
48+
Properties props = new Properties()
49+
props.load(new FileInputStream("$projectDir/bintray.properties"))
50+
51+
// Authorization
52+
user = props.getProperty("bintray.user")
53+
key = props.getProperty("bintray.key")
54+
55+
configurations = ['archives']
56+
pkg {
57+
repo = props.getProperty("bintray.repo")
58+
name = props.getProperty("bintray.artifact")
59+
websiteUrl = siteUrl
60+
vcsUrl = gitUrl
61+
userOrg = props.getProperty("bintray.userorg")
62+
licenses = ["BSD 3-Clause"]
63+
publish = props.getProperty("bintray.publish") // Will upload to jCenter
64+
version {
65+
name = props.getProperty("bintray.version") // Change to release version
66+
desc = libDescription
67+
released = new Date() // Will be the current date & time
68+
vcsTag = props.getProperty("bintray.vcs") // Should match git tag
69+
}
70+
}
71+
}

sdl_android/bintray.properties

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
bintray.user=username
2+
bintray.key=apikey
3+
bintray.repo=sdl_android
4+
bintray.artifact=sdl_android
5+
bintray.userorg=smartdevicelink
6+
bintray.publish=true
7+
bintray.version=X.X.X
8+
bintray.vcs=X.X.X

sdl_android/build.gradle

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
apply plugin: 'com.android.library'
22

33
android {
4-
compileSdkVersion 19
4+
compileSdkVersion 26
55
buildToolsVersion "25.0.2"
66
defaultConfig {
77
minSdkVersion 8
@@ -15,6 +15,9 @@ android {
1515
minifyEnabled false
1616
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
1717
}
18+
debug {
19+
testCoverageEnabled = true
20+
}
1821
}
1922
compileOptions {
2023
sourceCompatibility JavaVersion.VERSION_1_7
@@ -23,12 +26,36 @@ android {
2326
lintOptions {
2427
abortOnError false
2528
}
29+
30+
testOptions {
31+
unitTests.returnDefaultValues = true
32+
}
2633
}
2734

2835
dependencies {
2936
compile fileTree(dir: 'libs', include: ['*.jar'])
37+
compile ('com.smartdevicelink:bson_java_port:1.0.0@aar'){
38+
transitive = true
39+
}
3040
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
3141
exclude group: 'com.android.support', module: 'support-annotations'
3242
})
3343
testCompile 'junit:junit:4.12'
44+
testCompile 'org.mockito:mockito-core:2.9.0'
45+
3446
}
47+
48+
buildscript {
49+
repositories {
50+
jcenter()
51+
mavenCentral()
52+
}
53+
dependencies {
54+
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3'
55+
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
56+
classpath 'com.trickyandroid:jacoco-everywhere:0.2.1'
57+
}
58+
}
59+
60+
apply from: 'bintray.gradle'
61+
apply plugin: 'jacoco-everywhere'
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"request":{
3+
"name":"ButtonPress",
4+
"correlationID":215,
5+
"parameters":{
6+
"buttonName":"OK",
7+
"buttonPressMode":"LONG",
8+
"moduleType":"CLIMATE"
9+
}
10+
},
11+
"response":{
12+
"name":"ButtonPressResponse",
13+
"correlationID":216
14+
}
15+
}

0 commit comments

Comments
 (0)