コード例 #1
0
 @Override
 public void distributionFound(final Distribution distribution) {
   mAsserter.ok(false, "No distributionFound.", "Wasn't expecting a distribution!");
   synchronized (distribution) {
     distribution.notifyAll();
   }
 }
コード例 #2
0
 // Initialize the distribution from the mock package.
 private Distribution initDistribution(String aPackagePath) {
   // Call Distribution.init with the mock package.
   Actions.EventExpecter distributionSetExpecter =
       mActions.expectGoannaEvent("Distribution:Set:OK");
   Distribution dist =
       Distribution.init(mActivity, aPackagePath, "prefs-" + System.currentTimeMillis());
   distributionSetExpecter.blockForEvent();
   distributionSetExpecter.unregisterListener();
   return dist;
 }