cleaned up warnings
authorBrad Lassey <blassey@mozilla.com>
Tue, 11 Oct 2011 13:09:44 -0400
changeset 83143 5406124e5f8ae87c39b98532537aea745369aaa8
parent 83142 5d6a3f8787cc6588664c807e6899ada1f321d133
child 83144 ba4595cf553e729b46161c9082d80b6b5fcb8856
push idunknown
push userunknown
push dateunknown
milestone10.0a1
cleaned up warnings
embedding/android/AwesomeBar.java
embedding/android/CrashReporter.java.in
embedding/android/GeckoApp.java
embedding/android/LauncherShortcuts.java.in
embedding/android/resources/layout/gecko_app.xml
--- a/embedding/android/AwesomeBar.java
+++ b/embedding/android/AwesomeBar.java
@@ -169,17 +169,16 @@ public class AwesomeBar extends ListActi
                 }
             }
         });
 
         DatabaseHelper dbHelper = new DatabaseHelper(this);
         mDb = dbHelper.getReadableDatabase();
 
         adapter.setFilterQueryProvider(new FilterQueryProvider() {
-            @Override
             public Cursor runQuery(CharSequence constraint) {
 
                 // _id column required for CursorAdapter; provide a dummy here
                 mCursor = mDb.rawQuery(
                         "SELECT 0 AS _id, title, url "
                           + "FROM moz_places "
                           + "WHERE (url LIKE ? OR title LIKE ?) "
                           + "LIMIT 12",
--- a/embedding/android/CrashReporter.java.in
+++ b/embedding/android/CrashReporter.java.in
@@ -154,29 +154,29 @@ public class CrashReporter extends Activ
   }
 
   public void onRestartClick(View v)
   {
     doRestart();
     backgroundSendReport();
   }
 
-  boolean readStringsFromFile(String filePath, Map stringMap)
+  boolean readStringsFromFile(String filePath, Map<String, String> stringMap)
   {
     try {
       BufferedReader reader = new BufferedReader(
         new FileReader(filePath));
       return readStringsFromReader(reader, stringMap);
     } catch (Exception e) {
       Log.e("GeckoCrashReporter", "exception while reading strings: ", e);
       return false;
     }
   }
 
-  boolean readStringsFromReader(BufferedReader reader, Map stringMap)
+  boolean readStringsFromReader(BufferedReader reader, Map<String, String> stringMap)
     throws java.io.IOException
   {
     String line;
     while ((line = reader.readLine()) != null) {
       int equalsPos = -1;
       if ((equalsPos = line.indexOf('=')) != -1) {
         String key = line.substring(0, equalsPos);
         String val = unescape(line.substring(equalsPos + 1));
--- a/embedding/android/GeckoApp.java
+++ b/embedding/android/GeckoApp.java
@@ -74,17 +74,17 @@ abstract public class GeckoApp
 
     public static final String ACTION_ALERT_CLICK = "org.mozilla.gecko.ACTION_ALERT_CLICK";
     public static final String ACTION_ALERT_CLEAR = "org.mozilla.gecko.ACTION_ALERT_CLEAR";
     public static final String ACTION_WEBAPP      = "org.mozilla.gecko.WEBAPP";
     public static final String ACTION_DEBUG       = "org.mozilla.gecko.DEBUG";
     public static final String ACTION_BOOKMARK    = "org.mozilla.gecko.BOOKMARK";
 
     public static LinearLayout mainLayout;
-    public static AbsoluteLayout geckoLayout;
+    public static RelativeLayout geckoLayout;
     public static GeckoSurfaceView surfaceView;
     public static GeckoApp mAppContext;
     public static boolean mFullscreen = false;
     public static File sGREDir = null;
     public Handler mMainHandler;
     private IntentFilter mConnectivityFilter;
     private BroadcastReceiver mConnectivityReceiver;
     public static Button mAwesomeBar;
@@ -393,17 +393,17 @@ abstract public class GeckoApp
                              WindowManager.LayoutParams.FLAG_FULLSCREEN : 0,
                              WindowManager.LayoutParams.FLAG_FULLSCREEN);
         getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN);
         
         setContentView(R.layout.gecko_app);
         mAppContext = this;
 
         // setup gecko layout
-        geckoLayout = (AbsoluteLayout) findViewById(R.id.geckoLayout);
+        geckoLayout = (RelativeLayout) findViewById(R.id.geckoLayout);
 
         if (surfaceView == null) {
             surfaceView = new GeckoSurfaceView(this);
             geckoLayout.addView(surfaceView);
         } else if (geckoLayout.getChildCount() == 0) {
            //surfaceView still holds to the old one during rotation. re-add it to new activity
            ((ViewGroup) surfaceView.getParent()).removeAllViews();
            geckoLayout.addView(surfaceView);
@@ -770,17 +770,17 @@ abstract public class GeckoApp
             status = reader.readLine();
             reader.close();
         } catch (Exception e) {
             Log.i(LOG_FILE_NAME, "error reading update status", e);
         }
         return status;
     }
 
-    private SynchronousQueue<String> mFilePickerResult = new SynchronousQueue();
+    private SynchronousQueue<String> mFilePickerResult = new SynchronousQueue<String>();
     public String showFilePicker(String aMimeType) {
         Intent intent = new Intent(Intent.ACTION_GET_CONTENT);
         intent.addCategory(Intent.CATEGORY_OPENABLE);
         intent.setType(aMimeType);
         GeckoApp.this.
             startActivityForResult(
                 Intent.createChooser(intent, getString(R.string.choose_file)),
                 FILE_PICKER_REQUEST);
--- a/embedding/android/LauncherShortcuts.java.in
+++ b/embedding/android/LauncherShortcuts.java.in
@@ -190,17 +190,17 @@ public class LauncherShortcuts extends A
             if (webappsJson.length() == 0)
                 return null;
             
             mWebappsList = new ArrayList<HashMap<String, String>>();
 
             try {
                 JSONObject webApps = (JSONObject) new JSONTokener(webappsJson).nextValue();
 
-                Iterator<Object> appKeys = webApps.keys();
+                Iterator appKeys = webApps.keys();
                 HashMap<String, String> map;
 
                 while (appKeys.hasNext()) {
                     String appKey = appKeys.next().toString();
                     JSONObject app = webApps.getJSONObject(appKey);
                     
                     map = new HashMap<String, String>();
                     map.put("appKey", appKey);
@@ -230,26 +230,24 @@ public class LauncherShortcuts extends A
                 builder.setTitle(R.string.launcher_shortcuts_title);
                 builder.setAdapter(new SimpleAdapter(
                     LauncherShortcuts.this,
                     mWebappsList,
                     R.layout.launch_app_listitem,
                     new String[] { "favicon", "title" },
                     new int[] { R.id.favicon, R.id.title }
                 ), new DialogInterface.OnClickListener() {
-                    @Override
                     public void onClick(DialogInterface dialog, int id) {
                         dialog.dismiss();
                         onListItemClick(id);
                         finish();
                     }
                 });
                 
                 builder.setOnCancelListener(new DialogInterface.OnCancelListener() {
-                    @Override
                     public void onCancel(DialogInterface dialog) {
                         dialog.dismiss();
                         finish();
                     }
                 });
                 
                 builder.create().show();
             } else {
--- a/embedding/android/resources/layout/gecko_app.xml
+++ b/embedding/android/resources/layout/gecko_app.xml
@@ -52,14 +52,14 @@
                         android:layout_marginTop="5dp"
                         android:layout_marginBottom="5dp"
                         android:scaleType="centerInside"
                         android:background="@drawable/address_bar_button_right"
                         android:src="@drawable/reload"/>
 
     </LinearLayout>
 
-    <AbsoluteLayout android:id="@+android:id/geckoLayout"
+    <RelativeLayout android:id="@+android:id/geckoLayout"
               android:layout_width="fill_parent"
               android:layout_height="fill_parent"
               android:layout_weight="1"/>
 
  </LinearLayout>