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

Commit 1617989

Browse files
committed
ux library changes
1 parent 35fc072 commit 1617989

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

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

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
import com.google.atap.tangoservice.TangoXyzIjData;
3131

3232
import com.google.atap.tango.ux.TangoUx;
33+
import com.google.atap.tango.ux.TangoUx.StartParams;
3334
import com.google.atap.tango.ux.TangoUxLayout;
3435

3536

@@ -140,9 +141,6 @@ public void onUxExceptionEvent(UxExceptionEvent uxExceptionEvent) {
140141
if(uxExceptionEvent.getType() == UxExceptionEvent.TYPE_TANGO_SERVICE_NOT_RESPONDING){
141142
Log.i(TAG, "TangoService is not responding ");
142143
}
143-
if(uxExceptionEvent.getType() == UxExceptionEvent.TYPE_TANGO_UPDATE_NEEDED){
144-
Log.i(TAG, "Device not running on ART");
145-
}
146144
if(uxExceptionEvent.getType() == UxExceptionEvent.TYPE_UNDER_EXPOSED){
147145
Log.i(TAG, "Camera Under Exposed " );
148146
}
@@ -179,9 +177,9 @@ protected void onCreate(Bundle savedInstanceState) {
179177
mConfig = mTango.getConfig(TangoConfig.CONFIG_TYPE_CURRENT);
180178
mConfig.putBoolean(TangoConfig.KEY_BOOLEAN_DEPTH, true);
181179

182-
mTangoUx = new TangoUx.Builder(this).build();
180+
mTangoUx = new TangoUx(this);
183181
mTangoUxLayout = (TangoUxLayout) findViewById(R.id.layout_tango);
184-
mTangoUx = new TangoUx.Builder(this).setTangoUxLayout(mTangoUxLayout).build();
182+
mTangoUx.setLayout(mTangoUxLayout);
185183
mTangoUx.setUxExceptionEventListener(mUxExceptionListener);
186184

187185

@@ -221,7 +219,8 @@ protected void onPause() {
221219
@Override
222220
protected void onResume() {
223221
super.onResume();
224-
mTangoUx.start();
222+
StartParams params = new StartParams();
223+
mTangoUx.start(params);
225224
if (!mIsTangoServiceConnected) {
226225
startActivityForResult(
227226
Tango.getRequestPermissionIntent(Tango.PERMISSIONTYPE_MOTION_TRACKING),
@@ -254,7 +253,7 @@ protected void onActivityResult(int requestCode, int resultCode, Intent data) {
254253
mIsTangoServiceConnected = true;
255254
} catch (TangoOutOfDateException outDateEx) {
256255
if (mTangoUx != null) {
257-
mTangoUx.onTangoOutOfDate();
256+
mTangoUx.showTangoOutOfDate();
258257
}
259258
} catch (TangoErrorException e) {
260259
Toast.makeText(getApplicationContext(), R.string.TangoError, Toast.LENGTH_SHORT)
@@ -396,7 +395,7 @@ public void onXyzIjAvailable(final TangoXyzIjData xyzIj) {
396395
@Override
397396
public void onTangoEvent(final TangoEvent event) {
398397
if(mTangoUx!=null){
399-
mTangoUx.onTangoEvent(event);
398+
mTangoUx.updateTangoEvent(event);
400399
}
401400
runOnUiThread(new Runnable() {
402401
@Override

0 commit comments

Comments
 (0)