text:
// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

/**
 * @fileoverview
 * `cr-events` provides helpers for handling events in Chrome Polymer elements.
 *
 * Example:
 *
 *    <cr-events id="events"></cr-events>
 *
 * Usage:
 *
 *    this.$.events.forward(this.$.element, ['change']);
 *
 * @element cr-events
 */
Polymer({
  /**
   * Sets up an element to forward events across the shadow boundary, for events
   * which normally stop at the root node (see http://goo.gl/WGMO9x).
   * @param {!HTMLElement} element The element to forward events from.
   * @param {!Array.<string>} events The events to forward.
   */
  forward: function(element, events) {
    for (var i = 0; i < events.length; i++)
      element.addEventListener(events[i], this.forwardEvent_);
  },

  /**
   * Forwards events that don't automatically cross the shadow boundary
   * if the event should bubble.
   * @param {!Event} e The event to forward.
   * @param {*} detail Data passed when initializing the event.
   * @param {Node=} opt_sender Node that declared the handler.
   * @private
   */
  forwardEvent_: function(e, detail, opt_sender) {
    if (!e.bubbles)
      return;

    var node = e.path[e.path.length - 1];
    if (node instanceof ShadowRoot) {
      // Forward the event to the shadow host.
      e.stopPropagation();
      node.host.fire(e.type, detail, node.host, true, e.cancelable);
    }
  },
});

redpajama_set_name: RedPajamaGithub


text:
package io.github.moosbusch.permagon.configuration.builder.converter.impl;

import io.github.moosbusch.permagon.configuration.builder.converter.spi.AbstractJavaFXFromStringConverter;
import javafx.css.StyleOrigin;

public class JavaFXStyleOriginConverter extends AbstractJavaFXFromStringConverter<StyleOrigin> {

	@Override
	public StyleOrigin getDefaultValue() {
            return StyleOrigin.AUTHOR;
	}

	@Override
	public Class<StyleOrigin> getTargetType() {
		return StyleOrigin.class;
	}

	@Override
	public StyleOrigin valueFromString(String constraint) {
		return StyleOrigin.valueOf(constraint);
	}

}


text:
EclecticKlos.github.io
======================

Dev BootCamp Phase 0 Website


text:
package org.jtrim2.testutils;

import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Modifier;
import java.util.Objects;
import java.util.function.Consumer;
import org.jtrim2.concurrent.AsyncTasks;

public final class TestUtils {
    public static <T> T build(T obj, Consumer<? super T> config) {
        config.accept(obj);
        return obj;
    }

    public static void testUtilityClass(Class<?> type) {
        if (!Modifier.isFinal(type.getModifiers())) {
            throw new AssertionError("Utility class must be final: " + type.getName());
        }

        Constructor<?>[] constructors = type.getDeclaredConstructors();
        if (constructors.length == 0) {
            // This shouldn't be possible but it is fine.
            return;
        }

        if (constructors.length != 1) {
            throw new AssertionError("Utility class must only have a single constructor: " + type.getName());
        }

        verifyUncallable(constructors[0]);
    }

    private static void verifyUncallable(Constructor<?> constructor) {
        if (!Modifier.isPrivate(constructor.getModifiers())) {
            throw new AssertionError("Utility class' constructor must be private: " + constructor.getName());
        }

        if (constructor.getParameterCount() != 0) {
            throw new AssertionError("Utility class' constructor must have no arguments: " + constructor.getName());
        }

        constructor.setAccessible(true);
        try {
            constructor.newInstance();
        } catch (InvocationTargetException ex) {
            if (ex.getCause() instanceof AssertionError) {
                return;
            }
        } catch (Exception ex) {
            throw new AssertionError(constructor.getName(), ex);
        }

        throw new AssertionError("Utility class' constructor must throw an AssertionError" + constructor.getName());
    }

    public static void expectUnwrappedError(Class<? extends Throwable> errorType, UnsafeRunnable task) {
        expectError(true, errorType, task);
    }

    public static void expectError(Class<? extends Throwable> errorType, UnsafeRunnable task) {
        expectError(false, errorType, task);
    }

    private static void expectError(boolean unwrap, Class<? extends Throwable> errorType, UnsafeRunnable task) {
        Throwable received = null;

        try {
            task.run();
        } catch (Throwable ex) {
            received = ex;
            if (unwrap) {
                received = AsyncTasks.unwrap(received);
            }
            if (errorType.isInstance(received)) {
                return;
            }
        }

        throw new AssertionError("Expected error: " + errorType.getName() + " but received " + received);
    }

    public static void checkFailAfterTimeout(long waitMillis, UnsafeRunnable task) throws Exception {
        try {
            task.run();
        } catch (Throwable ex) {
            Thread.sleep(waitMillis);
            task.run();
            throw new AssertionError("Verification succeeded after second try. Probably an error in the test.", ex);
        }
    }

    public static Runnable toSafeRunnable(UnsafeRunnable task) {
        Objects.requireNonNull(task, "task");
        return () -> {
            try {
                task.run();
            } catch (RuntimeException ex) {
                throw ex;
            } catch (Exception ex) {
                throw new RuntimeException(ex);
            }
        };
    }

    private TestUtils() {
        throw new AssertionError();
    }
}


text:
import socket

import oslo_messaging as messaging
from oslo_serialization import jsonutils

from datahub.common import context as dh_context
import datahub.conf

__all__ = [
    'init',
    'cleanup',
    'set_defaults',
    'add_extra_exmods',
    'clear_extra_exmods',
    'get_allowed_exmods',
    'RequestContextSerializer',
    'get_client',
    'get_server',
    'get_notifier',
    'TRANSPORT_ALIASES',
]

CONF = datahub.conf.CONF
TRANSPORT = None
NOTIFIER = None

ALLOWED_EXMODS = []

EXTRA_EXMODS = []

TRANSPORT_ALIASES = {
    'datahub.rpc.impl_kafka': 'kafka',
    'datahub.rpc.impl_kombu': 'rabbit',
    'datahub.rpc.impl_qpid': 'qpid',
    'datahub.rpc.impl_zmq': 'zmq'
}

def init(conf):
    global TRANSPORT, NOTIFIER
    exmods = get_allowed_exmods()
    TRANSPORT = messaging.get_transport(conf,
                                        allowed_remote_exmods=exmods,
                                        aliases=TRANSPORT_ALIASES)
    serializer = RequestContextSerializer(JsonPayloadSerializer())
    NOTIFIER = messaging.Notifier(TRANSPORT, serializer=serializer)

def cleanup():
    global TRANSPORT, NOTIFIER
    assert TRANSPORT is not None
    assert NOTIFIER is not None
    TRANSPORT.cleanup()
    TRANSPORT = NOTIFIER = None

def set_defaults(control_exchange):
    messaging.set_transport_defaults(control_exchange)

def add_extra_exmods(*args):
    EXTRA_EXMODS.extend(args)

def clear_extra_exmods():
    del EXTRA_EXMODS[:]

def get_allowed_exmods():
    return ALLOWED_EXMODS + EXTRA_EXMODS

class JsonPayloadSerializer(messaging.NoOpSerializer):
    @staticmethod
    def serialize_entity(context, entity):
        return jsonutils.to_primitive(entity, convert_instances=True)

class RequestContextSerializer(messaging.Serializer):

    def __init__(self, base):
        self._base = base

    def serialize_entity(self, context, entity):
        if not self._base:
            return entity
        return self._base.serialize_entity(context, entity)

    def deserialize_entity(self, context, entity):
        if not self._base:
            return entity
        return self._base.deserialize_entity(context, entity)

    def serialize_context(self, context):
        return context.to_dict()

    def deserialize_context(self, context):
        return dh_context.RequestContext.from_dict(context)

def get_client(target, version_cap=None, serializer=None, timeout=None):
    assert TRANSPORT is not None
    serializer = RequestContextSerializer(serializer)

    return messaging.RPCClient(TRANSPORT,
                               target,
                               version_cap=version_cap,
                               serializer=serializer,
                               timeout=timeout)

def get_server(target, endpoints, serializer=None):
    assert TRANSPORT is not None
    serializer = RequestContextSerializer(serializer)

    return messaging.get_rpc_server(TRANSPORT,
                                    target,
                                    endpoints,
                                    executor='eventlet',
                                    serializer=serializer)

def get_notifier(service='datahub', host=None, publisher_id=None):
    assert NOTIFIER is not None
    myhost = CONF.host
    if myhost is None:
        myhost = socket.getfqdn()
    if not publisher_id:
        publisher_id = "%s.%s" % (service, host or myhost)
    return NOTIFIER.prepare(publisher_id=publisher_id)


text:
namespace cyder {

    class ThrowException {
    public:
        static void Throw(v8::Isolate* isolate, v8::Local<v8::Value> exception) {
            if (!isolate->IsExecutionTerminating()) {
                isolate->ThrowException(exception);
            }
        }

        static v8::Local<v8::Value> CreateError(v8::Isolate* isolate, const std::string& message);
        static v8::Local<v8::Value> CreateRangeError(v8::Isolate* isolate, const std::string& message);
        static v8::Local<v8::Value> CreateReferenceError(v8::Isolate* isolate, const std::string& message);
        static v8::Local<v8::Value> CreateSyntaxError(v8::Isolate* isolate, const std::string& message);
        static v8::Local<v8::Value> CreateTypeError(v8::Isolate* isolate, const std::string& message);

        static void ThrowError(v8::Isolate* isolate, const std::string& message);
        static void ThrowRangeError(v8::Isolate* isolate, const std::string& message);
        static void ThrowReferenceError(v8::Isolate* isolate, const std::string& message);
        static void ThrowSyntaxError(v8::Isolate* isolate, const std::string& message);
        static void ThrowTypeError(v8::Isolate* isolate, const std::string& message);
    };

}

#endif //CYDER_THROWEXCEPTION_H


text:
<?php

/**
 * @author Adam L. Englander <adam.l.englander@coupla.co>
 *
 * Integration tests for Extension configuration\
 *
 * These tests use the actual configuration classes and functions to ensure the getConfig method behaves as expected
 */

namespace DerpTest\Behat\MachinistExtension\Test;

use DerpTest\Behat\MachinistExtension\Extension;
use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition;
use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException;
use Symfony\Component\Config\Definition\NodeInterface;

class ExtensionConfigIntegrationTest extends \PHPUnit_Framework_TestCase
{
    /**
     * @var NodeInterface
     */
    private $node;

    /**
     * @var Extension
     */
    private $extension;

    protected function setUp()
    {
        $this->extension = new Extension();
        $definition = new ArrayNodeDefinition('test');
        $this->extension->getConfig($definition);
        $this->node = $definition->getNode();
    }

    protected function tearDown()
    {
        $this->node = null;
    }

    public function testNoDataIsRequiredToReturnConfig()
    {
        $expected = $this->node->finalize(array());
        $this->assertNotNull($expected);
    }

    /**
     * @depends testNoDataIsRequiredToReturnConfig
     */
    public function testTruncateOnWipeCanBeConfigured()
    {
        $actual = $this->node->finalize(array());
        $this->assertArrayHasKey('truncate_on_wipe', $actual);
    }

    /**
     * @depends testNoDataIsRequiredToReturnConfig
     */
    public function testTruncateOnWipeDefaultsToFalse()
    {
        $actual = $this->node->finalize(array());
        $this->assertFalse($actual['truncate_on_wipe']);
    }

    public function testTruncateOnWipeCanUseConfig()
    {
        $actual = $this->node->finalize(
            array('truncate_on_wipe' => true)
        );
        $this->assertTrue($actual['truncate_on_wipe']);
    }

    /**
     * @expectedException \Symfony\Component\Config\Definition\Exception\InvalidConfigurationException
     */
    public function testStoreSettingsMissingTypeErrors()
    {
        $this->node->finalize(
            array(
                'store' => array(
                    'default' => array(
                        'dsn' => 'sqlite::memory:'
                    )
                )
            )
        );
    }

    /**
     * @expectedException \Symfony\Component\Config\Definition\Exception\InvalidConfigurationException
     */
    public function testStoreSettingsMissingDsnErrors()
    {
        $this->node->finalize(
            array(
                'store' => array(
                    'default' => array(
                        'type' => 'sqlite'
                    )
                )
            )
        );
    }

    /**
     * @expectedException \Symfony\Component\Config\Definition\Exception\InvalidConfigurationException
     */
    public function testStoreInvalidTypeErrors()
    {
        $this->node->finalize(
            array(
                'store' => array(
                    'default' => array(
                        'type' => 'invalid',
                        'dsn' => 'sqlite::memory:'
                    )
                )
            )
        );
    }

    /**
     * @dataProvider validStoreTypeValueProvider
     */
    public function testStoreValidTypesReturnValidValues($type)
    {
        $expected = array(
            'default' => array(
                'type' => $type,
                'dsn' => 'sqlite::memory:',
                'database' => 'db'
            )
        );
        $actual = $this->node->finalize(array('store' => $expected));

        $this->assertInternalType('array', $actual);
        $this->assertArrayHasKey('store', $actual);
        $this->assertEquals($expected, $actual['store']);
    }

    public function validStoreTypeValueProvider()
    {
        return array(
            'SQLite' => array('sqlite'),
            'MySql' => array('mysql')
        );
    }

    public function testBlueprintWithDefaultsReturnsDefaults()
    {
        $expected = array('default-key' => 'default-value');

        $actual = $this->node->finalize(array(
            'blueprint' => array(
                'test-blueprint' => array(
                    'defaults' => $expected
                )
            )
        ));

        $this->assertArrayHasKey(
            'defaults',
            $actual['blueprint']['test-blueprint']
        );
        $this->assertEquals(
            $expected,
            $actual['blueprint']['test-blueprint']['defaults']
        );
    }

    public function testBlueprintWithRelationshipsHasRelationships()
    {
        $expected = array(
            'relationship-test' => array(
                'foreign' => 'foreign-id',
                'local' => 'local-id'
            )
        );
        $actual = $this->node->finalize(array(
            'blueprint' => array(
                'test-blueprint' => array(
                    'relationships' => $expected
                )
            )
        ));

        $this->assertArrayHasKey(
            'relationships',
            $actual['blueprint']['test-blueprint']
        );
        $this->assertEquals(
            $expected,
            $actual['blueprint']['test-blueprint']['relationships']
        );
    }
}


text:
"""Decode MPEG audio files with MAD (via pymad)."""
import mad

from . import DecodeError
from .base import AudioFile

class UnsupportedError(DecodeError):
    """The file is not readable by MAD."""

class MadAudioFile(AudioFile):
    """MPEG audio file decoder using the MAD library."""
    def __init__(self, filename):
        self.fp = open(filename, 'rb')
        self.mf = mad.MadFile(self.fp)
        if not self.mf.total_time():  # Indicates a failed open.
            self.fp.close()
            raise UnsupportedError()

    def close(self):
        if hasattr(self, 'fp'):
            self.fp.close()
        if hasattr(self, 'mf'):
            del self.mf

    def read_blocks(self, block_size=4096):
        """Generates buffers containing PCM data for the audio file.
        """
        while True:
            out = self.mf.read(block_size)
            if not out:
                break
            yield bytes(out)

    @property
    def samplerate(self):
        """Sample rate in Hz."""
        return self.mf.samplerate()

    @property
    def duration(self):
        """Length of the audio in seconds (a float)."""
        return float(self.mf.total_time()) / 1000

    @property
    def channels(self):
        """The number of channels."""
        if self.mf.mode() == mad.MODE_SINGLE_CHANNEL:
            return 1
        elif self.mf.mode() in (mad.MODE_DUAL_CHANNEL,
                                mad.MODE_JOINT_STEREO,
                                mad.MODE_STEREO):
            return 2
        else:
            # Other mode?
            return 2

    def __del__(self):
        self.close()

    # Iteration.
    def __iter__(self):
        return self.read_blocks()

    # Context manager.
    def __enter__(self):
        return self

    def __exit__(self, exc_type, exc_val, exc_tb):
        self.close()
        return False


text:
require 'spec_helper'

describe QuestionController do
  describe "GET answer" do

    it "assigns quantities" do
      get :answer, :q => 'shipping 10 tonnes of stuff for 1000 kilometres'
      assigns(:quantities).map{|x| x.to_s}.should eql ['10.0 t', '1000.0 km']
    end

    it "assigns terms" do
      get :answer, :q => 'shipping 10 tonnes of stuff for 1000 kilometres'
      assigns(:terms).should eql ['shipping', 'stuff']
    end

    it "assigns categories" do
      get :answer, :q => 'shipping 10 tonnes of stuff for 1000 kilometres'
      assigns(:categories).should eql [ "Etching_and_CVD_cleaning_in_the_Electronics_Industry",
                                        "DEFRA_freight_transport_methodology",
                                        "Freight_transport_by_Greenhouse_Gas_Protocol" ]
    end

    it "assigns a thinking message" do
      get :answer, :q => 'shipping 10 tonnes of stuff for 1000 kilometres'
      assigns(:message).should_not be_blank
    end

  end

  describe "GET detail" do

    it "gets results with a single input quantity" do
      get :detailed_answer, :quantities => '100.0 km', :terms => 'truck', :category => 'Generic_van_transport'
      assigns(:amount).should_not be_nil
      assigns(:amount)[:value].should eql 27.18
      assigns(:more_info_url).should eql 'http://discover.amee.com/categories/Generic_van_transport/data/cng/up%20to%203.5%20tonnes/result/false/true/none/100.0;km/false/none/0/-1/0/true/false/false'
    end

    it "gets results with two input quantities" do
      get :detailed_answer, :quantities => '100.0 km,1.0 t', :terms => 'truck', :category => 'DEFRA_freight_transport_methodology'
      assigns(:amount).should_not be_nil
      assigns(:amount)[:value].should eql 80.7365279
      assigns(:more_info_url).should eql 'http://discover.amee.com/categories/DEFRA_freight_transport_methodology/data/van/petrol/1.305-1.74%20t/result/100.0;km/1.0;t'
    end

    it "gets results with IATA codes" do
      get :detailed_answer, :quantities => 'from:LHR,to:LAX', :terms => 'fly', :category => 'Great_Circle_flight_methodology'
      assigns(:amount).should_not be_nil
      assigns(:amount)[:value].should be_within(1e-9).of(1064.49102031516)
      assigns(:more_info_url).should eql 'http://discover.amee.com/categories/Great_Circle_flight_methodology/data/great%20circle%20route/result/LHR/LAX/false/1/-999/-999/-999/-999/none/average/1/1.9/false'
    end

  end

end


text:
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
        <padding android:left="7dp" android:top="7dp" android:bottom="7dp" android:right="7dp"/>
        <gradient android:startColor="#ff0" android:endColor="#00f" android:angle="45"

            />
        <corners android:radius="8dp"/>
</shape>


text:
% Create complete dataset as a MAT file.
% MAT file contains
% * DataBySeq, 1D array of structs.
%    Each entry n is a struct for a single sequence, with fields
%    - X : 2D array, T x D
%        Each row t is observed data vector (size D) at time interval t
%    - Xprev : 2D array, T x D
%        Each row t is previous observation (size D) for time interval t
%        This field is used by auto-regressive models, ignored by others.
%    - TrueZ : 2D array, T x 1
%        Each entry t is the int label of human-annotated action at time t.
%    - filename : string
%        Indicates which record on mocap.cs.cmu.edu this came from.
%        Format: <subjectID trialID>, like 14_06 or 13_30.
% * ActionNames : 1D cell array of strings
%    each entry k is the name of the action referred to when TrueZ(t)==k
% * ChannelNames : 1D cell array of strings
%    each entry d is the name of the sensor for dimension d of X/Xprev

% Data file names, in format <subject id>_<trial id>
% Subject/trial ids are taken directly from mocap.cs.cmu.edu
FileNames = {'13_29',  '13_30',  '13_31',  '14_06',  '14_14',  '14_20'};
targetframerate = 10;
inputframerate = 120; % default of data stored at mocap.cs.cmu.edu;

% Names of 12 sensor channels, in format <body part>.<r/t><axis>
% where r means rotation, t means translation
% <axis> is one of 'x', 'y', 'z'
% These are a subset of all available measurements in raw data,
% chosen to simplify problem while still representing all relevant motions.
ChannelNames = {
    'root.ty', 'lowerback.rx', 'lowerback.ry', 'upperneck.ry', ...
    'rhumerus.rz', 'rradius.rx','lhumerus.rz', 'lradius.rx', ...
    'rtibia.rx', 'rfoot.rx', 'ltibia.rx', 'lfoot.rx' ...
};

ActionNames = {
    'JumpJack', 'Jog', 'Squat', 'KneeRaise', 'ArmCircle', ...
    'Twist', 'SideReach', 'Box', 'UpDown', 'ToeTouchOneHand', ...
    'SideBend', 'ToeTouchTwoHands' ...
};

DataTemplate = struct('X', [], 'Xprev', [], 'TrueZ', []);
DataBySeq = repmat(DataTemplate, length(FileNames), 1);

for n = 1:length(FileNames)
   amcfpath = ['../amc/' FileNames{n} '.amc'];
   [X_n, ColNames] = readDataMatrixFromAMC(...
        amcfpath, ...
        ChannelNames, ...
        targetframerate, ...
        inputframerate);

   zpath =['../truelabels/' FileNames{n} '.txt'];
   Z_n = squeeze(importdata(zpath));
   Z_n = Z_n(:);

   % Convert sequence-specific data into standard format,
   % setting aside the first timestep since autoregressive models
   % can't deal with it.
   DataBySeq(n).X = X_n(2:end, :);
   DataBySeq(n).Xprev = X_n(1:end-1, :);
   DataBySeq(n).TrueZ = Z_n(2:end);
   DataBySeq(n).filename = FileNames(n);
   DataBySeq(n).framerate = targetframerate;
end

save('../mocap6.mat', 'DataBySeq', 'ChannelNames', 'ActionNames');


text:
{% extends "base.html" %}
{% load core_tags %}

{% block title %}Schedule{% endblock %}

{% block breadcrumbs %}

 Home /

{{ organization.name }}
       /

{{ 'My Calendar' }}

{% endblock %}

{% block page_title %}{{ organization.name|possesive }} Schedule
{% endblock %}

{% block extracss %}
	<link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}css/fullcalendar.css">
	<link rel="stylesheet" type="text/css" media="print" href="{{ STATIC_URL }}css/fullcalendar.print.css">
{% endblock %}

{% block extrajs %}

{% endblock %}

{% block content %}

{% endblock %}


text:
import { browser, element, by } from 'protractor';

export class Ng2StompjsDemoPage {
  navigateTo() {
    return browser.get('/');
  }

  getHeaderText() {
    return element(by.css('app-root h1')).getText();
  }
}


text:
import willie.module
from random import randint

@willie.module.commands('sniffbutt')
def sniffbutt(bot, trigger):
    """
    sniffbutt [object] - tells Frisket to sniff the commander's butt
    """
    x = randint(0,10) #inclusive

    bot.action('sniffs {}\'s butt.'.format(trigger.nick))
    if(x < 7):
        bot.say('Smells like a friendly butt! Woof!')
    elif(x >= 8 and x <= 10):
        bot.say('Smells bad! You\'re not a friend of mine! Angry Woof!')


text:
.class public Landroid/app/NotificationManagerPlus;
.super Ljava/lang/Object;
.source "NotificationManagerPlus.java"

# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Landroid/app/NotificationManagerPlus$OnLastDismissListener;,
        Landroid/app/NotificationManagerPlus$OnFirstShowListener;,
        Landroid/app/NotificationManagerPlus$ManagerBuilder;,
        Landroid/app/NotificationManagerPlus$Parameters;,
        Landroid/app/NotificationManagerPlus$DialogPlus;
    }
.end annotation

# static fields
.field private static final LOG:Z = true

.field private static final MSG_SHOW:I = 0x1

.field private static final TAG:Ljava/lang/String; = "NotificationManangerPlus"

# instance fields
.field private mFilter:Landroid/content/IntentFilter;

.field private mHandler:Landroid/os/Handler;

.field private mList:Ljava/util/ArrayList;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/ArrayList",
            "<",
            "Landroid/app/NotificationManagerPlus$DialogPlus;",
            ">;"
        }
    .end annotation
.end field

.field private mListening:Z

.field private mOnDismissListener:Landroid/content/DialogInterface$OnDismissListener;

.field private mOnShowListener:Landroid/content/DialogInterface$OnShowListener;

.field private mParams:Landroid/app/NotificationManagerPlus$Parameters;

.field private mReceiver:Landroid/content/BroadcastReceiver;

.field private mSend:Z

# direct methods
.method private constructor <init>(Landroid/app/NotificationManagerPlus$Parameters;)V
    .locals 2
    .parameter "p"

    .prologue
    .line 335
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 68
    const/4 v0, 0x1

    iput-boolean v0, p0, Landroid/app/NotificationManagerPlus;->mSend:Z

    .line 69
    const/4 v0, 0x0

    iput-boolean v0, p0, Landroid/app/NotificationManagerPlus;->mListening:Z

    .line 72
    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    iput-object v0, p0, Landroid/app/NotificationManagerPlus;->mList:Ljava/util/ArrayList;

    .line 74
    new-instance v0, Landroid/app/NotificationManagerPlus$1;

    invoke-direct {v0, p0}, Landroid/app/NotificationManagerPlus$1;-><init>(Landroid/app/NotificationManagerPlus;)V

    iput-object v0, p0, Landroid/app/NotificationManagerPlus;->mHandler:Landroid/os/Handler;

    .line 281
    new-instance v0, Landroid/app/NotificationManagerPlus$4;

    invoke-direct {v0, p0}, Landroid/app/NotificationManagerPlus$4;-><init>(Landroid/app/NotificationManagerPlus;)V

    iput-object v0, p0, Landroid/app/NotificationManagerPlus;->mReceiver:Landroid/content/BroadcastReceiver;

    .line 299
    new-instance v0, Landroid/app/NotificationManagerPlus$5;

    invoke-direct {v0, p0}, Landroid/app/NotificationManagerPlus$5;-><init>(Landroid/app/NotificationManagerPlus;)V

    iput-object v0, p0, Landroid/app/NotificationManagerPlus;->mOnDismissListener:Landroid/content/DialogInterface$OnDismissListener;

    .line 317
    new-instance v0, Landroid/app/NotificationManagerPlus$6;

    invoke-direct {v0, p0}, Landroid/app/NotificationManagerPlus$6;-><init>(Landroid/app/NotificationManagerPlus;)V

    iput-object v0, p0, Landroid/app/NotificationManagerPlus;->mOnShowListener:Landroid/content/DialogInterface$OnShowListener;

    .line 336
    iget-object v0, p1, Landroid/app/NotificationManagerPlus$Parameters;->mContext:Landroid/content/Context;

    if-nez v0, :cond_0

    .line 337
    new-instance v0, Ljava/lang/NullPointerException;

    const-string v1, "context not allowed null!"

    invoke-direct {v0, v1}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V

    throw v0

    .line 339
    :cond_0
    iput-object p1, p0, Landroid/app/NotificationManagerPlus;->mParams:Landroid/app/NotificationManagerPlus$Parameters;

    .line 340
    new-instance v0, Landroid/content/IntentFilter;

    invoke-direct {v0}, Landroid/content/IntentFilter;-><init>()V

    iput-object v0, p0, Landroid/app/NotificationManagerPlus;->mFilter:Landroid/content/IntentFilter;

    .line 341
    iget-object v0, p0, Landroid/app/NotificationManagerPlus;->mFilter:Landroid/content/IntentFilter;

    const-string v1, "mediatek.intent.action.FULL_SCRENN_NOTIFY"

    invoke-virtual {v0, v1}, Landroid/content/IntentFilter;->addAction(Ljava/lang/String;)V

    .line 342
    iget-object v0, p0, Landroid/app/NotificationManagerPlus;->mFilter:Landroid/content/IntentFilter;

    const-string v1, "android.intent.category.DEFAULT"

    invoke-virtual {v0, v1}, Landroid/content/IntentFilter;->addCategory(Ljava/lang/String;)V

    .line 343
    return-void
.end method

.method synthetic constructor <init>(Landroid/app/NotificationManagerPlus$Parameters;Landroid/app/NotificationManagerPlus$1;)V
    .locals 0
    .parameter "x0"
    .parameter "x1"

    .prologue
    .line 63
    invoke-direct {p0, p1}, Landroid/app/NotificationManagerPlus;-><init>(Landroid/app/NotificationManagerPlus$Parameters;)V

    return-void
.end method

.method static synthetic access$000(Landroid/app/NotificationManagerPlus;Landroid/os/Bundle;)V
    .locals 0
    .parameter "x0"
    .parameter "x1"

    .prologue
    .line 63
    invoke-direct {p0, p1}, Landroid/app/NotificationManagerPlus;->resolve(Landroid/os/Bundle;)V

    return-void
.end method

.method static synthetic access$100(Landroid/app/NotificationManagerPlus;)Z
    .locals 1
    .parameter "x0"

    .prologue
    .line 63
    iget-boolean v0, p0, Landroid/app/NotificationManagerPlus;->mSend:Z

    return v0
.end method

.method static synthetic access$200(Landroid/app/NotificationManagerPlus;)Landroid/os/Handler;
    .locals 1
    .parameter "x0"

    .prologue
    .line 63
    iget-object v0, p0, Landroid/app/NotificationManagerPlus;->mHandler:Landroid/os/Handler;

    return-object v0
.end method

.method static synthetic access$300(Landroid/app/NotificationManagerPlus;)Ljava/util/ArrayList;
    .locals 1
    .parameter "x0"

    .prologue
    .line 63
    iget-object v0, p0, Landroid/app/NotificationManagerPlus;->mList:Ljava/util/ArrayList;

    return-object v0
.end method

.method static synthetic access$400(Landroid/app/NotificationManagerPlus;)Landroid/app/NotificationManagerPlus$Parameters;
    .locals 1
    .parameter "x0"

    .prologue
    .line 63
    iget-object v0, p0, Landroid/app/NotificationManagerPlus;->mParams:Landroid/app/NotificationManagerPlus$Parameters;

    return-object v0
.end method

.method private buildOnCancelListener(Landroid/app/PendingIntent;)Landroid/content/DialogInterface$OnCancelListener;
    .locals 1
    .parameter "pending"

    .prologue
    .line 261
    if-nez p1, :cond_0

    .line 262
    const/4 v0, 0x0

    .line 264
    :goto_0
    return-object v0

    :cond_0
    new-instance v0, Landroid/app/NotificationManagerPlus$3;

    invoke-direct {v0, p0, p1}, Landroid/app/NotificationManagerPlus$3;-><init>(Landroid/app/NotificationManagerPlus;Landroid/app/PendingIntent;)V

    goto :goto_0
.end method

.method private buildOnClickListenr(Landroid/app/PendingIntent;)Landroid/content/DialogInterface$OnClickListener;
    .locals 1
    .parameter "pending"

    .prologue
    .line 242
    if-nez p1, :cond_0

    .line 243
    const/4 v0, 0x0

    .line 245
    :goto_0
    return-object v0

    :cond_0
    new-instance v0, Landroid/app/NotificationManagerPlus$2;

    invoke-direct {v0, p0, p1}, Landroid/app/NotificationManagerPlus$2;-><init>(Landroid/app/NotificationManagerPlus;Landroid/app/PendingIntent;)V

    goto :goto_0
.end method

.method public static cancel(Landroid/content/Context;I)V
    .locals 2
    .parameter "context"
    .parameter "id"

    .prologue
    .line 470
    new-instance v0, Landroid/app/NotificationPlus;

    invoke-direct {v0, p0}, Landroid/app/NotificationPlus;-><init>(Landroid/content/Context;)V

    .line 471
    .local v0, notification:Landroid/app/NotificationPlus;
    invoke-virtual {v0, p1}, Landroid/app/NotificationPlus;->setId(I)V

    .line 472
    const/4 v1, 0x2

    invoke-virtual {v0, v1}, Landroid/app/NotificationPlus;->setType(I)V

    .line 473
    invoke-virtual {v0}, Landroid/app/NotificationPlus;->send()V

    .line 474
    return-void
.end method

.method public static cancelAll(Landroid/content/Context;)V
    .locals 2
    .parameter "context"

    .prologue
    .line 482
    new-instance v0, Landroid/app/NotificationPlus;

    invoke-direct {v0, p0}, Landroid/app/NotificationPlus;-><init>(Landroid/content/Context;)V

    .line 483
    .local v0, notification:Landroid/app/NotificationPlus;
    const/4 v1, 0x2

    invoke-virtual {v0, v1}, Landroid/app/NotificationPlus;->setType(I)V

    .line 484
    invoke-virtual {v0}, Landroid/app/NotificationPlus;->send()V

    .line 485
    return-void
.end method

.method public static notify(ILandroid/app/NotificationPlus;)V
    .locals 1
    .parameter "id"
    .parameter "notification"

    .prologue
    .line 458
    invoke-virtual {p1, p0}, Landroid/app/NotificationPlus;->setId(I)V

    .line 459
    const/4 v0, 0x1

    invoke-virtual {p1, v0}, Landroid/app/NotificationPlus;->setType(I)V

    .line 460
    invoke-virtual {p1}, Landroid/app/NotificationPlus;->send()V

    .line 461
    return-void
.end method

.method private resolve(Landroid/os/Bundle;)V
    .locals 17
    .parameter "extra"

    .prologue
    .line 97
    const-string v14, "mediatek.intent.extra.package"

    move-object/from16 v0, p1

    invoke-virtual {v0, v14}, Landroid/os/Bundle;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v10

    .line 98
    .local v10, packageName:Ljava/lang/String;
    const-string v14, "mediatek.intent.extra.type"

    const/4 v15, -0x1

    move-object/from16 v0, p1

    invoke-virtual {v0, v14, v15}, Landroid/os/Bundle;->getInt(Ljava/lang/String;I)I

    move-result v13

    .line 100
    .local v13, type:I
    const-string v14, "NotificationManangerPlus"

    new-instance v15, Ljava/lang/StringBuilder;

    invoke-direct {v15}, Ljava/lang/StringBuilder;-><init>()V

    const-string v16, "resolve("

    invoke-virtual/range {v15 .. v16}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v15

    move-object/from16 v0, p1

    invoke-virtual {v15, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    move-result-object v15

    const-string v16, ") packageName="

    invoke-virtual/range {v15 .. v16}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v15

    invoke-virtual {v15, v10}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v15

    const-string v16, ", type="

    invoke-virtual/range {v15 .. v16}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v15

    invoke-virtual {v15, v13}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v15

    invoke-virtual {v15}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v15

    invoke-static {v14, v15}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I

    .line 102
    if-eqz v10, :cond_0

    const/4 v14, 0x1

    if-eq v13, v14, :cond_1

    const/4 v14, 0x2

    if-eq v13, v14, :cond_1

    .line 215
    :cond_0
    :goto_0
    return-void

    .line 106
    :cond_1
    const-string v14, "mediatek.intent.extra.id"

    move-object/from16 v0, p1

    invoke-virtual {v0, v14}, Landroid/os/Bundle;->containsKey(Ljava/lang/String;)Z

    move-result v4

    .line 107
    .local v4, hasId:Z
    const/4 v5, -0x1

    .line 108
    .local v5, id:I
    if-eqz v4, :cond_2

    .line 109
    const-string v14, "mediatek.intent.extra.id"

    move-object/from16 v0, p1

    invoke-virtual {v0, v14}, Landroid/os/Bundle;->getInt(Ljava/lang/String;)I

    move-result v5

    .line 111
    :cond_2
    const/4 v14, 0x2

    if-ne v13, v14, :cond_7

    .line 112
    if-eqz v4, :cond_5

    .line 114
    move-object/from16 v0, p0

    iget-object v15, v0, Landroid/app/NotificationManagerPlus;->mList:Ljava/util/ArrayList;

    monitor-enter v15

    .line 115
    :try_start_0
    move-object/from16 v0, p0

    iget-object v14, v0, Landroid/app/NotificationManagerPlus;->mList:Ljava/util/ArrayList;

    invoke-virtual {v14}, Ljava/util/ArrayList;->iterator()Ljava/util/Iterator;

    move-result-object v6

    .local v6, iter:Ljava/util/Iterator;,"Ljava/util/Iterator<Landroid/app/NotificationManagerPlus$DialogPlus;>;"
    :cond_3
    invoke-interface {v6}, Ljava/util/Iterator;->hasNext()Z

    move-result v14

    if-eqz v14, :cond_4

    .line 116
    invoke-interface {v6}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Landroid/app/NotificationManagerPlus$DialogPlus;

    .line 117
    .local v2, dialog:Landroid/app/NotificationManagerPlus$DialogPlus;
    move-object/from16 v0, p0

    invoke-virtual {v0, v2, v10, v5}, Landroid/app/NotificationManagerPlus;->equals(Landroid/app/NotificationManagerPlus$DialogPlus;Ljava/lang/String;I)Z

    move-result v14

    if-eqz v14, :cond_3

    .line 118
    invoke-interface {v6}, Ljava/util/Iterator;->remove()V

    .line 119
    invoke-virtual {v2}, Landroid/app/Dialog;->cancel()V

    .line 123
    .end local v2           #dialog:Landroid/app/NotificationManagerPlus$DialogPlus;
    :cond_4
    monitor-exit v15

    goto :goto_0

    .end local v6           #iter:Ljava/util/Iterator;,"Ljava/util/Iterator<Landroid/app/NotificationManagerPlus$DialogPlus;>;"
    :catchall_0
    move-exception v14

    monitor-exit v15
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    throw v14

    .line 126
    :cond_5
    move-object/from16 v0, p0

    iget-object v14, v0, Landroid/app/NotificationManagerPlus;->mList:Ljava/util/ArrayList;

    invoke-virtual {v14}, Ljava/util/ArrayList;->iterator()Ljava/util/Iterator;

    move-result-object v6

    .restart local v6       #iter:Ljava/util/Iterator;,"Ljava/util/Iterator<Landroid/app/NotificationManagerPlus$DialogPlus;>;"
    :cond_6
    invoke-interface {v6}, Ljava/util/Iterator;->hasNext()Z

    move-result v14

    if-eqz v14, :cond_0

    .line 127
    invoke-interface {v6}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Landroid/app/NotificationManagerPlus$DialogPlus;

    .line 128
    .restart local v2       #dialog:Landroid/app/NotificationManagerPlus$DialogPlus;
    move-object/from16 v0, p0

    invoke-virtual {v0, v2, v10}, Landroid/app/NotificationManagerPlus;->equals(Landroid/app/NotificationManagerPlus$DialogPlus;Ljava/lang/String;)Z

    move-result v14

    if-eqz v14, :cond_6

    .line 129
    invoke-interface {v6}, Ljava/util/Iterator;->remove()V

    .line 130
    invoke-virtual {v2}, Landroid/app/Dialog;->cancel()V

    goto :goto_0

    .line 137
    .end local v2           #dialog:Landroid/app/NotificationManagerPlus$DialogPlus;
    .end local v6           #iter:Ljava/util/Iterator;,"Ljava/util/Iterator<Landroid/app/NotificationManagerPlus$DialogPlus;>;"
    :cond_7
    const/4 v3, 0x0

    .line 138
    .local v3, find:Landroid/app/NotificationManagerPlus$DialogPlus;
    if-nez v4, :cond_8

    .line 139
    const-string v14, "NotificationManangerPlus"

    new-instance v15, Ljava/lang/StringBuilder;

    invoke-direct {v15}, Ljava/lang/StringBuilder;-><init>()V

    const-string v16, "resolve("

    invoke-virtual/range {v15 .. v16}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v15

    move-object/from16 v0, p1

    invoke-virtual {v15, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    move-result-object v15

    const-string v16, ") type=notify, but no id!"

    invoke-virtual/range {v15 .. v16}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v15

    invoke-virtual {v15}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v15

    invoke-static {v14, v15}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I

    goto/16 :goto_0

    .line 142
    :cond_8
    move-object/from16 v0, p0

    iget-object v14, v0, Landroid/app/NotificationManagerPlus;->mList:Ljava/util/ArrayList;

    invoke-virtual {v14}, Ljava/util/ArrayList;->iterator()Ljava/util/Iterator;

    move-result-object v6

    .restart local v6       #iter:Ljava/util/Iterator;,"Ljava/util/Iterator<Landroid/app/NotificationManagerPlus$DialogPlus;>;"
    :cond_9
    invoke-interface {v6}, Ljava/util/Iterator;->hasNext()Z

    move-result v14

    if-eqz v14, :cond_a

    .line 143
    invoke-interface {v6}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v12

    check-cast v12, Landroid/app/NotificationManagerPlus$DialogPlus;

    .line 144
    .local v12, temp:Landroid/app/NotificationManagerPlus$DialogPlus;
    move-object/from16 v0, p0

    invoke-virtual {v0, v12, v10, v5}, Landroid/app/NotificationManagerPlus;->equals(Landroid/app/NotificationManagerPlus$DialogPlus;Ljava/lang/String;I)Z

    move-result v14

    if-eqz v14, :cond_9

    .line 145
    move-object v3, v12

    .line 150
    .end local v12           #temp:Landroid/app/NotificationManagerPlus$DialogPlus;
    :cond_a
    new-instance v9, Landroid/app/NotificationManagerPlus$DialogPlus;

    move-object/from16 v0, p0

    iget-object v14, v0, Landroid/app/NotificationManagerPlus;->mParams:Landroid/app/NotificationManagerPlus$Parameters;

    iget-object v14, v14, Landroid/app/NotificationManagerPlus$Parameters;->mContext:Landroid/content/Context;

    invoke-direct {v9, v14}, Landroid/app/NotificationManagerPlus$DialogPlus;-><init>(Landroid/content/Context;)V

    .line 151
    .local v9, newDialog:Landroid/app/NotificationManagerPlus$DialogPlus;
    invoke-virtual {v9, v10}, Landroid/app/NotificationManagerPlus$DialogPlus;->setPackageName(Ljava/lang/String;)V

    .line 152
    invoke-virtual {v9, v5}, Landroid/app/NotificationManagerPlus$DialogPlus;->setId(I)V

    .line 153
    const-string v14, "mediatek.intent.extra.content.title"

    move-object/from16 v0, p1

    invoke-virtual {v0, v14}, Landroid/os/Bundle;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v14

    invoke-virtual {v9, v14}, Landroid/app/AlertDialog;->setTitle(Ljava/lang/CharSequence;)V

    .line 154
    const-string v14, "mediatek.intent.extra.content.text"

    move-object/from16 v0, p1

    invoke-virtual {v0, v14}, Landroid/os/Bundle;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v14

    invoke-virtual {v9, v14}, Landroid/app/AlertDialog;->setMessage(Ljava/lang/CharSequence;)V

    .line 155
    move-object/from16 v0, p0

    iget-object v14, v0, Landroid/app/NotificationManagerPlus;->mParams:Landroid/app/NotificationManagerPlus$Parameters;

    iget-boolean v14, v14, Landroid/app/NotificationManagerPlus$Parameters;->mPositiveButtonHandled:Z

    if-eqz v14, :cond_10

    .line 157
    const/4 v14, -0x1

    move-object/from16 v0, p0

    iget-object v15, v0, Landroid/app/NotificationManagerPlus;->mParams:Landroid/app/NotificationManagerPlus$Parameters;

    iget-object v15, v15, Landroid/app/NotificationManagerPlus$Parameters;->mPositiveButtonText:Ljava/lang/CharSequence;

    move-object/from16 v0, p0

    iget-object v0, v0, Landroid/app/NotificationManagerPlus;->mParams:Landroid/app/NotificationManagerPlus$Parameters;

    move-object/from16 v16, v0

    move-object/from16 v0, v16

    iget-object v0, v0, Landroid/app/NotificationManagerPlus$Parameters;->mPositiveButtonListener:Landroid/content/DialogInterface$OnClickListener;

    move-object/from16 v16, v0

    move-object/from16 v0, v16

    invoke-virtual {v9, v14, v15, v0}, Landroid/app/AlertDialog;->setButton(ILjava/lang/CharSequence;Landroid/content/DialogInterface$OnClickListener;)V

    .line 166
    :cond_b
    :goto_1
    move-object/from16 v0, p0

    iget-object v14, v0, Landroid/app/NotificationManagerPlus;->mParams:Landroid/app/NotificationManagerPlus$Parameters;

    iget-boolean v14, v14, Landroid/app/NotificationManagerPlus$Parameters;->mNeutralButtonHandled:Z

    if-eqz v14, :cond_11

    .line 168
    const/4 v14, -0x3

    move-object/from16 v0, p0

    iget-object v15, v0, Landroid/app/NotificationManagerPlus;->mParams:Landroid/app/NotificationManagerPlus$Parameters;

    iget-object v15, v15, Landroid/app/NotificationManagerPlus$Parameters;->mNeutralButtonText:Ljava/lang/CharSequence;

    move-object/from16 v0, p0

    iget-object v0, v0, Landroid/app/NotificationManagerPlus;->mParams:Landroid/app/NotificationManagerPlus$Parameters;

    move-object/from16 v16, v0

    move-object/from16 v0, v16

    iget-object v0, v0, Landroid/app/NotificationManagerPlus$Parameters;->mNeutralButtonListener:Landroid/content/DialogInterface$OnClickListener;

    move-object/from16 v16, v0

    move-object/from16 v0, v16

    invoke-virtual {v9, v14, v15, v0}, Landroid/app/AlertDialog;->setButton(ILjava/lang/CharSequence;Landroid/content/DialogInterface$OnClickListener;)V

    .line 177
    :cond_c
    :goto_2
    move-object/from16 v0, p0

    iget-object v14, v0, Landroid/app/NotificationManagerPlus;->mParams:Landroid/app/NotificationManagerPlus$Parameters;

    iget-boolean v14, v14, Landroid/app/NotificationManagerPlus$Parameters;->mNegativeButtonHandled:Z

    if-eqz v14, :cond_12

    .line 179
    const/4 v14, -0x2

    move-object/from16 v0, p0

    iget-object v15, v0, Landroid/app/NotificationManagerPlus;->mParams:Landroid/app/NotificationManagerPlus$Parameters;

    iget-object v15, v15, Landroid/app/NotificationManagerPlus$Parameters;->mNegativeButtonText:Ljava/lang/CharSequence;

    move-object/from16 v0, p0

    iget-object v0, v0, Landroid/app/NotificationManagerPlus;->mParams:Landroid/app/NotificationManagerPlus$Parameters;

    move-object/from16 v16, v0

    move-object/from16 v0, v16

    iget-object v0, v0, Landroid/app/NotificationManagerPlus$Parameters;->mNegativeButtonListener:Landroid/content/DialogInterface$OnClickListener;

    move-object/from16 v16, v0

    move-object/from16 v0, v16

    invoke-virtual {v9, v14, v15, v0}, Landroid/app/AlertDialog;->setButton(ILjava/lang/CharSequence;Landroid/content/DialogInterface$OnClickListener;)V

    .line 188
    :cond_d
    :goto_3
    move-object/from16 v0, p0

    iget-object v14, v0, Landroid/app/NotificationManagerPlus;->mParams:Landroid/app/NotificationManagerPlus$Parameters;

    iget-boolean v14, v14, Landroid/app/NotificationManagerPlus$Parameters;->mCancelable:Z

    if-eqz v14, :cond_e

    .line 190
    move-object/from16 v0, p0

    iget-object v14, v0, Landroid/app/NotificationManagerPlus;->mParams:Landroid/app/NotificationManagerPlus$Parameters;

    iget-boolean v14, v14, Landroid/app/NotificationManagerPlus$Parameters;->mCancelHandled:Z

    if-eqz v14, :cond_13

    .line 192
    move-object/from16 v0, p0

    iget-object v14, v0, Landroid/app/NotificationManagerPlus;->mParams:Landroid/app/NotificationManagerPlus$Parameters;

    iget-object v14, v14, Landroid/app/NotificationManagerPlus$Parameters;->mOnCancelListener:Landroid/content/DialogInterface$OnCancelListener;

    invoke-virtual {v9, v14}, Landroid/app/Dialog;->setOnCancelListener(Landroid/content/DialogInterface$OnCancelListener;)V

    .line 206
    :cond_e
    :goto_4
    move-object/from16 v0, p0

    iget-object v14, v0, Landroid/app/NotificationManagerPlus;->mOnDismissListener:Landroid/content/DialogInterface$OnDismissListener;

    invoke-virtual {v9, v14}, Landroid/app/Dialog;->setOnDismissListener(Landroid/content/DialogInterface$OnDismissListener;)V

    .line 207
    move-object/from16 v0, p0

    iget-object v14, v0, Landroid/app/NotificationManagerPlus;->mOnShowListener:Landroid/content/DialogInterface$OnShowListener;

    invoke-virtual {v9, v14}, Landroid/app/Dialog;->setOnShowListener(Landroid/content/DialogInterface$OnShowListener;)V

    .line 208
    invoke-virtual {v9}, Landroid/app/Dialog;->show()V

    .line 209
    if-eqz v3, :cond_f

    .line 210
    invoke-virtual {v3}, Landroid/app/Dialog;->dismiss()V

    .line 213
    :cond_f
    const-string v14, "NotificationManangerPlus"

    new-instance v15, Ljava/lang/StringBuilder;

    invoke-direct {v15}, Ljava/lang/StringBuilder;-><init>()V

    const-string v16, "resolve("

    invoke-virtual/range {v15 .. v16}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v15

    move-object/from16 v0, p1

    invoke-virtual {v15, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    move-result-object v15

    const-string v16, ") find="

    invoke-virtual/range {v15 .. v16}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v15

    invoke-virtual {v15, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    move-result-object v15

    invoke-virtual {v15}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v15

    invoke-static {v14, v15}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I

    goto/16 :goto_0

    .line 159
    :cond_10
    const-string v14, "mediatek.intent.extra.button.name.positive"

    move-object/from16 v0, p1

    invoke-virtual {v0, v14}, Landroid/os/Bundle;->containsKey(Ljava/lang/String;)Z

    move-result v14

    if-eqz v14, :cond_b

    .line 160
    const-string v14, "mediatek.intent.extra.button.intent.positive"

    move-object/from16 v0, p1

    invoke-virtual {v0, v14}, Landroid/os/Bundle;->getParcelable(Ljava/lang/String;)Landroid/os/Parcelable;

    move-result-object v11

    check-cast v11, Landroid/app/PendingIntent;

    .line 162
    .local v11, positive:Landroid/app/PendingIntent;
    const/4 v14, -0x1

    const-string v15, "mediatek.intent.extra.button.name.positive"

    move-object/from16 v0, p1

    invoke-virtual {v0, v15}, Landroid/os/Bundle;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v15

    move-object/from16 v0, p0

    invoke-direct {v0, v11}, Landroid/app/NotificationManagerPlus;->buildOnClickListenr(Landroid/app/PendingIntent;)Landroid/content/DialogInterface$OnClickListener;

    move-result-object v16

    move-object/from16 v0, v16

    invoke-virtual {v9, v14, v15, v0}, Landroid/app/AlertDialog;->setButton(ILjava/lang/CharSequence;Landroid/content/DialogInterface$OnClickListener;)V

    goto/16 :goto_1

    .line 170
    .end local v11           #positive:Landroid/app/PendingIntent;
    :cond_11
    const-string v14, "mediatek.intent.extra.button.name.neutral"

    move-object/from16 v0, p1

    invoke-virtual {v0, v14}, Landroid/os/Bundle;->containsKey(Ljava/lang/String;)Z

    move-result v14

    if-eqz v14, :cond_c

    .line 171
    const-string v14, "mediatek.intent.extra.button.intent.neutral"

    move-object/from16 v0, p1

    invoke-virtual {v0, v14}, Landroid/os/Bundle;->getParcelable(Ljava/lang/String;)Landroid/os/Parcelable;

    move-result-object v8

    check-cast v8, Landroid/app/PendingIntent;

    .line 173
    .local v8, neutral:Landroid/app/PendingIntent;
    const/4 v14, -0x3

    const-string v15, "mediatek.intent.extra.button.name.neutral"

    move-object/from16 v0, p1

    invoke-virtual {v0, v15}, Landroid/os/Bundle;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v15

    move-object/from16 v0, p0

    invoke-direct {v0, v8}, Landroid/app/NotificationManagerPlus;->buildOnClickListenr(Landroid/app/PendingIntent;)Landroid/content/DialogInterface$OnClickListener;

    move-result-object v16

    move-object/from16 v0, v16

    invoke-virtual {v9, v14, v15, v0}, Landroid/app/AlertDialog;->setButton(ILjava/lang/CharSequence;Landroid/content/DialogInterface$OnClickListener;)V

    goto/16 :goto_2

    .line 181
    .end local v8           #neutral:Landroid/app/PendingIntent;
    :cond_12
    const-string v14, "mediatek.intent.extra.button.name.negative"

    move-object/from16 v0, p1

    invoke-virtual {v0, v14}, Landroid/os/Bundle;->containsKey(Ljava/lang/String;)Z

    move-result v14

    if-eqz v14, :cond_d

    .line 182
    const-string v14, "mediatek.intent.extra.button.intent.negative"

    move-object/from16 v0, p1

    invoke-virtual {v0, v14}, Landroid/os/Bundle;->getParcelable(Ljava/lang/String;)Landroid/os/Parcelable;

    move-result-object v7

    check-cast v7, Landroid/app/PendingIntent;

    .line 184
    .local v7, negative:Landroid/app/PendingIntent;
    const/4 v14, -0x2

    const-string v15, "mediatek.intent.extra.button.name.negative"

    move-object/from16 v0, p1

    invoke-virtual {v0, v15}, Landroid/os/Bundle;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v15

    move-object/from16 v0, p0

    invoke-direct {v0, v7}, Landroid/app/NotificationManagerPlus;->buildOnClickListenr(Landroid/app/PendingIntent;)Landroid/content/DialogInterface$OnClickListener;

    move-result-object v16

    move-object/from16 v0, v16

    invoke-virtual {v9, v14, v15, v0}, Landroid/app/AlertDialog;->setButton(ILjava/lang/CharSequence;Landroid/content/DialogInterface$OnClickListener;)V

    goto/16 :goto_3

    .line 194
    .end local v7           #negative:Landroid/app/PendingIntent;
    :cond_13
    const-string v14, "mediatek.intent.extra.cancel.enable"

    move-object/from16 v0, p1

    invoke-virtual {v0, v14}, Landroid/os/Bundle;->containsKey(Ljava/lang/String;)Z

    move-result v14

    if-eqz v14, :cond_14

    .line 196
    move-object/from16 v0, p0

    iget-object v14, v0, Landroid/app/NotificationManagerPlus;->mParams:Landroid/app/NotificationManagerPlus$Parameters;

    const-string v15, "mediatek.intent.extra.cancel.enable"

    move-object/from16 v0, p1

    invoke-virtual {v0, v15}, Landroid/os/Bundle;->getBoolean(Ljava/lang/String;)Z

    move-result v15

    iput-boolean v15, v14, Landroid/app/NotificationManagerPlus$Parameters;->mCancelable:Z

    .line 199
    :cond_14
    move-object/from16 v0, p0

    iget-object v14, v0, Landroid/app/NotificationManagerPlus;->mParams:Landroid/app/NotificationManagerPlus$Parameters;

    iget-boolean v14, v14, Landroid/app/NotificationManagerPlus$Parameters;->mCancelable:Z

    if-eqz v14, :cond_e

    .line 200
    const-string v14, "mediatek.intent.extra.cancel.intent"

    move-object/from16 v0, p1

    invoke-virtual {v0, v14}, Landroid/os/Bundle;->getParcelable(Ljava/lang/String;)Landroid/os/Parcelable;

    move-result-object v1

    check-cast v1, Landroid/app/PendingIntent;

    .line 202
    .local v1, cancel:Landroid/app/PendingIntent;
    move-object/from16 v0, p0

    invoke-direct {v0, v1}, Landroid/app/NotificationManagerPlus;->buildOnCancelListener(Landroid/app/PendingIntent;)Landroid/content/DialogInterface$OnCancelListener;

    move-result-object v14

    invoke-virtual {v9, v14}, Landroid/app/Dialog;->setOnCancelListener(Landroid/content/DialogInterface$OnCancelListener;)V

    goto/16 :goto_4
.end method

# virtual methods
.method public cancelAll()V
    .locals 1

    .prologue
    .line 398
    const/4 v0, 0x1

    invoke-virtual {p0, v0}, Landroid/app/NotificationManagerPlus;->cancelAll(Z)V

    .line 399
    return-void
.end method

.method public cancelAll(Z)V
    .locals 5
    .parameter "ignoreAction"

    .prologue
    .line 409
    const-string v2, "NotificationManangerPlus"

    new-instance v3, Ljava/lang/StringBuilder;

    invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V

    const-string v4, "cancelAll("

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3, p1}, Ljava/lang/StringBuilder;->append(Z)Ljava/lang/StringBuilder;

    move-result-object v3

    const-string v4, ") size="

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    iget-object v4, p0, Landroid/app/NotificationManagerPlus;->mList:Ljava/util/ArrayList;

    invoke-virtual {v4}, Ljava/util/ArrayList;->size()I

    move-result v4

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    invoke-static {v2, v3}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I

    .line 411
    iget-object v3, p0, Landroid/app/NotificationManagerPlus;->mList:Ljava/util/ArrayList;

    monitor-enter v3

    .line 412
    :try_start_0
    iget-object v2, p0, Landroid/app/NotificationManagerPlus;->mList:Ljava/util/ArrayList;

    invoke-virtual {v2}, Ljava/util/ArrayList;->iterator()Ljava/util/Iterator;

    move-result-object v1

    .local v1, i$:Ljava/util/Iterator;
    :cond_0
    :goto_0
    invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z

    move-result v2

    if-eqz v2, :cond_1

    invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/app/NotificationManagerPlus$DialogPlus;

    .line 413
    .local v0, dialog:Landroid/app/Dialog;
    invoke-virtual {v0}, Landroid/app/Dialog;->isShowing()Z

    move-result v2

    if-eqz v2, :cond_0

    .line 414
    invoke-virtual {v0}, Landroid/app/Dialog;->cancel()V

    goto :goto_0

    .line 420
    .end local v0           #dialog:Landroid/app/Dialog;
    .end local v1           #i$:Ljava/util/Iterator;
    :catchall_0
    move-exception v2

    monitor-exit v3
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    throw v2

    .line 417
    .restart local v1       #i$:Ljava/util/Iterator;
    :cond_1
    if-eqz p1, :cond_2

    .line 418
    :try_start_1
    iget-object v2, p0, Landroid/app/NotificationManagerPlus;->mList:Ljava/util/ArrayList;

    invoke-virtual {v2}, Ljava/util/ArrayList;->clear()V

    .line 420
    :cond_2
    monitor-exit v3
    :try_end_1
    .catchall {:try_start_1 .. :try_end_1} :catchall_0

    .line 421
    return-void
.end method

.method public clearAll()V
    .locals 1

    .prologue
    .line 427
    const/4 v0, 0x1

    invoke-virtual {p0, v0}, Landroid/app/NotificationManagerPlus;->clearAll(Z)V

    .line 428
    return-void
.end method

.method public clearAll(Z)V
    .locals 5
    .parameter "ignoreAction"

    .prologue
    .line 438
    const-string v2, "NotificationManangerPlus"

    new-instance v3, Ljava/lang/StringBuilder;

    invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V

    const-string v4, "clearAll("

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3, p1}, Ljava/lang/StringBuilder;->append(Z)Ljava/lang/StringBuilder;

    move-result-object v3

    const-string v4, ") size="

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    iget-object v4, p0, Landroid/app/NotificationManagerPlus;->mList:Ljava/util/ArrayList;

    invoke-virtual {v4}, Ljava/util/ArrayList;->size()I

    move-result v4

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    invoke-static {v2, v3}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I

    .line 440
    iget-object v3, p0, Landroid/app/NotificationManagerPlus;->mList:Ljava/util/ArrayList;

    monitor-enter v3

    .line 441
    :try_start_0
    iget-object v2, p0, Landroid/app/NotificationManagerPlus;->mList:Ljava/util/ArrayList;

    invoke-virtual {v2}, Ljava/util/ArrayList;->iterator()Ljava/util/Iterator;

    move-result-object v1

    .local v1, i$:Ljava/util/Iterator;
    :cond_0
    :goto_0
    invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z

    move-result v2

    if-eqz v2, :cond_1

    invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/app/NotificationManagerPlus$DialogPlus;

    .line 442
    .local v0, dialog:Landroid/app/Dialog;
    invoke-virtual {v0}, Landroid/app/Dialog;->isShowing()Z

    move-result v2

    if-eqz v2, :cond_0

    .line 443
    invoke-virtual {v0}, Landroid/app/Dialog;->dismiss()V

    goto :goto_0

    .line 449
    .end local v0           #dialog:Landroid/app/Dialog;
    .end local v1           #i$:Ljava/util/Iterator;
    :catchall_0
    move-exception v2

    monitor-exit v3
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    throw v2

    .line 446
    .restart local v1       #i$:Ljava/util/Iterator;
    :cond_1
    if-eqz p1, :cond_2

    .line 447
    :try_start_1
    iget-object v2, p0, Landroid/app/NotificationManagerPlus;->mList:Ljava/util/ArrayList;

    invoke-virtual {v2}, Ljava/util/ArrayList;->clear()V

    .line 449
    :cond_2
    monitor-exit v3
    :try_end_1
    .catchall {:try_start_1 .. :try_end_1} :catchall_0

    .line 450
    return-void
.end method

.method public equals(Landroid/app/NotificationManagerPlus$DialogPlus;Ljava/lang/String;)Z
    .locals 2
    .parameter "cmp"
    .parameter "packageName"

    .prologue
    .line 231
    const/4 v0, 0x0

    .line 232
    .local v0, result:Z
    if-nez p2, :cond_1

    iget-object v1, p1, Landroid/app/NotificationManagerPlus$DialogPlus;->mPackageName:Ljava/lang/String;

    if-nez v1, :cond_1

    .line 233
    const/4 v0, 0x1

    .line 238
    :cond_0
    :goto_0
    return v0

    .line 234
    :cond_1
    if-eqz p2, :cond_0

    iget-object v1, p1, Landroid/app/NotificationManagerPlus$DialogPlus;->mPackageName:Ljava/lang/String;

    if-eqz v1, :cond_0

    iget-object v1, p1, Landroid/app/NotificationManagerPlus$DialogPlus;->mPackageName:Ljava/lang/String;

    invoke-virtual {p2, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v1

    if-eqz v1, :cond_0

    .line 236
    const/4 v0, 0x1

    goto :goto_0
.end method

.method public equals(Landroid/app/NotificationManagerPlus$DialogPlus;Ljava/lang/String;I)Z
    .locals 2
    .parameter "cmp"
    .parameter "packageName"
    .parameter "id"

    .prologue
    .line 218
    const/4 v0, 0x0

    .line 219
    .local v0, result:Z
    iget v1, p1, Landroid/app/NotificationManagerPlus$DialogPlus;->mId:I

    if-ne p3, v1, :cond_0

    .line 220
    if-nez p2, :cond_1

    iget-object v1, p1, Landroid/app/NotificationManagerPlus$DialogPlus;->mPackageName:Ljava/lang/String;

    if-nez v1, :cond_1

    .line 221
    const/4 v0, 0x1

    .line 227
    :cond_0
    :goto_0
    return v0

    .line 222
    :cond_1
    if-eqz p2, :cond_0

    iget-object v1, p1, Landroid/app/NotificationManagerPlus$DialogPlus;->mPackageName:Ljava/lang/String;

    if-eqz v1, :cond_0

    iget-object v1, p1, Landroid/app/NotificationManagerPlus$DialogPlus;->mPackageName:Ljava/lang/String;

    invoke-virtual {p2, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v1

    if-eqz v1, :cond_0

    .line 224
    const/4 v0, 0x1

    goto :goto_0
.end method

.method public pause()V
    .locals 3

    .prologue
    .line 360
    const-string v0, "NotificationManangerPlus"

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "pause() mSend="

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    iget-boolean v2, p0, Landroid/app/NotificationManagerPlus;->mSend:Z

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Z)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-static {v0, v1}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I

    .line 362
    const/4 v0, 0x0

    iput-boolean v0, p0, Landroid/app/NotificationManagerPlus;->mSend:Z

    .line 363
    iget-object v0, p0, Landroid/app/NotificationManagerPlus;->mHandler:Landroid/os/Handler;

    const/4 v1, 0x1

    invoke-virtual {v0, v1}, Landroid/os/Handler;->removeMessages(I)V

    .line 364
    return-void
.end method

.method public resume()V
    .locals 3

    .prologue
    .line 350
    const-string v0, "NotificationManangerPlus"

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "resume() mSend="

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    iget-boolean v2, p0, Landroid/app/NotificationManagerPlus;->mSend:Z

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Z)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-static {v0, v1}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I

    .line 352
    const/4 v0, 0x1

    iput-boolean v0, p0, Landroid/app/NotificationManagerPlus;->mSend:Z

    .line 353
    return-void
.end method

.method public startListening()V
    .locals 3

    .prologue
    .line 371
    const-string v0, "NotificationManangerPlus"

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "startListening() mListening="

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    iget-boolean v2, p0, Landroid/app/NotificationManagerPlus;->mListening:Z

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Z)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-static {v0, v1}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I

    .line 373
    iget-boolean v0, p0, Landroid/app/NotificationManagerPlus;->mListening:Z

    if-nez v0, :cond_0

    .line 374
    iget-object v0, p0, Landroid/app/NotificationManagerPlus;->mParams:Landroid/app/NotificationManagerPlus$Parameters;

    iget-object v0, v0, Landroid/app/NotificationManagerPlus$Parameters;->mContext:Landroid/content/Context;

    iget-object v1, p0, Landroid/app/NotificationManagerPlus;->mReceiver:Landroid/content/BroadcastReceiver;

    iget-object v2, p0, Landroid/app/NotificationManagerPlus;->mFilter:Landroid/content/IntentFilter;

    invoke-virtual {v0, v1, v2}, Landroid/content/Context;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;

    .line 375
    const/4 v0, 0x1

    iput-boolean v0, p0, Landroid/app/NotificationManagerPlus;->mListening:Z

    .line 377
    :cond_0
    return-void
.end method

.method public stopListening()V
    .locals 3

    .prologue
    .line 385
    const-string v0, "NotificationManangerPlus"

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "stopListening() mListening="

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    iget-boolean v2, p0, Landroid/app/NotificationManagerPlus;->mListening:Z

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Z)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-static {v0, v1}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I

    .line 387
    iget-boolean v0, p0, Landroid/app/NotificationManagerPlus;->mListening:Z

    if-eqz v0, :cond_0

    .line 388
    iget-object v0, p0, Landroid/app/NotificationManagerPlus;->mHandler:Landroid/os/Handler;

    const/4 v1, 0x1

    invoke-virtual {v0, v1}, Landroid/os/Handler;->removeMessages(I)V

    .line 389
    iget-object v0, p0, Landroid/app/NotificationManagerPlus;->mParams:Landroid/app/NotificationManagerPlus$Parameters;

    iget-object v0, v0, Landroid/app/NotificationManagerPlus$Parameters;->mContext:Landroid/content/Context;

    iget-object v1, p0, Landroid/app/NotificationManagerPlus;->mReceiver:Landroid/content/BroadcastReceiver;

    invoke-virtual {v0, v1}, Landroid/content/Context;->unregisterReceiver(Landroid/content/BroadcastReceiver;)V

    .line 390
    const/4 v0, 0x0

    iput-boolean v0, p0, Landroid/app/NotificationManagerPlus;->mListening:Z

    .line 392
    :cond_0
    return-void
.end method


text:
using System.Data.SqlClient;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;

namespace Mozlite.Data.SqlServer
{
    /// <summary>
    /// SQLServer数据库。
    /// </summary>
    public class SqlServerDatabase : Database
    {
        /// <summary>
        /// 初始化 <see cref="SqlServerDatabase"/> 类的新实例。
        /// </summary>
        /// <param name="logger">日志接口。</param>
        /// <param name="options">配置选项。</param>
        /// <param name="sqlHelper">SQL辅助接口。</param>
        public SqlServerDatabase(ILogger<SqlServerDatabase> logger, IOptions<DatabaseOptions> options,
            ISqlHelper sqlHelper) : base(logger, SqlClientFactory.Instance, options, sqlHelper)
        {
        }
    }
}


text:
package org.apache.syncope.client.console.rest;

import java.util.List;

public interface TemplateRestClient<T, F> extends RestClient {

    List<T> listTemplates();

    void createTemplate(final T templateTO);

    void deleteTemplate(final String key);

    T readTemplate(final String key);

    String readTemplateFormat(final String key, final F format);

    void updateTemplateFormat(final String key, final String content, final F format);
}


text:
package com.groupon.jenkins.dynamic.organizationcontainer;

import hudson.model.Item;
import hudson.model.TopLevelItem;
import hudson.model.Descriptor.FormException;
import hudson.model.View;

import java.io.IOException;
import java.util.Collection;

import javax.servlet.ServletException;

import org.kohsuke.stapler.StaplerRequest;
import org.kohsuke.stapler.StaplerResponse;
import org.kohsuke.stapler.export.Exported;

public class AllListView extends View {

	private final OrganizationContainer organizationContainer;

	public AllListView(OrganizationContainer organizationContainer) {
		super("All", organizationContainer);
		this.organizationContainer = organizationContainer;
	}

	@SuppressWarnings({ "rawtypes", "unchecked" })
	@Override
	@Exported(name = "jobs")
	public Collection getItems() {
		return organizationContainer.getItems();
	}

	@Override
	public boolean contains(TopLevelItem item) {
		return true;
	}

	@Override
	public void onJobRenamed(Item item, String oldName, String newName) {
		throw new UnsupportedOperationException();
	}

	@Override
	protected void submit(StaplerRequest req) throws IOException, ServletException, FormException {
		throw new UnsupportedOperationException();
	}

	@Override
	public Item doCreateItem(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException {
		throw new UnsupportedOperationException();
	}

}


text:
package org.yy.studyjee6.view;

import javax.enterprise.context.Conversation;
import javax.inject.Inject;

import org.yy.studyjee6.model.BaseEntity;

/**
 * Responsible for loading/creating and keeping hold of an entity instance. This
 * is a minimalist version of the Seam EntityHome class.
 *
 * @author Andy Gibson
 *
 * @param <T>
 *            Type of entity
 */
public abstract class EntityHome<T extends BaseEntity> {

	private Long id;
	private T entity;

	@Inject
	private Conversation conversation;

	/**
	 * Helper init method called on page loads. Calls the
	 * {@link EntityHome#doInit()} method which can be overriden by subclases to
	 * provide further initialization. If the custom initialization failes
	 * (returns false) then we don't proceed with starting the conversation if
	 * requested.
	 *
	 * @param startConversation
	 *            Flag to indicate whether to start the conversion once
	 *            initialized.
	 */
	public void init(boolean startConversation) {
		if (doInit()) {
			if (startConversation && conversation.isTransient()) {
				conversation.begin();
			}
		}
	}

	/**
	 * Override this method to implement your own initialization.
	 *
	 * @return true if initialization was successful
	 */
	protected boolean doInit() {
		return true;
	}

	public boolean isIdAvailable() {
		return id != null;
	}

	/**
	 * Indicates whether this is a new entity or an existing (managed) one. If
	 * there is no Id assigned to the entity then we assume it has not yet been
	 * saved to the database.
	 *
	 * @return true if this entity has already been persisted
	 */
	public boolean isManaged() {

		return getEntity().getId() != null;
	}

	/**
	 * Lazy loads the entity instance using the {@link EntityHome#fetchEntity()}
	 * method.
	 *
	 * @return The entity
	 */
	public T getEntity() {
		if (entity == null) {
			entity = fetchEntity();
		}
		return entity;
	}

	/**
	 * Fetches the entity or creates a new one depending on whether the Id
	 * property is set or not. The {@link EntityHome#doLoadEntity()} and
	 * {@link EntityHome#doCreateEntity()} methods should be overriden in
	 * subclasses to provide those functions.
	 *
	 * @return the entity of type T
	 */
	protected T fetchEntity() {
		if (isIdAvailable()) {
			return doLoadEntity();
		} else {
			return doCreateEntity();
		}
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	/**
	 * Override this method to create and initialize a new entity which is
	 * returned to the called.
	 *
	 * @return The created entity
	 */
	protected abstract T doCreateEntity();

	/**
	 * Override this method to load an entity from a database or other mechanism
	 * and return the entity from this method.
	 *
	 * @return The loaded entity
	 */
	protected abstract T doLoadEntity();

	/**
	 * We provide this getter to for the benefit of subclasses.
	 *
	 * @return The injected conversation instance
	 */
	public Conversation getConversation() {
		return conversation;
	}
}


text:
var gossip = require('secure-gossip')

var peer1 = gossip()
var peer2 = gossip()
var peer3 = gossip()

var p1 = peer1.createPeerStream()
var p2_1 = peer2.createPeerStream()
var p2_2 = peer2.createPeerStream()
var p3 = peer3.createPeerStream()

// 3 peers in a line, with peer-2 in the middle
p1.pipe(p2_1).pipe(p1)
p2_2.pipe(p3).pipe(p2_2)

// have p1 publish, and watch it propogate to p2 and then p3
peer1.publish({
  data: 'hello warld'
})

peer1.on('message', function (msg) {
  console.log('p1 message', msg)
})

peer2.on('message', function (msg) {
  console.log('p2 message', msg)
})

peer3.on('message', function (msg) {
  console.log('p3 message', msg)
})


text:
import sys
import fileinput
from collections import defaultdict
from getopt import getopt, GetoptError

import matplotlib.pyplot as plt
import matplotlib.cm as cm
import numpy as np
import systemlog

try:
    # I am bad at picking single-letter switches, and feel bad
    (options, arguments) = getopt(sys.argv[1:], 'i:s:eturm:',
                                    ['interval', 'scale', 'events', 'events-only', 'show-unknown', 'sort', 'min-size'])
except GetoptError, error:
    sys.stderr.write('%s\n' % str(error))
    sys.exit(1)

# dirty, but I'm not rewriting fileinput.input
sys.argv = [sys.argv[0]]

interval = 3600
scale = 10
allevents = False
eventsonly = False
unknowns = False
sort = False
minsize = 0

for opt, arg in options:
    if opt in ('-i', '--interval'):
        interval = int(arg)
    if opt in ('-s', '--scale'):
        scale = float(arg)
    if opt in ('-e', '--events'):
        allevents = True
    if opt in ('-t', '--events-only'):
        eventsonly = True
    if opt in ('-u', '--show-unknown'):
        unknowns = True
    if opt in ('-r', '--sort'):
        sort = True
    if opt in ('-m', '--min-size'):
        minsize = int(arg)

if arguments:
    log = fileinput.input(arguments[0])
else:
    log = fileinput.input()

stages = defaultdict(int)
enum = 0
data = defaultdict(lambda: defaultdict(int))
for event in systemlog.parse_log(log):
    stage = event['thread_name'] + ' ' + event['source_file']
    if stage[0:3].isupper() or event['thread_name'] == 'main': # skip rmi, handshaking, streams, etc
        continue
    if event['event_type'] == 'unknown' and not unknowns:
        continue
    if event['event_type'] == 'messages_dropped':
        stage = event['message_type'] + ' dropped'
    elif event['event_type'] == 'begin_flush':
        stage = 'flushed bytes (serialized)'
    elif allevents:
        if not eventsonly:
            stage = ' '.join((event['event_category'], event['event_type'], stage))
        else:
            stage = event['event_category'] + ' ' +event['event_type']

    if not stage in stages and not sort:
        stages[stage] = enum
        enum += 1

    ts = int(event['date'].strftime('%s')) / interval
    if event['event_type'] == 'pause':
        data[ts][stage] += event['duration'] / 1000
    elif event['event_type'] == 'messages_dropped':
        if 'internal_timeout' in event and event['internal_timeout'] != None:
            data[ts][stage] += event['internal_timeout'] + event['cross_node_timeout']
        else:
            data[ts][stage] += event['messages_dropped']
    elif event['event_type'] == 'begin_flush' and event['serialized_bytes'] != None:
        data[ts][stage] += (event['serialized_bytes'] / 1024**2 / scale)
    elif event['event_type'] in ('incremental_compaction', 'large_partition'):
        data[ts][stage] += event['partition_size'] / 1024**2 / scale
    elif event['event_type'] == 'begin_compaction':
        data[ts][stage] += len(event['input_sstables'])
    elif event['event_type'] == 'end_compaction':
        data[ts][stage] += event['output_bytes'] / 1024**2 / scale
    else:
        data[ts][stage] += 1

if sort:
    enum = 0
    for stage in reversed(sorted(stages.keys())):
        stages[stage] = enum
        enum += 1
    size=max(stages[stage]*scale, minsize)
fig, ax = plt.subplots()
colors = cm.rainbow(np.linspace(0, 1, len(stages)))
for ts, info in data.iteritems():
    for stage in info.keys():
        size=info[stage]*scale
        ax.scatter(ts, stages[stage], s=size, c=colors[stages[stage]], alpha=0.5)
        if size > 700:
            ax.scatter(ts, stages[stage], s=size*0.01, c='black', alpha=1, marker='_', lw=1)

plt.yticks(stages.values(), stages.keys())

ax.set_xlabel('Time (%s second buckets)' % interval, fontsize=20)
if not eventsonly:
    ax.set_ylabel('Stage', fontsize=20)
else:
    ax.set_ylabel('Event', fontsize=20)

ax.grid(True)

plt.plot()
try:
    fig.tight_layout()
except ValueError: # too many things on the Y axis
    print "Warning, tight layout not possible, too many items on the Y axis"
    fig.subplots_adjust(bottom = 0.2)
    fig.subplots_adjust(top = 1)
    fig.subplots_adjust(right = 1)
    fig.subplots_adjust(left = 0)
plt.subplots_adjust(left=0.21)
plt.show()


text:
module Azure::ARM::EventHub
  module Models
    #
    # The response to the List Consumer Group operation.
    #
    class ConsumerGroupListResult

      include MsRestAzure

      # @return [Array<ConsumerGroupResource>] Result of the List Consumer
      # Group operation.
      attr_accessor :value

      # @return [String] Link to the next set of results. Not empty if Value
      # contains incomplete list of Consumer Group
      attr_accessor :next_link

      # return [Proc] with next page method call.
      attr_accessor :next_method

      #
      # Gets the rest of the items for the request, enabling auto-pagination.
      #
      # @return [Array<ConsumerGroupResource>] operation results.
      #
      def get_all_items
        items = @value
        page = self
        while page.next_link != nil do
          page = page.get_next_page
          items.concat(page.value)
        end
        items
      end

      #
      # Gets the next page of results.
      #
      # @return [ConsumerGroupListResult] with next page content.
      #
      def get_next_page
        response = @next_method.call(@next_link).value! unless @next_method.nil?
        unless response.nil?
          @next_link = response.body.next_link
          @value = response.body.value
          self
        end
      end

      #
      # Mapper for ConsumerGroupListResult class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          required: false,
          serialized_name: 'ConsumerGroupListResult',
          type: {
            name: 'Composite',
            class_name: 'ConsumerGroupListResult',
            model_properties: {
              value: {
                required: false,
                serialized_name: 'value',
                type: {
                  name: 'Sequence',
                  element: {
                      required: false,
                      serialized_name: 'ConsumerGroupResourceElementType',
                      type: {
                        name: 'Composite',
                        class_name: 'ConsumerGroupResource'
                      }
                  }
                }
              },
              next_link: {
                required: false,
                serialized_name: 'nextLink',
                type: {
                  name: 'String'
                }
              }
            }
          }
        }
      end
    end
  end
end


text:
//////////////////////////////////////////////////////////
// QCADesigner                                          //
// Copyright 2002 Konrad Walus                          //
// All Rights Reserved                                  //
// Author: Konrad Walus                                 //
// Email: qcadesigner@gmail.com                         //
// WEB: http://qcadesigner.ca/                          //
//////////////////////////////////////////////////////////
//******************************************************//
//*********** PLEASE DO NOT REFORMAT THIS CODE *********//
//******************************************************//
// If your editor wraps long lines disable it or don't  //
// save the core files that way. Any independent files  //
// you generate format as you wish.                     //
//////////////////////////////////////////////////////////
// Please use complete names in variables and fucntions //
// This will reduce ramp up time for new people trying  //
// to contribute to the project.                        //
//////////////////////////////////////////////////////////
// This file was contributed by Gabriel Schulhof        //
// (schulhof@atips.ca).                                 //
//////////////////////////////////////////////////////////
// Contents:                                            //
//                                                      //
// Header for print preview: Print to a temporary file  //
// and launch a PostScript viewer with the result.      //
//                                                      //
//////////////////////////////////////////////////////////

#ifndef _PRINT_PREVIEW_H_
#define _PRINT_PREVIEW_H_

#include <gtk/gtk.h>
#include "print.h"
void do_print_preview (print_OP *pPrintOp, GtkWindow *parent, void *data, PrintFunction fcnPrint) ;

#endif /* _PRINT_PREVIEW_H_ */


text:
(function() {
  'use strict';
  // Declare app level module which depends on views, and components
angular.module('bettingApp', ['ngRoute', 'angular.filter']);
var betPlaced = false;
})();