diff options
author | Joseph Herlant <herlantj@gmail.com> | 2018-08-29 20:50:16 -0700 |
---|---|---|
committer | Joseph Herlant <herlantj@gmail.com> | 2018-08-29 20:50:16 -0700 |
commit | 62f58b4aa74e1cc7aaf4b8d14c53934ebdebaafe (patch) | |
tree | d85941bdbbb316b52a438c997f54b4a0e7c70937 | |
parent | 8adc089533d7529dd804746b360f0a023650fe16 (diff) | |
download | navit-62f58b4aa74e1cc7aaf4b8d14c53934ebdebaafe.tar.gz |
cleanup:android:Fix WhitespaceAround checkstyle issues
8 files changed, 98 insertions, 96 deletions
diff --git a/navit/android/src/org/navitproject/navit/FileBrowserActivity.java b/navit/android/src/org/navitproject/navit/FileBrowserActivity.java index 9018e6e45..3ae00678a 100644 --- a/navit/android/src/org/navitproject/navit/FileBrowserActivity.java +++ b/navit/android/src/org/navitproject/navit/FileBrowserActivity.java @@ -113,23 +113,22 @@ public class FileBrowserActivity extends Activity { String requestedStartDir = thisInt .getStringExtra(startDirectoryParameter); - if (requestedStartDir != null && requestedStartDir.length() > 0) {// if(requestedStartDir!=null + if (requestedStartDir != null && requestedStartDir.length() > 0) { // if(requestedStartDir!=null File tempFile = new File(requestedStartDir); if (tempFile.isDirectory()) { this.path = tempFile; } - }// if(requestedStartDir!=null + } // if(requestedStartDir!=null - if (this.path == null) {// No or invalid directory supplied in intent parameter + if (this.path == null) { // No or invalid directory supplied in intent parameter if (Environment.getExternalStorageDirectory().isDirectory() && Environment.getExternalStorageDirectory().canRead()) { path = Environment.getExternalStorageDirectory(); } else { path = new File("/"); } - }// if(this.path==null) {//No or invalid directory supplied in intent - // parameter - }// private void setInitialDirectory() { + } // if(this.path==null) {//No or invalid directory supplied in intent parameter + } // private void setInitialDirectory() { private void parseDirectoryPath() { pathDirsList.clear(); @@ -163,10 +162,10 @@ public class FileBrowserActivity extends Activity { returnDirectoryFinishActivity(); } }); - } else {// if(currentAction == this.SELECT_DIRECTORY) { + } else { // if(currentAction == this.SELECT_DIRECTORY) { selectFolderButton.setVisibility(View.GONE); - }// } else {//if(currentAction == this.SELECT_DIRECTORY) { - }// private void initializeButtons() { + } // } else {//if(currentAction == this.SELECT_DIRECTORY) { + } // private void initializeButtons() { private void loadDirectoryUp() { // present directory removed from list @@ -197,18 +196,17 @@ public class FileBrowserActivity extends Activity { if (freeSpace == 0) { Log.d(LOGTAG, "NO FREE SPACE"); File currentDir = new File(curDirString); - if(!currentDir.canWrite()) { + if (!currentDir.canWrite()) { formattedSpaceString = "NON Writable"; } } ((Button) this.findViewById(R.id.selectCurrentDirectoryButton)) - .setText("Select\n[" + formattedSpaceString - + "]"); + .setText("Select\n[" + formattedSpaceString + "]"); ((TextView) this.findViewById(R.id.currentDirectoryTextView)) .setText("Current directory: " + curDirString); - }// END private void updateCurrentDirectoryTextView() { + } // END private void updateCurrentDirectoryTextView() { private void showToast(String message) { Toast.makeText(this, message, Toast.LENGTH_LONG).show(); @@ -236,35 +234,35 @@ public class FileBrowserActivity extends Activity { adapter.notifyDataSetChanged(); updateCurrentDirectoryTextView(); Log.d(LOGTAG, path.getAbsolutePath()); - } else {// if(sel.canRead()) { + } else { // if(sel.canRead()) { showToast("Path does not exist or cannot be read"); - }// } else {//if(sel.canRead()) { - }// if (sel.isDirectory()) { + } // } else {//if(sel.canRead()) { + } // if (sel.isDirectory()) { // File picked or an empty directory message clicked - else {// if (sel.isDirectory()) { + else { // if (sel.isDirectory()) { Log.d(LOGTAG, "item clicked"); if (!directoryShownIsEmpty) { Log.d(LOGTAG, "File selected:" + chosenFile); returnFileFinishActivity(sel.getAbsolutePath()); } - }// else {//if (sel.isDirectory()) { - }// public void onClick(DialogInterface dialog, int which) { - });// lView.setOnClickListener( - }// private void initializeFileListView() { + } // else {//if (sel.isDirectory()) { + } // public void onClick(DialogInterface dialog, int which) { + }); // lView.setOnClickListener( + } // private void initializeFileListView() { private void returnDirectoryFinishActivity() { Intent retIntent = new Intent(); retIntent.putExtra(returnDirectoryParameter, path.getAbsolutePath()); this.setResult(RESULT_OK, retIntent); this.finish(); - }// END private void returnDirectoryFinishActivity() { + } // END private void returnDirectoryFinishActivity() { private void returnFileFinishActivity(String filePath) { Intent retIntent = new Intent(); retIntent.putExtra(returnFileParameter, filePath); this.setResult(RESULT_OK, retIntent); this.finish(); - }// END private void returnDirectoryFinishActivity() { + } // END private void returnDirectoryFinishActivity() { private void loadFileList() { try { @@ -294,8 +292,8 @@ public class FileBrowserActivity extends Activity { return (showReadableFile); } return true; - }// public boolean accept(File dir, String filename) { - };// FilenameFilter filter = new FilenameFilter() { + } // public boolean accept(File dir, String filename) { + }; // FilenameFilter filter = new FilenameFilter() { String[] fList = path.list(filter); this.directoryShownIsEmpty = false; @@ -316,19 +314,19 @@ public class FileBrowserActivity extends Activity { } } fileList.add(i, new Item(fList[i], drawableID, canRead)); - }// for (int i = 0; i < fList.length; i++) { + } // for (int i = 0; i < fList.length; i++) { if (fileList.size() == 0) { // Log.d(LOGTAG, "This directory is empty"); this.directoryShownIsEmpty = true; fileList.add(0, new Item("Directory is empty", -1, true)); - } else {// sort non empty list + } else { // sort non empty list Collections.sort(fileList, new ItemFileNameComparator()); } } else { Log.e(LOGTAG, "path does not exist or cannot be read"); } // Log.d(TAG, "loadFileList finished"); - }// private void loadFileList() { + } // private void loadFileList() { private void createFileListAdapter() { adapter = new ArrayAdapter<Item>(this, @@ -360,9 +358,9 @@ public class FileBrowserActivity extends Activity { // centered textView.setCompoundDrawablePadding(dp3); return view; - }// public View getView(int position, View convertView, ViewGroup - };// adapter = new ArrayAdapter<Item>(this, - }// private createFileListAdapter(){ + } // public View getView(int position, View convertView, ViewGroup + }; // adapter = new ArrayAdapter<Item>(this, + } // private createFileListAdapter(){ private class Item { public String file; @@ -378,7 +376,7 @@ public class FileBrowserActivity extends Activity { public String toString() { return file; } - }// END private class Item { + } // END private class Item { private class ItemFileNameComparator implements Comparator<Item> { public int compare(Item lhs, Item rhs) { @@ -397,26 +395,26 @@ public class FileBrowserActivity extends Activity { // in custom components // TODO: check with keyboard // if(newConfig.keyboard == Configuration.KEYBOARDHIDDEN_YES) - }// END public void onConfigurationChanged(Configuration newConfig) { + } // END public void onConfigurationChanged(Configuration newConfig) { public static long getFreeSpace(String path) { StatFs stat = new StatFs(path); long availSize = (long) stat.getAvailableBlocks() * (long) stat.getBlockSize(); return availSize; - }// END public static long getFreeSpace(String path) { + } // END public static long getFreeSpace(String path) { public static String formatBytes(long bytes) { // TODO: add flag to which part is needed (e.g. GB, MB, KB or bytes) String retStr = ""; // One binary gigabyte equals 1,073,741,824 bytes. - if (bytes > 1073741824) {// Add GB + if (bytes > 1073741824) { // Add GB long gbs = bytes / 1073741824; retStr += (new Long(gbs)).toString() + "GB "; bytes = bytes - (gbs * 1073741824); } // One MB - 1048576 bytes - if (bytes > 1048576) {// Add GB + if (bytes > 1048576) { // Add GB long mbs = bytes / 1048576; retStr += (new Long(mbs)).toString() + "MB "; bytes = bytes - (mbs * 1048576); @@ -429,6 +427,6 @@ public class FileBrowserActivity extends Activity { retStr += (new Long(bytes)).toString() + " bytes"; } return retStr; - }// public static String formatBytes(long bytes){ + } // public static String formatBytes(long bytes){ -}// END public class FileBrowserActivity extends Activity { +} // END public class FileBrowserActivity extends Activity { diff --git a/navit/android/src/org/navitproject/navit/Navit.java b/navit/android/src/org/navitproject/navit/Navit.java index 045feb039..50e5d579c 100644 --- a/navit/android/src/org/navitproject/navit/Navit.java +++ b/navit/android/src/org/navitproject/navit/Navit.java @@ -303,7 +303,7 @@ public class Navit extends Activity { status_bar_height, action_bar_default_height, navigation_bar_height, navigation_bar_height_landscape, navigation_bar_width)); if ((ContextCompat.checkSelfPermission(this, - Manifest.permission.WRITE_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED)|| + Manifest.permission.WRITE_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED) || (ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED)) { Log.d (TAG,"ask for permission(s)"); @@ -344,7 +344,7 @@ public class Navit extends Activity { int height_ = display_.getHeight(); metrics = new DisplayMetrics(); display_.getMetrics(Navit.metrics); - int densityDpi = (int)(( Navit.metrics.density*160)-.5f); + int densityDpi = (int)(( Navit.metrics.density * 160) - .5f); Log.d(TAG, "Navit -> pixels x=" + width_ + " pixels y=" + height_); Log.d(TAG, "Navit -> dpi=" + densityDpi); Log.d(TAG, "Navit -> density=" + Navit.metrics.density); @@ -372,7 +372,7 @@ public class Navit extends Activity { } else if (densityDpi < 640) { my_display_density = "xxxhdpi"; } else { - Log.e(TAG, "found device of very high density ("+densityDpi+")"); + Log.e(TAG, "found device of very high density (" + densityDpi + ")"); Log.e(TAG, "using xxxhdpi values"); my_display_density = "xxxhdpi"; } @@ -383,7 +383,7 @@ public class Navit extends Activity { Log.d(TAG, "android.os.Build.VERSION.SDK_INT=" + Integer.valueOf(android.os.Build.VERSION.SDK)); NavitMain(this, NavitLanguage, Integer.valueOf(android.os.Build.VERSION.SDK), my_display_density, - NAVIT_DATA_DIR+"/bin/navit",map_filename_path); + NAVIT_DATA_DIR + "/bin/navit", map_filename_path); showInfos(); @@ -465,10 +465,10 @@ public class Navit extends Activity { } private void parseNavigationURI(String schemeSpecificPart) { - String naviData[]= schemeSpecificPart.split("&"); + String naviData[] = schemeSpecificPart.split("&"); Pattern p = Pattern.compile("(.*)=(.*)"); Map<String,String> params = new HashMap<String,String>(); - for (int count=0; count < naviData.length; count++) { + for (int count = 0; count < naviData.length; count++) { Matcher m = p.matcher(naviData[count]); if (m.matches()) { @@ -543,7 +543,7 @@ public class Navit extends Activity { menu.add(1, 99, 900, getTstring(R.string.optionsmenu_exit_navit)); //TRANS /* Only show the Backup to SD-Card Option if we really have one */ - if(Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED)) { + if (Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED)) { menu.add(1, 7, 700, getTstring(R.string.optionsmenu_backup_restore)); //TRANS } @@ -743,13 +743,13 @@ public class Navit extends Activity { } break; case NavitSelectStorage_id : - if(resultCode == RESULT_OK) { + if (resultCode == RESULT_OK) { String newDir = data.getStringExtra(FileBrowserActivity.returnDirectoryParameter); - Log.d(TAG, "selected path= "+newDir); - if(!newDir.contains("/navit")) { - newDir = newDir+"/navit/"; + Log.d(TAG, "selected path= " + newDir); + if (!newDir.contains("/navit")) { + newDir = newDir + "/navit/"; } else { - newDir = newDir+"/"; + newDir = newDir + "/"; } SharedPreferences prefs = this.getSharedPreferences(NAVIT_PREFS,MODE_PRIVATE); SharedPreferences.Editor prefs_editor = prefs.edit(); diff --git a/navit/android/src/org/navitproject/navit/NavitAddressSearchActivity.java b/navit/android/src/org/navitproject/navit/NavitAddressSearchActivity.java index 543a75194..5175776e3 100644 --- a/navit/android/src/org/navitproject/navit/NavitAddressSearchActivity.java +++ b/navit/android/src/org/navitproject/navit/NavitAddressSearchActivity.java @@ -105,15 +105,17 @@ public class NavitAddressSearchActivity extends Activity { // We have all images stored as drawable_nodpi resources which allows native code to manipulate them // without interference with android builtin choosing and scaling system. But that makes us to // reinvent the wheel here to show an image in android native interface. - int flag_icon_sizes[]= {24,32,48,64,96}; + int flag_icon_sizes[] = {24,32,48,64,96}; int exact_size, nearest_size; - exact_size=(int)(Navit.metrics.density*24.0 -.5); - nearest_size=flag_icon_sizes[0]; - for(int size: flag_icon_sizes) { - nearest_size=size; - if(exact_size<=size) { break; } + exact_size = (int)(Navit.metrics.density * 24.0 - .5); + nearest_size = flag_icon_sizes[0]; + for (int size: flag_icon_sizes) { + nearest_size = size; + if (exact_size <= size) { + break; + } } - mCountryButton.setImageResource(getDrawableID("country_" + mCountry+"_"+nearest_size+"_"+nearest_size)); + mCountryButton.setImageResource(getDrawableID("country_" + mCountry + "_" + nearest_size + "_" + nearest_size)); } @@ -270,7 +272,7 @@ public class NavitAddressSearchActivity extends Activity { } }); - AlertDialog d=mapModeChooser.create(); + AlertDialog d = mapModeChooser.create(); d.getListView().setFastScrollEnabled(true); d.show(); } diff --git a/navit/android/src/org/navitproject/navit/NavitCamera.java b/navit/android/src/org/navitproject/navit/NavitCamera.java index 66f1f4aa9..709686b97 100644 --- a/navit/android/src/org/navitproject/navit/NavitCamera.java +++ b/navit/android/src/org/navitproject/navit/NavitCamera.java @@ -70,7 +70,7 @@ public class NavitCamera extends SurfaceView implements SurfaceHolder.Callback { public void surfaceChanged(SurfaceHolder holder, int format, int w, int h) { // Now that the size is known, set up the camera parameters and begin // the preview. - Log.e("NavitCamera","surfaceChanged "+w+"x"+h); + Log.e("NavitCamera","surfaceChanged " + w + "x" + h); mCamera.stopPreview(); Camera.Parameters parameters = mCamera.getParameters(); parameters.setPreviewSize(w, h); diff --git a/navit/android/src/org/navitproject/navit/NavitGraphics.java b/navit/android/src/org/navitproject/navit/NavitGraphics.java index 4cd27ccfd..201ab4efc 100644 --- a/navit/android/src/org/navitproject/navit/NavitGraphics.java +++ b/navit/android/src/org/navitproject/navit/NavitGraphics.java @@ -98,25 +98,25 @@ public class NavitGraphics { } private Rect get_rect() { - Rect ret=new Rect(); - ret.left=pos_x; - ret.top=pos_y; + Rect ret = new Rect(); + ret.left = pos_x; + ret.top = pos_y; if (pos_wraparound != 0) { if (ret.left < 0) { - ret.left+=parent_graphics.bitmap_w; + ret.left += parent_graphics.bitmap_w; } if (ret.top < 0) { - ret.top+=parent_graphics.bitmap_h; + ret.top += parent_graphics.bitmap_h; } } - ret.right=ret.left+bitmap_w; - ret.bottom=ret.top+bitmap_h; + ret.right = ret.left + bitmap_w; + ret.bottom = ret.top + bitmap_h; if (pos_wraparound != 0) { if (bitmap_w < 0) { - ret.right=ret.left+bitmap_w+parent_graphics.bitmap_w; + ret.right = ret.left + bitmap_w + parent_graphics.bitmap_w; } if (bitmap_h < 0) { - ret.bottom=ret.top+bitmap_h+parent_graphics.bitmap_h; + ret.bottom = ret.top + bitmap_h + parent_graphics.bitmap_h; } } return ret; @@ -149,14 +149,14 @@ public class NavitGraphics { protected void onCreateContextMenu(ContextMenu menu) { super.onCreateContextMenu(menu); - menu.setHeaderTitle(activity.getTstring(R.string.position_popup_title)+".."); + menu.setHeaderTitle(activity.getTstring(R.string.position_popup_title) + ".."); menu.add(1, 1, NONE, activity.getTstring(R.string.position_popup_drive_here)).setOnMenuItemClickListener(this); menu.add(1, 2, NONE, activity.getTstring(R.string.cancel)).setOnMenuItemClickListener(this); } @Override public boolean onMenuItemClick(MenuItem item) { - switch(item.getItemId()) { + switch (item.getItemId()) { case 1: Message msg = Message.obtain(callback_handler, msg_type.CLB_SET_DISPLAY_DESTINATION.ordinal() , (int)mPressedPosition.x, (int)mPressedPosition.y); @@ -176,7 +176,7 @@ public class NavitGraphics { in_map = true; for (NavitGraphics overlay : overlays) { if (overlay.overlay_disabled == 0) { - Rect r=overlay.get_rect(); + Rect r = overlay.get_rect(); canvas.drawBitmap(overlay.draw_bitmap, r.left, r.top, null); } } @@ -479,7 +479,7 @@ public class NavitGraphics { } break; } - } else if(i!=10) { + } else if (i != 10) { s = java.lang.String.valueOf((char) i); } @@ -492,8 +492,8 @@ public class NavitGraphics { @Override public boolean onKeyMultiple (int keyCode, int count, KeyEvent event) { String s; - if(keyCode == KeyEvent.KEYCODE_UNKNOWN) { - s=event.getCharacters(); + if (keyCode == KeyEvent.KEYCODE_UNKNOWN) { + s = event.getCharacters(); KeypressCallback(KeypressCallbackID, s); return true; } @@ -567,7 +567,7 @@ public class NavitGraphics { relativelayout.addView(view); /* The navigational and status bar tinting code is meaningful only on API19+ */ - if(Build.VERSION.SDK_INT >= 19) { + if (Build.VERSION.SDK_INT >= 19) { frameLayout = new FrameLayout(activity); frameLayout.addView(relativelayout); navigationTintView = new SystemBarTintView(activity); @@ -820,7 +820,7 @@ public class NavitGraphics { public void setMotionCallback(int id) { MotionCallbackID = id; - if(activity != null) { + if (activity != null) { activity.setMotionCallback(id, this); } } @@ -828,7 +828,7 @@ public class NavitGraphics { public void setKeypressCallback(int id) { KeypressCallbackID = id; // set callback id also in main intent (for menus) - if(activity != null) { + if (activity != null) { activity.setKeypressCallback(id, this); } } @@ -842,23 +842,23 @@ public class NavitGraphics { paint.setStyle(Paint.Style.STROKE); //paint.setAntiAlias(true); //paint.setStrokeWidth(0); - ndashes=c[5]; - intervals=new float[ndashes+(ndashes%2)]; + ndashes = c[5]; + intervals = new float[ndashes + (ndashes % 2)]; for (i = 0; i < ndashes; i++) { - intervals[i]=c[6+i]; + intervals[i] = c[6 + i]; } - if((ndashes%2)==1) { - intervals[ndashes]=intervals[ndashes-1]; + if ((ndashes % 2) == 1) { + intervals[ndashes] = intervals[ndashes - 1]; } - if(ndashes>0) { + if (ndashes > 0) { paint.setPathEffect(new android.graphics.DashPathEffect(intervals,0.0f)); } Path path = new Path(); - path.moveTo(c[6+ndashes], c[7+ndashes]); - for (i = 8+ndashes; i < c.length; i += 2) { + path.moveTo(c[6 + ndashes], c[7 + ndashes]); + for (i = 8 + ndashes; i < c.length; i += 2) { path.lineTo(c[i], c[i + 1]); } //global_path.close(); @@ -895,8 +895,8 @@ public class NavitGraphics { } protected void draw_text(Paint paint, int x, int y, String text, int size, int dx, int dy, int bgcolor) { - int oldcolor=paint.getColor(); - Path path=null; + int oldcolor = paint.getColor(); + Path path = null; paint.setTextSize(size / 15); paint.setStyle(Paint.Style.FILL); @@ -908,11 +908,11 @@ public class NavitGraphics { paint.setTextAlign(android.graphics.Paint.Align.LEFT); } - if(bgcolor!=0) { + if (bgcolor != 0) { paint.setStrokeWidth(3); paint.setColor(bgcolor); paint.setStyle(Paint.Style.STROKE); - if(path==null) { + if (path == null) { draw_canvas.drawText(text, x, y, paint); } else { draw_canvas.drawTextOnPath(text, path, 0, 0, paint); @@ -921,7 +921,7 @@ public class NavitGraphics { paint.setColor(oldcolor); } - if(path==null) { + if (path == null) { draw_canvas.drawText(text, x, y, paint); } else { draw_canvas.drawTextOnPath(text, path, 0, 0, paint); @@ -1001,7 +1001,7 @@ public class NavitGraphics { Log.d(TAG,"overlay_disable: " + disable + "Parent: " + (parent_graphics != null)); // assume we are NOT in map view mode! if (parent_graphics == null) { - in_map = (disable==0); + in_map = (disable == 0); } if (overlay_disabled != disable) { overlay_disabled = disable; diff --git a/navit/android/src/org/navitproject/navit/NavitSensors.java b/navit/android/src/org/navitproject/navit/NavitSensors.java index 949dcd8f0..319157879 100644 --- a/navit/android/src/org/navitproject/navit/NavitSensors.java +++ b/navit/android/src/org/navitproject/navit/NavitSensors.java @@ -37,7 +37,7 @@ public class NavitSensors implements SensorEventListener { SensorManager.SENSOR_DELAY_NORMAL); mSensorManager.registerListener((SensorEventListener)this, mSensorManager.getDefaultSensor(Sensor.TYPE_MAGNETIC_FIELD), SensorManager.SENSOR_DELAY_NORMAL); - callbackid=cbid; + callbackid = cbid; } public void onAccuracyChanged(Sensor sensor, int accuracy) { diff --git a/navit/android/src/org/navitproject/navit/NavitVehicle.java b/navit/android/src/org/navitproject/navit/NavitVehicle.java index 2bdcf8c58..81b1b057f 100644 --- a/navit/android/src/org/navitproject/navit/NavitVehicle.java +++ b/navit/android/src/org/navitproject/navit/NavitVehicle.java @@ -199,7 +199,9 @@ public class NavitVehicle { sLocationManager.removeGpsStatusListener(preciseLocationListener); context.unregisterReceiver(preciseLocationListener); } - if (fastLocationListener != null){ sLocationManager.removeUpdates(fastLocationListener);} + if (fastLocationListener != null) { + sLocationManager.removeUpdates(fastLocationListener); + } } } diff --git a/navit/android/src/org/navitproject/navit/NavitWatch.java b/navit/android/src/org/navitproject/navit/NavitWatch.java index ade5140e8..43a2434ad 100644 --- a/navit/android/src/org/navitproject/navit/NavitWatch.java +++ b/navit/android/src/org/navitproject/navit/NavitWatch.java @@ -70,12 +70,12 @@ public class NavitWatch implements Runnable { handler.post(callback_runnable); try { // Log.e("NavitWatch","wait"); - synchronized(this) { + synchronized (this) { if (callback_pending) { this.wait(); } } // Log.e("NavitWatch","wait returned"); } catch (Exception e) { - Log.e("NavitWatch","Exception "+e.getMessage()); + Log.e("NavitWatch","Exception " + e.getMessage()); } if (removed) { break; } } @@ -84,7 +84,7 @@ public class NavitWatch implements Runnable { public void callback() { // Log.e("NavitWatch","Calling Callback"); if (!removed) { WatchCallback(watch_callbackid); } - synchronized(this) { + synchronized (this) { callback_pending = false; // Log.e("NavitWatch","Waking up"); this.notify(); |