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

Commit 0dbfcb0

Browse files
committed
Remove unnecessary mConfig instantiation
1 parent 9f90856 commit 0dbfcb0

4 files changed

Lines changed: 3 additions & 7 deletions

File tree

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/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/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)