Skip to content

Commit

Permalink
Android Studio 2.3 update, incoming broadcast extra information
Browse files Browse the repository at this point in the history
  • Loading branch information
WakeRealityDev committed Mar 4, 2017
1 parent d70b636 commit b5aef36
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ public void onReceive(Context context, Intent intent) {
// Not using this data for now, but the field is documented here. "_EN" for English.
// Array is same length and order as "stories_built_in", one to one relationship.
intent.getStringArrayExtra("stories_built_in_description_EN");
intent.getIntArrayExtra("stories_built_in_engine_code");

EchoSpot.currentEngineProvider = engineProvider;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,17 @@
public class ThunderwordEngineRunningStatusBroadcastReceiver extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
// appStartWhen can tell outside apps if there is a break in continuity of information due to unexpected engine provider restart.
long appStartTime = intent.getLongExtra("appStartWhen", 0L);
int stateCode = intent.getIntExtra("stateCode", -1);
String sender = intent.getStringExtra("sender");
if (stateCode != -1) {
int index = intent.getIntExtra("index", -1);
boolean clearIfPresent = intent.getBooleanExtra("clearIfPresent", false);
Log.v("EngineRunStatus", "[ThunderClap][shareRemGlk] #" + index + " stateCode " + stateCode + " clearIfPresent " + clearIfPresent);
Log.v("EngineRunStatus", "[ThunderClap][RUNNING_STATUS][shareEngineStatus] #" + index + " stateCode " + stateCode + " clearIfPresent " + clearIfPresent + " appStartTime " + appStartTime + " sender " + sender);
EventBus.getDefault().post(new EventEngineRunningStatus(stateCode));
} else {
Log.w("EngineRunStatus", "[ThunderClap][RUNNING_STATUS][shareEngineStatus] stateCode -1, skipping internal processing appStartTime " + appStartTime + " sender " + sender);
}
}
}
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.3'
classpath 'com.android.tools.build:gradle:2.3.0'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand Down
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Mon Dec 28 10:00:20 PST 2015
#Thu Mar 02 21:40:53 EST 2017
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip

0 comments on commit b5aef36

Please sign in to comment.