Skip to content
This repository was archived by the owner on Mar 2, 2018. It is now read-only.

Commit d409ffb

Browse files
committed
Merge pull request #22 from wllmtrng/master
Remove unnecessary mConfig instantiation
2 parents 9d7dbfb + 24ca76e commit d409ffb

7 files changed

Lines changed: 12 additions & 42 deletions

File tree

AreaLearningJava/.classpath

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,9 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<classpath>
3-
<classpathentry kind="src" path="src"/>
4-
<classpathentry kind="src" path="gen"/>
3+
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
54
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
65
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.DEPENDENCIES"/>
7-
<classpathentry kind="lib" path="/home/kommineni/android-sdks/platforms/android-19/android.jar" sourcepath="/home/kommineni/android-sdks/sources/android-19">
8-
<attributes>
9-
<attribute name="javadoc_location" value="http://developer.android.com/reference/"/>
10-
</attributes>
11-
<accessrules>
12-
<accessrule kind="nonaccessible" pattern="com/android/internal/**"/>
13-
</accessrules>
14-
</classpathentry>
15-
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
16-
<classpathentry kind="src" path="/tango-native-service-client-helperlib"/>
17-
<classpathentry kind="src" path="/TangoUtils"/>
6+
<classpathentry kind="src" path="src"/>
7+
<classpathentry kind="src" path="gen"/>
188
<classpathentry kind="output" path="bin/classes"/>
199
</classpath>

AreaLearningJava/src/com/projecttango/experiments/javaarealearning/AreaLearningActivity.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,6 @@ protected void onCreate(Bundle savedInstanceState) {
173173
}
174174

175175
private void setTangoConfig() {
176-
mConfig = new TangoConfig();
177176
mConfig = mTango.getConfig(TangoConfig.CONFIG_TYPE_CURRENT);
178177
// Check if learning mode
179178
if (mIsLearningMode) {
@@ -324,7 +323,7 @@ public void onSetName(String name, String uuids) {
324323
/**
325324
* Updates the text view in UI screen with the Pose. Each pose is associated with Target and
326325
* Base Frame. We need to check for that pair ad update our views accordingly.
327-
*
326+
*
328327
* @param pose
329328
*/
330329
private void updateTextViewWith(final TangoPoseData pose) {

MotionTrackingJava/.classpath

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,9 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<classpath>
3-
<classpathentry kind="src" path="src"/>
4-
<classpathentry kind="src" path="gen"/>
3+
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
54
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
65
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.DEPENDENCIES"/>
7-
<classpathentry kind="lib" path="/home/kommineni/android-sdks/platforms/android-19/android.jar" sourcepath="/home/kommineni/android-sdks/sources/android-19">
8-
<attributes>
9-
<attribute name="javadoc_location" value="http://developer.android.com/reference/"/>
10-
</attributes>
11-
<accessrules>
12-
<accessrule kind="nonaccessible" pattern="com/android/internal/**"/>
13-
</accessrules>
14-
</classpathentry>
15-
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
6+
<classpathentry kind="src" path="src"/>
7+
<classpathentry kind="src" path="gen"/>
168
<classpathentry kind="output" path="bin/classes"/>
179
</classpath>

MotionTrackingJava/src/com/projecttango/experiments/javamotiontracking/MotionTrackingActivity.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,6 @@ protected void onCreate(Bundle savedInstanceState) {
111111
// Instantiate the Tango service
112112
mTango = new Tango(this);
113113
// Create a new Tango Configuration and enable the MotionTrackingActivity API
114-
mConfig = new TangoConfig();
115114
mConfig = mTango.getConfig(TangoConfig.CONFIG_TYPE_CURRENT);
116115
mConfig.putBoolean(TangoConfig.KEY_BOOLEAN_MOTIONTRACKING, true);
117116

@@ -147,7 +146,7 @@ protected void onCreate(Bundle savedInstanceState) {
147146
private void setTangoListeners() {
148147
// Lock configuration and connect to Tango
149148
// Select coordinate frame pair
150-
final ArrayList<TangoCoordinateFramePair> framePairs =
149+
final ArrayList<TangoCoordinateFramePair> framePairs =
151150
new ArrayList<TangoCoordinateFramePair>();
152151
framePairs.add(new TangoCoordinateFramePair(
153152
TangoPoseData.COORDINATE_FRAME_START_OF_SERVICE,

PointCloudJava/.classpath

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,9 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<classpath>
3-
<classpathentry kind="src" path="src"/>
4-
<classpathentry kind="src" path="gen"/>
3+
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
54
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
65
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.DEPENDENCIES"/>
7-
<classpathentry kind="lib" path="/home/kommineni/android-sdks/platforms/android-19/android.jar" sourcepath="/home/kommineni/android-sdks/sources/android-19">
8-
<attributes>
9-
<attribute name="javadoc_location" value="http://developer.android.com/reference/"/>
10-
</attributes>
11-
<accessrules>
12-
<accessrule kind="nonaccessible" pattern="com/android/internal/**"/>
13-
</accessrules>
14-
</classpathentry>
15-
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
6+
<classpathentry kind="src" path="src"/>
7+
<classpathentry kind="src" path="gen"/>
168
<classpathentry kind="output" path="bin/classes"/>
179
</classpath>

PointCloudJava/src/com/projecttango/experiments/javapointcloud/PointCloudActivity.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,6 @@ protected void onCreate(Bundle savedInstanceState) {
113113
mTopDownButton.setOnClickListener(this);
114114

115115
mTango = new Tango(this);
116-
mConfig = new TangoConfig();
117116
mConfig = mTango.getConfig(TangoConfig.CONFIG_TYPE_CURRENT);
118117
mConfig.putBoolean(TangoConfig.KEY_BOOLEAN_DEPTH, true);
119118

@@ -261,7 +260,7 @@ private void setUpExtrinsics() {
261260

262261
private void setTangoListeners() {
263262
// Configure the Tango coordinate frame pair
264-
final ArrayList<TangoCoordinateFramePair> framePairs =
263+
final ArrayList<TangoCoordinateFramePair> framePairs =
265264
new ArrayList<TangoCoordinateFramePair>();
266265
framePairs.add(new TangoCoordinateFramePair(
267266
TangoPoseData.COORDINATE_FRAME_START_OF_SERVICE,

QuickstartJava/src/com/projecttango/quickstartjava/MainActivity.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ protected void onCreate(Bundle savedInstanceState) {
6868
// Set up Tango configuration for motion tracking
6969
// If you want to use other APIs, add more appropriate to the config
7070
// like: mConfig.putBoolean(TangoConfig.KEY_BOOLEAN_DEPTH, true)
71-
mConfig = new TangoConfig();
7271
mConfig = mTango.getConfig(TangoConfig.CONFIG_TYPE_CURRENT);
7372
mConfig.putBoolean(TangoConfig.KEY_BOOLEAN_MOTIONTRACKING, true);
7473

0 commit comments

Comments
 (0)