backout f4c5e883482a r=mfinkle
authorWes Johnston <wjohnston@mozilla.com>
Tue, 28 Jan 2014 16:25:40 -0800
changeset 181654 12ac1dced3d0acf8107f6d32a8799aadeebbbab9
parent 181653 d61e7d073cda0c634d881fe6c23e6d0bdd92855f
child 181655 fa98b6aefa3421f864b076b1f85a84190651eda2
push id3343
push userffxbld
push dateMon, 17 Mar 2014 21:55:32 +0000
treeherdermozilla-beta@2f7d3415f79f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmfinkle
milestone29.0a1
backs outf4c5e883482a4597799c64491b815db519e38262
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
backout f4c5e883482a r=mfinkle
mobile/android/base/widget/ActivityChooserModel.java
--- a/mobile/android/base/widget/ActivityChooserModel.java
+++ b/mobile/android/base/widget/ActivityChooserModel.java
@@ -26,21 +26,16 @@ import android.content.Intent;
 import android.content.pm.ResolveInfo;
 import android.database.DataSetObservable;
 import android.os.AsyncTask;
 import android.text.TextUtils;
 import android.util.Log;
 import android.util.Xml;
 
 /**
- * Mozilla: Extra imports.
- */
-import android.content.pm.ApplicationInfo;
-
-/**
  * Mozilla: Unused import.
  */
 //import com.android.internal.content.PackageMonitor;
 
 import org.xmlpull.v1.XmlPullParser;
 import org.xmlpull.v1.XmlPullParserException;
 import org.xmlpull.v1.XmlSerializer;
 
@@ -258,21 +253,16 @@ public class ActivityChooserModel extend
      * Monitor for added and removed packages.
      */
     /**
      * Mozilla: Not needed for the application.
      */
     //private final PackageMonitor mPackageMonitor = new DataModelPackageMonitor();
 
     /**
-     * Mozilla: Count to monitor added and removed packages.
-     */
-    private int mApplicationsCount;
-
-    /**
      * Context for accessing resources.
      */
     private final Context mContext;
 
     /**
      * The name of the history file that backs this model.
      */
     private final String mHistoryFileName;
@@ -737,25 +727,16 @@ public class ActivityChooserModel extend
 
     /**
      * Loads the activities for the current intent if needed which is
      * if they are not already loaded for the current intent.
      *
      * @return Whether loading was performed.
      */
     private boolean loadActivitiesIfNeeded() {
-        /**
-         * Mozilla: Hack to find change in the installed/uninstalled applications.
-         */
-        List<ApplicationInfo> applications = mContext.getPackageManager().getInstalledApplications(0);
-        if (applications != null && applications.size() != mApplicationsCount) {
-            mApplicationsCount = applications.size();
-            mReloadActivities = true;
-        }
-
         if (mReloadActivities && mIntent != null) {
             mReloadActivities = false;
             mActivities.clear();
             List<ResolveInfo> resolveInfos = mContext.getPackageManager()
                     .queryIntentActivities(mIntent, 0);
             final int resolveInfoCount = resolveInfos.size();
             for (int i = 0; i < resolveInfoCount; i++) {
                 ResolveInfo resolveInfo = resolveInfos.get(i);