text:
layout: post
title: Halsey Minor - CEO BitReserve
author: Halsey Minor
authorurl: http://www.bitcoin.kn/2014/12/btck-115-2014-12-09/
description: Halsey Minor on BitReserve review.
published: true
---

Halsey Minor, CEO BitReserve, an Internet and tech pioneer, Halsey Minor was a key player in the digital publishing revolution. In 1993, he founded CNET Networks, the first comprehensive consumer-facing technology content publisher and one of the most-visited and trusted technology information resources in the world. Halsey led CNET to become a NASDAQ 100 company. CNET was acquired by CBS Corporation in 2008 for $1.8 billion.

In 1997, Halsey spun off technology developed by CNET to Vignette, a web-publishing software company, acquiring a 33% stake in the company. Vignette was one of the most successful IPOs of the first tech boom, reaching a market capitalization of $10.7 billion in 2000. Halsey also provided the seed funding for trailblazing music service Rhapsody in 1998.

In 1999, Halsey invested $19.5 million in Salesforce.com, foreseeing the emerging cloud-computing industry that Salesforce led with its "No Software" slogan. He was Salesforce's second-largest shareholder at the company's 2004 IPO, owning over 10% of the company.

In 2005, Halsey established Minor Ventures, the vehicle through which he founded and funded a string of successful tech startups, including OpenDNS, a web security leader, and Grand Central Communications, one of the world's first web-based telephony companies. In 2007, Halsey sold Grand Central Communications to Google, where it was rebranded as Google Voice.

PODCAST INTERVIEW TRANSCRIPT

Interview with Halsey Minor on BitReserve Review

Trace Mayer:  Hey, welcome back to Bitcoin Knowledge Podcast.  We're at Money 2020, the largest payments conference in the world.  And I have Halsey Minor, founder of BitReserve.org with me.  Welcome to the podcast, Halsey.

Halsey Minor:  Great.  Thanks for having me.

BitReserve Review

Trace Mayer:  Could you give us a little bit of your background to start with.  You founded CNET, right?

Halsey Minor:  Yeah.  I started CNET networks in 1993.  And I ran it until February of 2000.  I started a couple of companies internally it was spun out.  One was a software company called Vignette and another was NBCi.  When I left, we were NASDAQ 100 company and one of two, us and Yahoo during the 90's.

In 1999, I invested a little under $20 million in Salesforce.com and was quite frankly tired from running CNET and excited about Salesforce and so I helped Mark and John Dillon who was the original CEO for Salesforce, built the company for four and a half years.  Also started a company called Grand Central that later became Google Voice and another called OpenDNS.  Then about a year and a half ago, after watching bitcoin for a while around June of last year, I decided to launch BitReserve.

Trace Mayer:  Now, what in the world attracted a pioneer in the whole internet space to bitcoin itself?  And specifically, like what you're doing a little BitReserve and maybe you can explain a little bit about what you're doing with BitReserve also?

Halsey Minor:  Sure.  What I saw immediately in bitcoin was the idea of being able to exchange value in a standards-based way across the internet.  And what attracted me to the internet early on was the ability to exchange information in standards-based way which told me that ultimately the business of publishing would become a very large business if the whole world basically drafted off of a single standard.

And so, what I saw in bitcoin was, again, the sort of formative technology that would allow not just the exchange of information, but really the exchange of value.  I was preoccupied with figuring out how this wonderful innovation could be turned into something that resembled money.  And money has a very specific role on people's lives.  Money is that which our bills come in.  It is that which does not appear to change in value.  It is the safe stuff that we move our investments out of.

And the part about bitcoin that I should have said about trying to understand and hopefully address is the need to own a volatile asset simply to participate in the ecology of bitcoin.  And it was apparent to me and I think it's been proven that the market for people who will hold something volatile as money is a lot smaller than the people who will hold things with they do not perceive as volatile as money.  The US dollar being probably the best example.

So when I set about building BitReserve, the first thing I realized was it's impossible for bitcoin to become non-volatile against every currency because every currency trades against every currency.  So unless the UN were to simultaneously make the entire world accept bitcoin, it would always be volatile somewhere.  Even if it mirrored the dollar it would mean it would be volatile against every other currency in the world.  So mathematically there was no hope of ever making bitcoin non-volatile.

There's only a political solution and that would come from the UN and I just didn't see that ever happening.  Nor do I see people changing their mortgages, be in bitcoin or their car payments or even Walmart accepting bitcoin and denominating a bitcoin.  And to that end there is a gap between the benefit for this digital currency could bring and its nature as a volatile asset.  And that gap to me seems to be a significant hurdle towards the adoption ever, in fact coming.

And what I realized was the problem for how to create something which is stable while being able to spend in another currency is actually solved by the banks and credit card companies a long time ago.  I hold my money in dollars because that feels to me -- United States that's what all my bills are in so that feels secure now.

Trace Mayer:  Yeah.  That's your numerare.  That's how you measure everything.

Halsey Minor:  Yeah.  That' how I measure everything so when I go to London I can convert money into pounds but that's – it's kind of inefficient way because I don't know how many I'm going to need.  But what I really do is the same thing most people do.

I pull out my credit card and I buy things that are priced in pounds and through the magic of the financial system my dollars just get converted into pounds and the whole thing happens without me having to do anything.  It's an incredible consumer experience.  But the problem with it is banks charge a lot of money to do it.

Trace Mayer:  Like, upwards of 10% in some cases.

Halsey Minor:  So, the idea was well, what if I could let people hold money in any form they felt -- I didn't force them to have bitcoin, but I gave them that option.  But they could hold dollars, Euros, yen, won and hopefully by the end of next year, you know, probably well over a hundred different currencies that all fill non-volatile people.  But from those currencies, just like the banks do, the credit card companies, I could let people send bitcoin instantly.  So you don't have to opt in to volatility to opt in to the bitcoin economy.

And the problem that I see with bitcoin it's a sort of forwarding phenomenon and my warning for the world of bitcoin is, use it or lose it because bitcoin has no value if it is simply being used for hoarding.  Things that are hoarded -- I mean, you can hoard water and that has a certain, you know, if it's dry and you can hoard food if you can't eat, but bitcoin hoarding has no advantage other than some psychic reward because bitcoin's value is solely predicated on its utility to go and buy things.  And so what's happened is that there's a sort of conundrum in the world of bitcoins.

I want to hold my bitcoin because I want to be worth more and I want to make money.  And so I don't want to spend it and be stupid.  But if nobody spends it, then the whole ecology never takes off.  And even worse thing is starting to appear which is people start going well, there are a thousand people own half a bitcoin.  And really this is just a ponzi scheme to make a few people rich.  And bitcoin quite frankly is in a position now where that is a very real byline for a lot of stories to start to happen unless things change.

So what I say to people, see even people who get upset with us that we've created money dollars that have these abilities.  What I say to them is look you can do two things.  You can take your thousand dollars worth of bitcoin and convert it to a thousand dollars on BitReserve and you can spend that money for 0.45 % as bitcoin instantaneously.  It won't be fun because it's called money, it's called dollars and it's just sit there.  And then you can refill your bitcoin card with a thousand dollars.  Now, you can walk the walk and talk the talk.

Trace Mayer:  So you're able to participate in the actual transactions on the bitcoin network, but reduce the exposure that you have to the volatility of the exchange rate.

Halsey Minor:  You can use bitcoin as money and as an investment because money to everyone in America because everything that we see is priced in dollars are dollars.  If you're a working mother -- let's assume we're trying to make money for everybody right.  The bitcoin is not just for rich people in Silicon Valley.  Let's assume it's for everybody.  So what's it going to look like?

Well, we have a mother of three who barely make ends meet and she has to pay her rent.  Her rent's a thousand dollars. Okay.  Now, she can do two things.  She has just enough money right now to make her end's needs and to pay her thousand dollars rent.  She can hold it in bitcoin.  Well, if she does that.  She may not make her rent and she and her kids may get evicted.  That's just the world that people live in it.

Trace Mayer:  Yeah.  Because the bitcoin might go down in value.

Halsey Minor:  It's the world outside of Silicon Valley of people who have money that they absolutely must have to live off of, right.  Now, what if she were able to instead take that thousand dollars in bitcoin and transfer it to a thousand dollars in dollar value.  Her rent as we said is a thousand dollars.  At the end of the month she just converts thousand dollars in dollar value into bitcoin and pays.  Now, what we've done is we've actually taken a real person who lives in the real world, who has real responsibilities, children who need to be fed and housed and we've now actually allowed them to participate in the economy.

So our hope is that we can get away from that bitcoin being about people who are really rich, who have a lot of money, who you can extend the volatility, talking about, you know, how everybody else doesn't get it.  And what we can do is instead we can take bitcoin and we can recognize that people need to be able to rely on having the money that they make every month in order to pay their bills.

And unfortunately, even if people don't want to acknowledge that in the United States bills are in dollars and in the UK, they're in pounds and euro in Europe.  And so if you're really honestly truly care about making bitcoin successful and you honestly want to move it away from the Silicon Valley, you know, fan boy money, what you have to do is you actually have to make it work for people who don't have a lot of money.  Those people don't have the luxury of losing 30% in two weeks or 50% in one day.

So, what we've done is we've created a way for everybody to participate.  Not just the bitcoin hoarders, but for people who actually need that money in the amount -- if I have a hundred dollars that I set aside every week to go to the grocery store, if I had 99.50.  That's too much.  People with three kids who are working -- nobody wants that anxiety, right.  So, we've created a non-anxiety way and we let people choose.  Right, now we let them choose bitcoin, dollar, yen, euro, won, pound but will keep adding as many currencies as there are people who have feelings about what to them represents safety.

Trace Mayer:  Now how do you manage to actually do this?  Are you taking possession of the yens or the dollars or the contracts for difference, are there some type of swap or derivative, like, what's the actual functionality and kind of the regulatory aspects of all of this?

Halsey Minor:  So, the great thing is that the largest market in the world is foreign exchange market, five trillion dollars a day.  And it's all handled by computers and computers are really good at doing this.  So the way that we handle it so that it instantaneous so if you send bitcoin from your won card that bitcoin will go just as fast as bitcoin being sent from Coinbase, for instance.

Trace Mayer:  And this is a won card that's issued by BitReserve, right?

Halsey Minor:  Yeah.  Let's say you put your money in won or let's say you put your money in dollars whatever it is.

Trace Mayer:  On BitReserve.

Halsey Minor:  On BitReserve.  See you've transferred it into that valuable.  What we actually do is something that's very simple.  When you move your money from bitcoin to dollars we actually sell your bitcoin and put dollars in your account.  We do it at a very, very low cost, 0.45%.  So you've now given up a little bit of money to basically have no volatility.

Trace Mayer:  So it's kind of like going back to the full reserve banks except you're letting people have their reserves held in a multitude of different assets.

Halsey Minor:  That's right.  We are full.

Trace Mayer:  Hundred percent full reserve bank, no counterparty risk in that sense.

Halsey Minor:  Even more than that.  We're also fully transparent.  So, the reserve chain which is an extension of the blockchain.  We publish in real time.  As money moves around between these addresses that we have, we publish that.  So, you can see exactly what our liabilities are at any given time.  What we also publish, and we have an API for it as well, is the BitLedger.

What that does is it tells you the total liabilities we have, the money we're holding and it's tell you exactly how we're holding that money not bonds, but currently it's all cash.  But one day they'll say, this bond, at this day, at this price, at this maturity and you'll be able to today already and we're -- am awaiting for the first person to do in his website.  You can create a real time balance sheet for our reserve and it's a well-known process.

And every quarter we have a reserve audit where they come in.  They call up all the banks and they make sure we have all the money.  They look at everything, they look at our processes and they do it every quarter and every year we'll switch.  So that way you always know that the money is actually there, right.  And that's a whole separate thing which is I want to start a new form of competition which is based on stewardship of people's money and the only way to open that competition up is to be transparent.

Trace Mayer:  And the blockchain is great for that.

Halsey Minor:  The blockchain as it turns out one of its greatest innovations is that we've borrowed the blockchain to create transparency.  Because the blockchain abstracts the user but allows you to see the accounts.  So, inside of our service a dollar card has a bitcoin address which means when bitcoin gets sent to it it will get converted to dollars.  And the reason we call it the reserve chain is because this process of sending bitcoin to a bitcoin address and converted to dollars is beyond the scope of the blockchain.

Trace Mayer:  Right.

Halsey Minor:  So we've extended the blockchain to include other forms of value, right.

Trace Mayer:  Or extended the application of how you're using that blockchain.

Halsey Minor:  That's correct.  So, our goal is to cut the cost of money down to zero, if we can.  To allow people to hold money in whatever form it is that makes them most comfortable.

Trace Mayer:  So, making -- greatly extending bitcoin's liquidity.  Like its ability to seamlessly move in and out of all these different values in terms of stores of value.

Halsey Minor:  Bitcoin is the enabler.

Trace Mayer:  The invisible glue between all of these different systems.

Halsey Minor:  You know, can't live with it, can't live without it.  You know, it's like bitcoin is this amazing innovation which has done what I never thought was possible.  Which is, create a crack that might be levered open to create competition with the banks.  Because go get a banking license, you can't do.  It's no different than going and trying to get a slot --

Trace Mayer:  The most regulated industry in the world.

Halsey Minor:  Right.  And it's not just regulated for consumers benefit.  It's also regulated like the airlines were.

Trace Mayer:  Not just a bank license try to get a central bank license.

Halsey Minor:  It's like a central banks -- exactly.  Right.

Trace Mayer:  Just not going to happen.

Halsey Minor:  So what bitcoin did is it open the door and it forced the other banking system which is --.

Trace Mayer:  And if just 1% of assets or even 0.1% is held in bitcoin it massively changes the rules of the game for all other assets.

Halsey Minor:  What I tell everybody internally is that when banks have their oval moment.  And around the world and I see wherever Uber is the cabs get cleaner, the drivers get nicer and they all take credit cards.

Trace Mayer:  And the customer has a better experience but cheaper.

Halsey Minor:  And it forces the other cabs to be better, right.  And I had this epiphany that like hit me harder than probably anything in my career.  When I read that the banks generate $31.9 billion in 2012 on bounced check fees which give you nothing.

Trace Mayer:  Hold on.  39.1 --.

Halsey Minor:  31.9 --.

Trace Mayer:  Billion with a B like billion.  Oh, my goodness.

Halsey Minor:  Got a B.

Trace Mayer:  Just on bounced check.

Halsey Minor:  And 20% of banks do reverse processing.  So, if you write a hundred dollar check and then five one dollar checks and you have a hundred dollars they'll process that.

Trace Mayer:  Right, the way they post them bam, bam, bam.  They generate like five fees instead of just one fee.

Halsey Minor:  That's right.  So, think about this.  So, Salesforce has about four billion in revenue now.  It's a $40 billion company.  The bounced check industry is 31.9 billion in 2012.  What I realized was you can't --

Trace Mayer:  Not delivering a product.

Halsey Minor:  Nothing.  I mean, people used to say Microsoft was a monopoly.  But they never make $32 billion doing nothing, literally nothing, right?  So it dawned on me.  It's like this is just --.

Trace Mayer:  And they're still taking advantage of the float on all these bounced checks.

Halsey Minor:  Yeah.  And exactly and so the think that struck me was I grew up with all these monopolies and they got broken up and it was great.  You know, the airline deregulation, brokerage deregulation and telecom deregulation.  And what I realized is that those industries took money from the rich.  Like you want to fly.  It just cost a lot more.

Trace Mayer:  It just cost a lot of money.

Halsey Minor:  Want a broker?  Just cost a lot more.  Wanted to call California?  Poor people didn't do that in New York.  Okay.  This is taking it from the bottom of society.

Trace Mayer:  Yeah.  Grinding the faces of the poor.

Halsey Minor:  You are literally taking the people who don't have representation by large and you're taking $32 billion out of them.

Trace Mayer:  And no recourse or anything.

Halsey Minor:  Just in bounced check fees.

Trace Mayer:  Oh.  Remittance fees, account fees.

Halsey Minor:  Add another 10% on $450 billion, right.  So when I realize this is so much bigger than bitcoin.  After 2008, they should have introduced competition.  Not reduce the number of banks.

Trace Mayer:  And increase the complexity which makes it more likely to fail.

Halsey Minor:  More likely to fail.

Trace Mayer:  And when it does fails, it fails on an even grander scope.

Halsey Minor:  And I mean, you have people like Soros Neuer who betting against that all of this is going to happen again and you've got --.

Trace Mayer:  When you look at the run on the good collateral, the hypothecation, re-hypothecation, even of customer segregated accounts, I mean, this is a real problem.

Halsey Minor:  And think of it this way.  With all the problems in the banks, with bitcoin six billion why are they even paying attention to it?  I want to say one thing about New York.  Because I think, you know, in the end New York is probably good for bitcoin because all the banks are basically never going to be able to compete.  Because they're locked into --

Trace Mayer:  They've been ring fenced.

Halsey Minor:  And iron curtain.

Trace Mayer:  Yeah.

Halsey Minor:  An iron curtain has been now built around New York.  And the one thing that we've learned in the United States where we prize competition is that when people deliberately cut themselves off from competition it has disastrous effects in the long run.

Trace Mayer:  And we know exactly what's happening is they're trying to enforce price controls, and price controls always failed the market forces.  They create shortages, uses excused implement, rationing, banking accounts, all this things.

Halsey Minor:  And we get rid of those in the 70's.  That what's we do with telecom, that what's we do with airlines, that's what we do.

Trace Mayer:  Yeah.  Well, we thought we did.  But we didn't get rid of it, say, highways for example.  And now we have shortages that make Soviet bread lines just absurd every time you spend a time in traffic.  So, I mean, that we do have our price controls and we're trying to keep the price controls in terms of the time, money and privacy with AML laws and all the stuff with the banks.  But bitcoin just eviscerates all of that.  I mean, we've got these two ATM's that are $4,000.

Halsey Minor:  These people hold up regulation.  By the way, we're over at the top with regulation.  I mean, we deanonymize -- we want to know who all the people are.  Because we want them to be able to exchange money with each other and know who they're changing with.  So, we're fully transparent and we've gone far beyond what any of the regulators are even going to ever asked us to do.  But we're doing it for consumer reasons.

But what people understand is regulation doesn't mean that they're helping you.  Because when the airlines are regulated, it meant that a large percentage of the population couldn't go and the rest of the population overpaid.  When the brokerage houses were regulated for Charles Schwab they meant only rich people had brokers.  When the phone companies were regulated it meant the long distance calls cost the equivalent of about $2 a minute to call across the United States.

Regulation doesn't mean benefit for consumers.  It actually can mean that you maintain monopolies.  For as long as those regulations stay in place you cannot make $32 billion by making people feel bad and have competition.  I was saying that people like – if we notice people are trying to spend money that they didn't have.  We won't charge them and we won't make him feel bad.  But the question we ask ourselves is what can we do to give them better insight so they know how much money they have.  How many banks --.

Trace Mayer:  Yeah.  How about as soon as the transaction's processed to the network you know that it moves out of the account.  And yet in the EU, for example, we have different settlement clearing rules and fees and standards for all the different countries.  I mean, they're like it's a massive problem over there.

Halsey Minor:  How many banks do you think have sat around and said guys, oh my God, we've got these working families, these mothers who are trying to take care of their kids and their job and they're trying to keep track of all of their money and --.

Trace Mayer:  How can we increase profits from them?

Halsey Minor:  And they're bouncing their checks.  How do we make their life easier for them?  Let's set a goal.  Let's try to take the 32 billion in bounced check fees and let's try to reduce it by 20% every year and make the business more convenient.  None.  Like I bet that's never even happened.  You look at Silicon Valley where all of us live, right.  You miss a product cycle like Samsung, you could be gone.

Trace Mayer:  It's bad for your business.

Halsey Minor:  Yeah.  I mean, BlackBerry, do you miss it.  You don't even need them as a product cycle.  You can blow up your business like every bank and you get resurrected bigger.  You don't even need to execute.

Trace Mayer:  But only because they've got a monopoly on what we use as currency.

Halsey Minor:  Exactly.

Trace Mayer:  Which is also unconstitutional.

Halsey Minor:  If you want to see like how they're continuing to stop competition ask about people who are doing bitcoin.  How hard it is to get a bank account?  Well, of course, you're required to have a bank account.  But if they don't give a bank account it's another way that you can try to stop competition.

Online publishing

Trace Mayer:  It's a prior restraint you could say.  Shifting gears.  You are the founder of CNET, one of the major publication sites that came up during the internet.  And during you're panel here at Money 2020 you've made a comment about how you had the internet, but there wasn't anything above it in the stack and you actually had to build your own software in order to get the publication done.

Halsey Minor:  Yeah, we really built -- the product was called storyserver because we're serving up stories.  Vignette actually became the fastest growing software company in history I think and a $26 billion company off selling storyserver.  I had to build my own software because it didn't exist.  So, and then I didn't want to be both in the software development business and in the content business.  So I took that part of our business, spun it off.

Trace Mayer:  So, now if somebody wants to start a CNET.  They can go get WordPress which is developed on Git for free and bam, they got a content management system and boom they're off and running.

Halsey Minor:  Now they only have to buy the software.  You don't have to buy the hardware.  The whole stack is now basically rentable for $10 a month from Amazon.

Trace Mayer:  Yeah.  And host it.

Halsey Minor:  Right, yeah.

Trace Mayer:  Now, on your panel you talked about how bitcoin is kind of at the culmination of all of these additional technologies that we've built in the past.

Halsey Minor:  Yes.

Innovation without Permission

Trace Mayer:  Can you talk a little bit more about how bitcoin is this layer and where you see BitReserve being an additional layer on top of that and other layers that will also be needed to be built on top of bitcoin to make it even more usable and functional for people to apply in their lives.

Halsey Minor:  You know, it's interesting because they was a small group of us really who did stuff on the internet.  It was funny I was up on the panel with those guys.  But it was like me and Jerry Yang and a couple other guys.

Trace Mayer:  Jerry Yang.  Yahoo, right.

Halsey Minor:  Yeah.  But I mean, a long time ago, there was nothing like that.  I mean, it's just a couple of young guys.

Trace Mayer:  You're on the panel with Jerry Yang.

Halsey Minor:  I was older.  Jerry was 27.  I was 28 or 29.  I mean, it was the same kind of things and am the old guy.  And the --

Trace Mayer:  The world turns.

Halsey Minor:  And the world it does turn.  And the one thing that I wish people who looked at bitcoin maybe see a little different thing.  What all of saw on the internet was this amazingly indestructible infrastructure that was based on open standards and would let us publish everywhere and there are no gatekeepers.

Trace Mayer:  Innovation without permission.

Halsey Minor:  Innovation without permission.  It's perfectly said.  And ironically the flame here we got back then was from university students who thought we were commercializing their little world.  I mean, it's hard to believe but it is true.  So, we all saw that, the VC saw this, and everybody kind of came in.

What we saw was this distributed nature allowed for the centralization of really, really amazing services.  I put a circle around CNET because we became the center of digital universe.  And just my software downloading service had ten million people a day finding software.  I centralized this function that everybody could share and at very low cost.  eBay did the same thing and we all did.

The only thing about bitcoin that I think people are going to have to get past and that is the decentralized nature of bitcoin ensures its survivability in the same way that the decentralized nature of the internet ensured its survivability and inability to be stopped.

Trace Mayer:  Now when you say the internet are you saying like TCP/IP protocol or the actual underlying hardware of the internet.

Halsey Minor:  I'm saying TCP/IP and the way the networks interlink.  The internet was a collection of networks.  Take out any one of them and it routes around.

Trace Mayer:  Right.

Halsey Minor:  It was designed by the United States military to be in --.

Trace Mayer:  With DARBA, ARPANET.

Halsey Minor: To be totally resilient.  You can't stop it.  You could blow up pieces after pieces after pieces and it would still route to all the other ones that are there.

Trace Mayer:  And when we're talking about routing.  We're talking about protocol.

Halsey Minor:  We're talking about the protocol level or the ability to send data between points doesn't stop because you blow up the internet in Algeria, you know.

Trace Mayer:  Yeah.

Halsey Minor:  Or even in San Jose for that matter.  It was loosely coupled so you could plug in all these different kinds of networks, a corporate network, high speed network, cable network.  So that's what we all saw and then bitcoin comes along and I see the same thing again.  I see these servers being set up everywhere.  I see a lot of inefficiency of everything being replicated every single place but what I see in the inefficiency.

And by the way Bill Gates wasn't dumb, when it took him until December of '97 to realize that the internet was the future.  He's a very smart guy.  It was very easy to look at it and all of its frailties and all of its issues and not think that it was going to turn into something, right.  So, you can look at it, a perfectly brilliant person like Bill Gates could ignore it until December of 1997 over Christmas.  When he realized he needs to turn the whole company around because the internet is the future.

So it wasn't obvious to people.  For some of us were -- for most people it really was not obvious.  Now we have bitcoin and bitcoin has miraculously been created at this really fertile time, you know, 2008 and, you know, it's happened in the banks, the whole thing.  And somebody invents this ability to move value around that literally can't be destroyed unless you can take out every single server everywhere because they're all mirrors of each other.

Trace Mayer:  Censorship resistance.

Halsey Minor:  It's censorship resistance.  There is no point of control.

Trace Mayer:  And the network security is primo with bitcoin.

Halsey Minor:  Yeah.  So when I looked at the internet I said, oh TCP /IP/HTML.  This HTML 1.0 didn't have much.  So I looked at these things and I said well that's all great but that doesn't create a publishing company because you need to build software to do that.

So I was fortunate all of my engineers, Bell Labs, Bell Core and they well in New Jersey and they were brilliant.  Andy Wirth done a big documented manager project and he built Vignette.  And so we layered on top of the internet that had nothing but these protocols and standards.  We layered and acts on application that made that do something, namely publish.

Trace Mayer:  So, that you could actually impact people's lives.

Halsey Minor:  And then --.

Trace Mayer:  You know, we got this potential.

Halsey Minor:  We've potential.

Trace Mayer:  But we actually have to build software on top of it to realize that potential.

Halsey Minor:  Exactly.  So, then when that software then was sold.  Then every newspaper, you know, in the country built it because it had all of our knowledge, not only about software, but also about workflow and all this kind became were transferred.  So, now we have the same amazing thing and we have this indestructible infrastructure.

But people want to replicate the infrastructure in their business.  There's nothing wrong with centralization.  You don't have to have one or the other.  You can actually have both.  Our power is centralized, you know, and maybe they'll come up with a better way of decentralizing it.  Salesforce is a centralized, CNET was central.  The religious fervor that created this amazing thing, you can't get so carried away that it moves away from kind of what the consumer wants.

Consumers doesn't want a complicated thing, you go to stick together.  What they really want is the system that is actually created and I would have bet impossible, a credible threat to the banking industry of the world.  And I mean, threat in competition.

Trace Mayer:  Obsolescence.

Halsey Minor:  Obsolescence.  Deserved, earned obsolescence.

Trace Mayer:  It's just part of humanity's journey from the swamps to the stars, you know, in our evolution.

Halsey Minor:  Exactly.  And so when I saw I was like okay, bitcoin is great.  But if my mom's going to be on this and a lot of people I know in my life they can't withstand that volatility of bitcoin, but I want them to be able to participate in what this is about.  And so we think we're doing or we're trying to do is we're trying to create a bigger boat for people to come in.  You don't have to accept bitcoin volatility to spend bitcoin money at places that accept bitcoin.

Trace Mayer:  A boat that holds 100% reserves and can hopefully be a preserve against all of the financial catastrophe that's just been already misallocated and waiting to be administered.

Halsey Minor:  And what we're hoping happens actually and we'll start next year, we want to make sure that we prove to everybody that our hope is that other companies will do what we do, but as we say what you do with your money is your business, what we do with your money is everybody's business.  The more people who follow us along the path of transparency what we end up doing is we end up creating a banking system that is better in every regard.

Trace Mayer:  Well, except in creating a moral hazard for people -- but they are working inside the banking industry.  It's not good for them because they, you know.

Halsey Minor:  No, and, you know, I had people who came up to me and they said well, you know, you don't have the $150,000 FDIC guarantee and I would look at them and say --.

Trace Mayer:  There is no fractional reserve.

Halsey Minor:  I'm like okay, but some people got their $150,000 back.  But the actual cost was 4.7 trillion.  Let's not think that it's the FDIC thing.  By the way if the FDIC plaque on the wall meant banks didn't crash any more, I'd be all for it.  But two major ones have happened, the savings and loan crisis and the most recent one in my 49 years.

And yes, we ended up giving those people back their $150,000 or $200,000 ultimately.  But the 4.7 trillion that was the total cost is equal to the Korean War, the Vietnam War, both Gulf wars, putting a man on the moon in current dollars by the way with an extra trillion leftover.

Trace Mayer:  Oh, my goodness.

Halsey Minor:  What are we trying to – we're not the hundred and fifty thousand --.

Trace Mayer:  Why are we preserving this obsolete system?

Halsey Minor:  So that we pay people to blind themselves from whether the institutions that have their money should have the money.  So transparency we're doing, it's out, it's – you know, I'm hoping to see it show up everywhere.

Trace Mayer:  And moving forward true 24-hour accounting in a lot of ways.

Halsey Minor:  It is a real-time proof of solvency at all times.

Trace Mayer:  Yeah.

Halsey Minor:  And will be so forever.

Trace Mayer:  You know, this is really going to suck a lot of the oxygen out of what the banks are currently surviving off.  They survive on the float, they survive on these fees, they survive on all the fraction reserving that they're able to do.

Halsey Minor:  It's interesting because here's the way I look at it.  I don't have anything against the banks.  I don't have anything against people who work at the banks.

Trace Mayer:  Well, they served a good purpose.

Halsey Minor:  I think people generally do what they're supposed to do in the role that they're in in life.  We have a structural problem.

Trace Mayer:  Right.  Just like newspapers have a structural problem in the Information Age.

Halsey Minor:  We have a structural problem that is structurally ensuring that a bunch of institutions that don't have the technology or the will, the desire maybe even the people to innovate are basically in command of the economy.  It's not I'm blaming the bank or blaming --

Trace Mayer:  No, it's just a systemic problem.

Halsey Minor:  It's just a systemic problem.

Trace Mayer:  That poses a risk to society as a whole.

Halsey Minor:  You know, [unintelligible 00:30:18] is working for us.  He's trying to handle this from the regulatory standpoint, but this has to be a policy stand point.  We have to decide as a country because every company I've start has been in the United States.  We're a Cayman island company.

And I don't know a lot of companies that are trying to, you know, they're rushing the United States in this area to -- some even operate but many to -- incorporate the United States because it is such an unknown and we are what Europe used to be.  We are now Europe.  They're one market for money.  We're 48 different states and then add Federal government.  We've actually flip-flopped with Europe.

Trace Mayer:  Isn't that the irony that, you know, not only are we going to be ground zero for this monetary and financial crisis that is coming down the pipeline.  But we've also trammeled ourselves with the regulation that prevents the people who see it coming from actually providing a solution.

Halsey Minor:  And doing it anything about it.  Providing a solution.

Trace Mayer:  It's very problematic.

Halsey Minor:  That is exactly right.

Trace Mayer:  And my opinion could pose a major risk to US national security.

Halsey Minor:  There's no doubt.  I mean, there's just no doubt.  You know, I don't want to focus it on the banks.  I want to focus it in a positive way.  There is a better system.

Trace Mayer:  That we want to build a solution.

United States & Bitcoin Volatility

Halsey Minor:  We need the right to compete.  We need the right to compete.  Here is the thing.  With New York State, assuming that they're not disingenuous, assuming that they really want to protect consumers and they're not just trying to build an iron curtain around New York.  Let's assume.  Let's roll the tape back to 1996 to 2000.  There was a stratospheric amount of money that was invested in bad ideas and lost.  Stratospheric, enormous amounts of money.

People tried everything.  Every stupid idea out of the world was tried and they were all funded and, you know what we got for that, ownership of the Internet.  Every major company in the world that had anything to do with the Internet was in the United States.  Yeah.  There was waste.  Guess what?  Innovation, trying new things, taking risks it produces waste.

Trace Mayer:  And --.

Halsey Minor:  But it also produces a fertile, active, growing economy.

Trace Mayer:  It produces the Facebooks, the Googles, the eBays, the Yahoos, the Amazons.  So, like everything, right.

Halsey Minor:  Go on and on and on and on and on and on.  Name it all.  Now, who's the biggest, the most recent Internet IPO.

Trace Mayer:  Oh, wait, I thought that was Chinese.

Halsey Minor:  I think I that was Alibaba, wasn't it?  Yeah, right.

Trace Mayer:  Wonderful.

Halsey Minor:  Yeah.  I mean, London, I mean, I've been to Bank of England twice.  I've been to 10 Downing Street.  I got to tell you.  They haven't fully figured out how to get out of their own way yet, but they're deadly serious about having that business in their country.

Trace Mayer:  Yeah.  Actually, two weeks ago I was on a panel at the British Consulate in New York.  They are stealing all the startups.

Halsey Minor:  They get it.

Trace Mayer:  And taking them to London.  They get it.  They get it.

Halsey Minor:  So, I was asked by both Bank in England and 10 Downing Street.  Said what do we need to do?  And I say here is what we need to do.  All of us have to do this really strange thing for starting a business.  We have to hire a lawyer and ask them where can we domicile.  And I said the first thing they'll tell you.  The first thing that you told me is get the best lawyers in the world is don't be in the United States, okay.

Trace Mayer:  That's what we need for US National Security, run off all our entrepreneurs.

Halsey Minor:  Yeah.  So, I said -- people are -- in UK they're asking this question.  I say we should do is call the lawyers up.  You're giving advice and ask them what they're saying and why and then you figure out what you need to do so they say. --.

Trace Mayer:  Go there.

Halsey Minor:  Go there.

Trace Mayer:  Well, I know one of my companies, Netagio it's based out of Isle of Man, domiciled in the UK.

Halsey Minor:  Yeah.

Trace Mayer:  You know.  Like because they can't do business in the US, you know.

The Boiled Frog

Halsey Minor:  And they get it over there and they're focused on it over here.  And look I've creating a lot of really big companies in the United States and a lot of jobs, I mean, all these companies are now global anyway, but I think it's unfortunate that there's like nobody as like who --

When the Japanese were competitive we all go -- then everyone get up in arms and like we need to improve quality, we need to improve team work.  You know, all nations should have felt like we were coming behind and we needed to do stuff and so we deregulated, we did all kinds of things.  Now, it's like the boiled frog, right?

Trace Mayer:  Yeah.

Halsey Minor:  It's like creeping, creeping, creeping regulatory burden.  And nobody's going oh, my God.  We're falling behind.  Ali Baba is one of the biggest Internet companies in the world and they're not in the United States anymore.  And they got some other big guns over there too.  So, it's like it's the frog and I don't know whether we'll wake up in this country in time to kind of co-opt a lot of what's going on today.  But, you know, when you look at what's --.

Trace Mayer:  Well, hopefully we will, you know, hopefully we'll.  And if not then never before has the world been as small a place like you can just leave, you know, which is happening.  You know, people -- very skilled, sophisticated, wealthy people are just leaving the US and taking their investments with them.  Now, that's unfortunate but it just is what it is.

Halsey Minor:  Well, I've committed that there will never be a BitReserve of China.  BitReserve will be the BitReserve of China.  So, when I look at New York and I look at our office in Shanghai and I say what do I wanted to.  Point two percent of the population of the world is in New York.  Do I want to go through all the --.

Trace Mayer:  Hoopla, to deal with them.

Halsey Minor:  Do that or do I want to go over and fight it out in China.

Trace Mayer:  In Shanghai, yeah.

Halsey Minor:  Where there're 1.3 billion people and they're ultimately going to, you know.

Trace Mayer:  And they are all working hard.

Halsey Minor:  And they are all working hard.  My decision was made.  I have zero interest in -- we all have limited resources.  I'm going to try over New York, you know, a hundred times out of a hundred because the bang for the buck is greater and --.

Trace Mayer:  Yeah.  That's where the outliers.  Well, you know, we're out of time way over.  Thanks so much for having us.  It reminds me of something that Jamie Diamond said.  He said, you know, we got to watch out for those bitcoin guys.  They're going to eat our lunch.  And so, you know, we've had CEO of BitReserve eating Jamie Diamond's lunch.  Thanks so much for being on the podcast with us.

Halsey Minor:  Thanks.  Thanks for having me.


text:
package net.gilstraps;

import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.Font;
import java.awt.GridLayout;
import javax.swing.Box;
import javax.swing.JComponent;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.border.BevelBorder;

/**
 * Abstract representation of a month in a simplified view of a calendar year -- not any particular year.
 */
public class MonthView {

    private static final int[] NUM_DAYS_IN = {
            0   // unused
            , 31 // January
            , 29 // February
            , 31 // March
            , 30 // April
            , 31 // May
            , 30 // June
            , 31 // July
            , 31 // August
            , 30 // September
            , 31 // October
            , 30 // November
            , 31 // December

    };

    private static final int[] STARTING_DAYS = {
            1 // seed value
            , 0 // January
            , 0 // February
            , 0 // March
            , 0 // April
            , 0 // May
            , 0 // June
            , 0 // July
            , 0 // August
            , 0 // September
            , 0 // October
            , 0 // November
            , 0 // December
    };

    private static final int[] ENDING_DAYS = {
            0 // seed value
            , 0 // January
            , 0 // February
            , 0 // March
            , 0 // April
            , 0 // May
            , 0 // June
            , 0 // July
            , 0 // August
            , 0 // September
            , 0 // October
            , 0 // November
            , 0 // December
    };

    private static final String[] MONTH_NAMES = {
            "", // Unused
            "Jan",
            "Feb",
            "Mar",
            "Apr",
            "May",
            "Jun",
            "Jul",
            "Aug",
            "Sep",
            "Oct",
            "Nov",
            "Dec"
    };

    static {
        for (int sd = 0; sd < 12; sd++) {
            STARTING_DAYS[sd + 1] = STARTING_DAYS[sd] + NUM_DAYS_IN[sd];
        }
        for (int sd = 1; sd <= 12; sd++) {
            ENDING_DAYS[sd] = STARTING_DAYS[sd] + (NUM_DAYS_IN[sd]-1);
        }
    }

    private static Font bigFont = new Font("Times New Roman", Font.BOLD, 24);

    private int monthNumber; // 1 - 12
    private int startingDay;
    private int lastDay;
    private int initialOffset;
    private JPanel mainPanel;
    private JPanel daysPanel;

    public MonthView( int aMonthNumber ) {
        if ( aMonthNumber < 1 || aMonthNumber > 12 ) {
            throw new IllegalArgumentException( "Month number must be between 1 & 12 inclusive" );
        }
        monthNumber = aMonthNumber;
        startingDay = STARTING_DAYS[monthNumber];
        lastDay = ENDING_DAYS[monthNumber];
        initialOffset = getInitialOffsetFor( monthNumber );
        createGUI();
    }

    public JComponent getGUI() {
        return mainPanel;
    }

    public void process( DayView aDayView ) {
        int dayNum = aDayView.geDayNumber();
        if ( dayNum >= startingDay && dayNum <= lastDay ) {
            placeDay( aDayView );
        }
    }

    private void createGUI() {
        mainPanel = new JPanel( new BorderLayout() );
        daysPanel = new JPanel( new GridLayout( 6, 7 ) );
        daysPanel.setBorder( new BevelBorder( BevelBorder.RAISED ) );
        daysPanel.setBackground(Color.black);
        Dimension min = new Dimension(0,0);
        Dimension max = new Dimension(Integer.MAX_VALUE,Integer.MAX_VALUE);
        for ( int i = 0 ; i < 42 ; i++ ) {
            daysPanel.add( new Box.Filler( min, min, max ) );
        }
        mainPanel.add( daysPanel, BorderLayout.CENTER );

        JLabel monthName = new JLabel( MONTH_NAMES[monthNumber] );
        monthName.setFont(bigFont);
        monthName.setHorizontalAlignment( JLabel.CENTER );
        monthName.setMinimumSize( new Dimension(100,75));
        monthName.setOpaque(true);
        monthName.setBackground(Color.black);
        monthName.setForeground(Color.white);
        mainPanel.add( monthName, BorderLayout.NORTH );
    }

    private void placeDay(final DayView aDayView) {
        int dayNum = aDayView.geDayNumber();
        int offset = (dayNum - startingDay) + initialOffset;
        daysPanel.remove( offset );
        daysPanel.add( aDayView.getGUI(), offset );
    }

    private static int getInitialOffsetFor( int monthNumber ) {
        int totalDays = 0;
        for ( int m = 1 ; m <= monthNumber - 1 ; m++ ) {
            totalDays += NUM_DAYS_IN[m];
        }
        return totalDays % 7;
    }

}

redpajama_set_name: RedPajamaGithub


text:
var passport = require('passport');

module.exports = {
    login: function(req, res, next) {
        var auth = passport.authenticate('local', function(err, user) {
            if (err) return next(err);
            if (!user) {
                req.session.error = "Invalid username/password";
                res.redirect('/login');
            }

            req.logIn(user, function(err) {
                if (err) return next(err);
                res.redirect('/');
            })
        });

        auth(req, res, next);
    },
    logout: function(req, res, next) {
        req.logout();
        res.redirect('/');
    },
    isAuthenticated: function(req, res, next) {
        if (!req.isAuthenticated()) {
            res.redirect('/login');
        }
        else {
            next();
        }
    }
};


text:
"""
@package mi.dataset.parser.test
@file mi-dataset/mi/dataset/parser/test/test_winch_cspp.py
@author Richard Han
@brief Test code for Winch Cspp data parser

Files used for testing:

20141114-194242-WINCH.LOG
  Contains engineering data for CSPP platform

"""
import os
from nose.plugins.attrib import attr

from mi.core.log import get_logger
from mi.dataset.dataset_parser import DataSetDriverConfigKeys
from mi.dataset.driver.winch_cspp.resource import RESOURCE_PATH
from mi.dataset.parser.winch_cspp import WinchCsppParser
from mi.dataset.test.test_parser import ParserUnitTestCase

log = get_logger()

MODULE_NAME = 'mi.dataset.parser.winch_cspp'
CLASS_NAME = 'WinchCsppDataParticle'

WINCH_CSPP_LOG_FILE = "20141114-194242-WINCH.LOG"
WINCH_CSPP_LOG_FILE_2 = "20141114-194242-WINCH_2.LOG"

# Define number of expected records/exceptions for various tests
NUM_REC_WINCH_CSPP_LOG_FILE = 1617

YAML_FILE = "winch_cspp_test_data.yml"

INVALID_DATA_FILE_1 = '20141114-194242-WINCH_invalid1.LOG'

NUM_INVALID_EXCEPTIONS = 5

@attr('UNIT', group='mi')
class WinchCsppParserUnitTestCase(ParserUnitTestCase):
    """
    winch_cspp Parser unit test suite
    """

    def setUp(self):
        ParserUnitTestCase.setUp(self)

        self.rec_config = {
            DataSetDriverConfigKeys.PARTICLE_MODULE: MODULE_NAME,
            DataSetDriverConfigKeys.PARTICLE_CLASS: CLASS_NAME
        }

    def open_file(self, filename):
        file = open(os.path.join(RESOURCE_PATH, filename), mode='r')
        return file

    def open_file_write(self, filename):
        file = open(os.path.join(RESOURCE_PATH, filename), mode='w')
        return file

    def create_parser(self, file_handle):
        """
        This function creates a WinchCspp parser for Winch CSPP data.
        """
        parser = WinchCsppParser(self.rec_config,
                                   file_handle,
                                   self.exception_callback)
        return parser

    def test_verify_record(self):
        """
        Simple test to verify that records are successfully read and parsed from a data file
        """
        log.debug('===== START SIMPLE TEST =====')
        in_file = self.open_file(WINCH_CSPP_LOG_FILE)
        parser = self.create_parser(in_file)

        # In a single read, get all particles in this file.
        number_expected_results = NUM_REC_WINCH_CSPP_LOG_FILE
        result = parser.get_records(number_expected_results)
        self.assertEqual(len(result), number_expected_results)

        in_file.close()
        self.assertListEqual(self.exception_callback_value, [])

        log.debug('===== END SIMPLE TEST =====')

    def test_invalid_data(self):
        """
        Test the parser to handle non conformed format data. There are a total of six records in the
        test file. The first line contains good data and the next 5 lines are bad lines with either wrong
        delimiter (expect white space but found ',') or wrong input type (expect integer but found float).
        Verify that one particle is generated and five exceptions are detected.
        """
        log.debug('===== START TEST INVALID SENSOR DATA =====')
        in_file = self.open_file(INVALID_DATA_FILE_1)
        parser = self.create_parser(in_file)

        number_expected_results = 1
        # Try to get records and verify that none are returned.
        result = parser.get_records(NUM_REC_WINCH_CSPP_LOG_FILE)
        self.assertEqual(len(result), 1)
        self.assertEqual(len(self.exception_callback_value), NUM_INVALID_EXCEPTIONS)

        in_file.close()

        log.debug('===== END TEST INVALID SENSOR DATA =====')

    def test_verify_record_against_yaml(self):
        """
        Read data from a file and pull out data particles
        one at a time. Verify that the results are those we expected.
        """
        log.debug('===== START YAML TEST =====')
        in_file = self.open_file(WINCH_CSPP_LOG_FILE_2)
        parser = self.create_parser(in_file)

        # In a single read, get all particles in this file.
        number_expected_results = 6
        result = parser.get_records(number_expected_results)
        self.assert_particles(result, YAML_FILE, RESOURCE_PATH)

        in_file.close()
        self.assertListEqual(self.exception_callback_value, [])

        log.debug('===== END YAML TEST =====')

    def create_yml_file(self):
        """
        Create a yml file corresponding to a Winch Cspp dataset. This is not an actual test. It allows
        us to create what we need for integration testing, i.e. a yml file.
        """
        in_file = self.open_file(WINCH_CSPP_LOG_FILE_2)
        parser = self.create_parser(in_file)

        # In a single read, get all particles in this file.
        result = parser.get_records(100)

        self.particle_to_yml(result, YAML_FILE)

    def particle_to_yml(self, particles, filename, mode='w'):
        """
        Write particle dictionaries to a yaml file
        """
        # open write append, if you want to start from scratch manually delete this fid
        fid = self.open_file_write(filename)
        fid.write('header:\n')
        fid.write("    particle_object: 'MULTIPLE'\n")
        fid.write("    particle_type: 'MULTIPLE'\n")
        fid.write('data:\n')
        for i in range(0, len(particles)):
            particle_dict = particles[i].generate_dict()
            fid.write('  - _index: %d\n' % (i+1))
            fid.write('    particle_object: %s\n' % particles[i].__class__.__name__)
            fid.write('    particle_type: %s\n' % particle_dict.get('stream_name'))
            fid.write('    internal_timestamp: %f\n' % particle_dict.get('internal_timestamp'))
            for val in particle_dict.get('values'):
                if isinstance(val.get('value'), float):
                    fid.write('    %s: %16.5f\n' % (val.get('value_id'), val.get('value')))
                elif isinstance(val.get('value'), str):
                    fid.write("    %s: '%s'\n" % (val.get('value_id'), val.get('value')))
                else:
                    fid.write('    %s: %s\n' % (val.get('value_id'), val.get('value')))
        fid.close()


text:
#ifndef __atomic_h__
#define __atomic_h__

#include "platform.h"

#if (CC_TARGET_PLATFORM == CC_PLATFORM_LINUX) || (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID)
#define ATOM_CAS(ptr, oval, nval) __sync_bool_compare_and_swap(ptr, oval, nval)
#define ATOM_CAS_POINTER(ptr, oval, nval) __sync_bool_compare_and_swap(ptr, oval, nval)
#define ATOM_INC(ptr) __sync_add_and_fetch(ptr, 1)
#define ATOM_FINC(ptr) __sync_fetch_and_add(ptr, 1)
#define ATOM_DEC(ptr) __sync_sub_and_fetch(ptr, 1)
#define ATOM_FDEC(ptr) __sync_fetch_and_sub(ptr, 1)
#define ATOM_ADD(ptr, n) __sync_add_and_fetch(ptr, n)
#define ATOM_SUB(ptr, n) __sync_sub_and_fetch(ptr, n)
#define ATOM_AND(ptr, n) __sync_and_and_fetch(ptr, n)
#define ATOM_SYNC() __sync_synchronize()
#elif (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32)
#define ATOM_CAS(ptr, oval, nval) (oval == InterlockedCompareExchange((LONG volatile*)ptr, nval, oval))
#define ATOM_CAS_POINTER(ptr, oval, nval) (oval = InterlockedCompareExchangePointer((PVOID volatile*)ptr, nval, oval))
#define ATOM_INC(ptr) InterlockedIncrement((LONG volatile*)ptr)
#define ATOM_INC16(ptr) InterlockedIncrement16(ptr)
#define ATOM_FINC(ptr) InterlockedExchangeAdd(ptr, 1)
#define ATOM_DEC(ptr) InterlockedDecrement(ptr)
#define ATOM_DEC16(ptr) InterlockedDecrement16(ptr)
#define ATOM_FDEC(ptr) InterlockedExchangeAdd(ptr, -1)
#define ATOM_ADD(ptr, n) InterlockedAdd(ptr, n)
#define ATOM_SUB(ptr, n) InterlockedAdd(ptr, -n)
#define ATOM_AND(ptr, n) InterlockedAnd(ptr, n)
#define ATOM_SYNC() MemoryBarrier()
#endif // _MSC_VER

#endif


text:
.class Landroid/support/v4/app/NotificationCompatJellybean;
.super Ljava/lang/Object;
.source "NotificationCompatJellybean.java"

# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Landroid/support/v4/app/NotificationCompatJellybean$Builder;
    }
.end annotation

# static fields
.field static final EXTRA_ACTION_EXTRAS:Ljava/lang/String; = "android.support.actionExtras"

.field static final EXTRA_GROUP_KEY:Ljava/lang/String; = "android.support.groupKey"

.field static final EXTRA_GROUP_SUMMARY:Ljava/lang/String; = "android.support.isGroupSummary"

.field static final EXTRA_LOCAL_ONLY:Ljava/lang/String; = "android.support.localOnly"

.field static final EXTRA_REMOTE_INPUTS:Ljava/lang/String; = "android.support.remoteInputs"

.field static final EXTRA_SORT_KEY:Ljava/lang/String; = "android.support.sortKey"

.field static final EXTRA_USE_SIDE_CHANNEL:Ljava/lang/String; = "android.support.useSideChannel"

.field private static final KEY_ACTION_INTENT:Ljava/lang/String; = "actionIntent"

.field private static final KEY_EXTRAS:Ljava/lang/String; = "extras"

.field private static final KEY_ICON:Ljava/lang/String; = "icon"

.field private static final KEY_REMOTE_INPUTS:Ljava/lang/String; = "remoteInputs"

.field private static final KEY_TITLE:Ljava/lang/String; = "title"

.field public static final TAG:Ljava/lang/String; = "NotificationCompat"

.field private static sActionClass:Ljava/lang/Class;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/lang/Class",
            "<*>;"
        }
    .end annotation
.end field

.field private static sActionIconField:Ljava/lang/reflect/Field;

.field private static sActionIntentField:Ljava/lang/reflect/Field;

.field private static sActionTitleField:Ljava/lang/reflect/Field;

.field private static sActionsAccessFailed:Z

.field private static sActionsField:Ljava/lang/reflect/Field;

.field private static final sActionsLock:Ljava/lang/Object;

.field private static sExtrasField:Ljava/lang/reflect/Field;

.field private static sExtrasFieldAccessFailed:Z

.field private static final sExtrasLock:Ljava/lang/Object;

# direct methods
.method static constructor <clinit>()V
    .locals 1

    .prologue
    .line 52
    new-instance v0, Ljava/lang/Object;

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

    sput-object v0, Landroid/support/v4/app/NotificationCompatJellybean;->sExtrasLock:Ljava/lang/Object;

    .line 56
    new-instance v0, Ljava/lang/Object;

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

    sput-object v0, Landroid/support/v4/app/NotificationCompatJellybean;->sActionsLock:Ljava/lang/Object;

    .line 33
    return-void
.end method

.method constructor <init>()V
    .locals 0

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

    return-void
.end method

.method public static addBigPictureStyle(Landroid/support/v4/app/NotificationBuilderWithBuilderAccessor;Ljava/lang/CharSequence;ZLjava/lang/CharSequence;Landroid/graphics/Bitmap;Landroid/graphics/Bitmap;Z)V
    .locals 3
    .param p0, "b"    # Landroid/support/v4/app/NotificationBuilderWithBuilderAccessor;
    .param p1, "bigContentTitle"    # Ljava/lang/CharSequence;
    .param p2, "useSummary"    # Z
    .param p3, "summaryText"    # Ljava/lang/CharSequence;
    .param p4, "bigPicture"    # Landroid/graphics/Bitmap;
    .param p5, "bigLargeIcon"    # Landroid/graphics/Bitmap;
    .param p6, "bigLargeIconSet"    # Z

    .prologue
    .line 168
    new-instance v1, Landroid/app/Notification$BigPictureStyle;

    invoke-interface {p0}, Landroid/support/v4/app/NotificationBuilderWithBuilderAccessor;->getBuilder()Landroid/app/Notification$Builder;

    move-result-object v2

    invoke-direct {v1, v2}, Landroid/app/Notification$BigPictureStyle;-><init>(Landroid/app/Notification$Builder;)V

    invoke-virtual {v1, p1}, Landroid/app/Notification$BigPictureStyle;->setBigContentTitle(Ljava/lang/CharSequence;)Landroid/app/Notification$BigPictureStyle;

    move-result-object v1

    invoke-virtual {v1, p4}, Landroid/app/Notification$BigPictureStyle;->bigPicture(Landroid/graphics/Bitmap;)Landroid/app/Notification$BigPictureStyle;

    move-result-object v0

    .line 171
    .local v0, "style":Landroid/app/Notification$BigPictureStyle;
    if-eqz p6, :cond_0

    .line 172
    invoke-virtual {v0, p5}, Landroid/app/Notification$BigPictureStyle;->bigLargeIcon(Landroid/graphics/Bitmap;)Landroid/app/Notification$BigPictureStyle;

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

    .line 175
    invoke-virtual {v0, p3}, Landroid/app/Notification$BigPictureStyle;->setSummaryText(Ljava/lang/CharSequence;)Landroid/app/Notification$BigPictureStyle;

    .line 167
    :cond_1
    return-void
.end method

.method public static addBigTextStyle(Landroid/support/v4/app/NotificationBuilderWithBuilderAccessor;Ljava/lang/CharSequence;ZLjava/lang/CharSequence;Ljava/lang/CharSequence;)V
    .locals 3
    .param p0, "b"    # Landroid/support/v4/app/NotificationBuilderWithBuilderAccessor;
    .param p1, "bigContentTitle"    # Ljava/lang/CharSequence;
    .param p2, "useSummary"    # Z
    .param p3, "summaryText"    # Ljava/lang/CharSequence;
    .param p4, "bigText"    # Ljava/lang/CharSequence;

    .prologue
    .line 156
    new-instance v1, Landroid/app/Notification$BigTextStyle;

    invoke-interface {p0}, Landroid/support/v4/app/NotificationBuilderWithBuilderAccessor;->getBuilder()Landroid/app/Notification$Builder;

    move-result-object v2

    invoke-direct {v1, v2}, Landroid/app/Notification$BigTextStyle;-><init>(Landroid/app/Notification$Builder;)V

    invoke-virtual {v1, p1}, Landroid/app/Notification$BigTextStyle;->setBigContentTitle(Ljava/lang/CharSequence;)Landroid/app/Notification$BigTextStyle;

    move-result-object v1

    invoke-virtual {v1, p4}, Landroid/app/Notification$BigTextStyle;->bigText(Ljava/lang/CharSequence;)Landroid/app/Notification$BigTextStyle;

    move-result-object v0

    .line 159
    .local v0, "style":Landroid/app/Notification$BigTextStyle;
    if-eqz p2, :cond_0

    .line 160
    invoke-virtual {v0, p3}, Landroid/app/Notification$BigTextStyle;->setSummaryText(Ljava/lang/CharSequence;)Landroid/app/Notification$BigTextStyle;

    .line 155
    :cond_0
    return-void
.end method

.method public static addInboxStyle(Landroid/support/v4/app/NotificationBuilderWithBuilderAccessor;Ljava/lang/CharSequence;ZLjava/lang/CharSequence;Ljava/util/ArrayList;)V
    .locals 5
    .param p0, "b"    # Landroid/support/v4/app/NotificationBuilderWithBuilderAccessor;
    .param p1, "bigContentTitle"    # Ljava/lang/CharSequence;
    .param p2, "useSummary"    # Z
    .param p3, "summaryText"    # Ljava/lang/CharSequence;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Landroid/support/v4/app/NotificationBuilderWithBuilderAccessor;",
            "Ljava/lang/CharSequence;",
            "Z",
            "Ljava/lang/CharSequence;",
            "Ljava/util/ArrayList",
            "<",
            "Ljava/lang/CharSequence;",
            ">;)V"
        }
    .end annotation

    .prologue
    .line 182
    .local p4, "texts":Ljava/util/ArrayList;, "Ljava/util/ArrayList<Ljava/lang/CharSequence;>;"
    new-instance v3, Landroid/app/Notification$InboxStyle;

    invoke-interface {p0}, Landroid/support/v4/app/NotificationBuilderWithBuilderAccessor;->getBuilder()Landroid/app/Notification$Builder;

    move-result-object v4

    invoke-direct {v3, v4}, Landroid/app/Notification$InboxStyle;-><init>(Landroid/app/Notification$Builder;)V

    invoke-virtual {v3, p1}, Landroid/app/Notification$InboxStyle;->setBigContentTitle(Ljava/lang/CharSequence;)Landroid/app/Notification$InboxStyle;

    move-result-object v0

    .line 184
    .local v0, "style":Landroid/app/Notification$InboxStyle;
    if-eqz p2, :cond_0

    .line 185
    invoke-virtual {v0, p3}, Landroid/app/Notification$InboxStyle;->setSummaryText(Ljava/lang/CharSequence;)Landroid/app/Notification$InboxStyle;

    .line 187
    :cond_0
    invoke-interface {p4}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;

    move-result-object v2

    .local v2, "text$iterator":Ljava/util/Iterator;
    :goto_0
    invoke-interface {v2}, Ljava/util/Iterator;->hasNext()Z

    move-result v3

    if-eqz v3, :cond_1

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

    move-result-object v1

    check-cast v1, Ljava/lang/CharSequence;

    .line 188
    .local v1, "text":Ljava/lang/CharSequence;
    invoke-virtual {v0, v1}, Landroid/app/Notification$InboxStyle;->addLine(Ljava/lang/CharSequence;)Landroid/app/Notification$InboxStyle;

    goto :goto_0

    .line 181
    .end local v1    # "text":Ljava/lang/CharSequence;
    :cond_1
    return-void
.end method

.method public static buildActionExtrasMap(Ljava/util/List;)Landroid/util/SparseArray;
    .locals 4
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/List",
            "<",
            "Landroid/os/Bundle;",
            ">;)",
            "Landroid/util/SparseArray",
            "<",
            "Landroid/os/Bundle;",
            ">;"
        }
    .end annotation

    .prologue
    .line 194
    .local p0, "actionExtrasList":Ljava/util/List;, "Ljava/util/List<Landroid/os/Bundle;>;"
    const/4 v1, 0x0

    .line 195
    .local v1, "actionExtrasMap":Landroid/util/SparseArray;, "Landroid/util/SparseArray<Landroid/os/Bundle;>;"
    const/4 v3, 0x0

    .local v3, "i":I
    invoke-interface {p0}, Ljava/util/List;->size()I

    move-result v2

    .end local v1    # "actionExtrasMap":Landroid/util/SparseArray;, "Landroid/util/SparseArray<Landroid/os/Bundle;>;"
    .local v2, "count":I
    :goto_0
    if-ge v3, v2, :cond_2

    .line 196
    invoke-interface {p0, v3}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/os/Bundle;

    .line 197
    .local v0, "actionExtras":Landroid/os/Bundle;
    if-eqz v0, :cond_1

    .line 198
    if-nez v1, :cond_0

    .line 199
    new-instance v1, Landroid/util/SparseArray;

    invoke-direct {v1}, Landroid/util/SparseArray;-><init>()V

    .line 201
    :cond_0
    invoke-virtual {v1, v3, v0}, Landroid/util/SparseArray;->put(ILjava/lang/Object;)V

    .line 195
    :cond_1
    add-int/lit8 v3, v3, 0x1

    goto :goto_0

    .line 204
    .end local v0    # "actionExtras":Landroid/os/Bundle;
    :cond_2
    return-object v1
.end method

.method private static ensureActionReflectionReadyLocked()Z
    .locals 6

    .prologue
    const/4 v2, 0x0

    const/4 v3, 0x1

    .line 318
    sget-boolean v4, Landroid/support/v4/app/NotificationCompatJellybean;->sActionsAccessFailed:Z

    if-eqz v4, :cond_0

    .line 319
    return v2

    .line 322
    :cond_0
    :try_start_0
    sget-object v4, Landroid/support/v4/app/NotificationCompatJellybean;->sActionsField:Ljava/lang/reflect/Field;

    if-nez v4, :cond_1

    .line 323
    const-string/jumbo v4, "android.app.Notification$Action"

    invoke-static {v4}, Ljava/lang/Class;->forName(Ljava/lang/String;)Ljava/lang/Class;

    move-result-object v4

    sput-object v4, Landroid/support/v4/app/NotificationCompatJellybean;->sActionClass:Ljava/lang/Class;

    .line 324
    sget-object v4, Landroid/support/v4/app/NotificationCompatJellybean;->sActionClass:Ljava/lang/Class;

    const-string/jumbo v5, "icon"

    invoke-virtual {v4, v5}, Ljava/lang/Class;->getDeclaredField(Ljava/lang/String;)Ljava/lang/reflect/Field;

    move-result-object v4

    sput-object v4, Landroid/support/v4/app/NotificationCompatJellybean;->sActionIconField:Ljava/lang/reflect/Field;

    .line 325
    sget-object v4, Landroid/support/v4/app/NotificationCompatJellybean;->sActionClass:Ljava/lang/Class;

    const-string/jumbo v5, "title"

    invoke-virtual {v4, v5}, Ljava/lang/Class;->getDeclaredField(Ljava/lang/String;)Ljava/lang/reflect/Field;

    move-result-object v4

    sput-object v4, Landroid/support/v4/app/NotificationCompatJellybean;->sActionTitleField:Ljava/lang/reflect/Field;

    .line 326
    sget-object v4, Landroid/support/v4/app/NotificationCompatJellybean;->sActionClass:Ljava/lang/Class;

    const-string/jumbo v5, "actionIntent"

    invoke-virtual {v4, v5}, Ljava/lang/Class;->getDeclaredField(Ljava/lang/String;)Ljava/lang/reflect/Field;

    move-result-object v4

    sput-object v4, Landroid/support/v4/app/NotificationCompatJellybean;->sActionIntentField:Ljava/lang/reflect/Field;

    .line 327
    const-class v4, Landroid/app/Notification;

    const-string/jumbo v5, "actions"

    invoke-virtual {v4, v5}, Ljava/lang/Class;->getDeclaredField(Ljava/lang/String;)Ljava/lang/reflect/Field;

    move-result-object v4

    sput-object v4, Landroid/support/v4/app/NotificationCompatJellybean;->sActionsField:Ljava/lang/reflect/Field;

    .line 328
    sget-object v4, Landroid/support/v4/app/NotificationCompatJellybean;->sActionsField:Ljava/lang/reflect/Field;

    const/4 v5, 0x1

    invoke-virtual {v4, v5}, Ljava/lang/reflect/Field;->setAccessible(Z)V
    :try_end_0
    .catch Ljava/lang/ClassNotFoundException; {:try_start_0 .. :try_end_0} :catch_1
    .catch Ljava/lang/NoSuchFieldException; {:try_start_0 .. :try_end_0} :catch_0

    .line 337
    :cond_1
    :goto_0
    sget-boolean v4, Landroid/support/v4/app/NotificationCompatJellybean;->sActionsAccessFailed:Z

    if-eqz v4, :cond_2

    :goto_1
    return v2

    .line 333
    :catch_0
    move-exception v1

    .line 334
    .local v1, "e":Ljava/lang/NoSuchFieldException;
    const-string/jumbo v4, "NotificationCompat"

    const-string/jumbo v5, "Unable to access notification actions"

    invoke-static {v4, v5, v1}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I

    .line 335
    sput-boolean v3, Landroid/support/v4/app/NotificationCompatJellybean;->sActionsAccessFailed:Z

    goto :goto_0

    .line 330
    .end local v1    # "e":Ljava/lang/NoSuchFieldException;
    :catch_1
    move-exception v0

    .line 331
    .local v0, "e":Ljava/lang/ClassNotFoundException;
    const-string/jumbo v4, "NotificationCompat"

    const-string/jumbo v5, "Unable to access notification actions"

    invoke-static {v4, v5, v0}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I

    .line 332
    sput-boolean v3, Landroid/support/v4/app/NotificationCompatJellybean;->sActionsAccessFailed:Z

    goto :goto_0

    .end local v0    # "e":Ljava/lang/ClassNotFoundException;
    :cond_2
    move v2, v3

    .line 337
    goto :goto_1
.end method

.method public static getAction(Landroid/app/Notification;ILandroid/support/v4/app/NotificationCompatBase$Action$Factory;Landroid/support/v4/app/RemoteInputCompatBase$RemoteInput$Factory;)Landroid/support/v4/app/NotificationCompatBase$Action;
    .locals 12
    .param p0, "notif"    # Landroid/app/Notification;
    .param p1, "actionIndex"    # I
    .param p2, "factory"    # Landroid/support/v4/app/NotificationCompatBase$Action$Factory;
    .param p3, "remoteInputFactory"    # Landroid/support/v4/app/RemoteInputCompatBase$RemoteInput$Factory;

    .prologue
    const/4 v11, 0x0

    .line 277
    sget-object v10, Landroid/support/v4/app/NotificationCompatJellybean;->sActionsLock:Ljava/lang/Object;

    monitor-enter v10

    .line 279
    :try_start_0
    invoke-static {p0}, Landroid/support/v4/app/NotificationCompatJellybean;->getActionObjectsLocked(Landroid/app/Notification;)[Ljava/lang/Object;

    move-result-object v0

    aget-object v7, v0, p1

    .line 280
    .local v7, "actionObject":Ljava/lang/Object;
    const/4 v5, 0x0

    .line 281
    .local v5, "actionExtras":Landroid/os/Bundle;
    invoke-static {p0}, Landroid/support/v4/app/NotificationCompatJellybean;->getExtras(Landroid/app/Notification;)Landroid/os/Bundle;

    move-result-object v9

    .line 282
    .local v9, "extras":Landroid/os/Bundle;
    if-eqz v9, :cond_0

    .line 284
    const-string/jumbo v0, "android.support.actionExtras"

    .line 283
    invoke-virtual {v9, v0}, Landroid/os/Bundle;->getSparseParcelableArray(Ljava/lang/String;)Landroid/util/SparseArray;

    move-result-object v6

    .line 285
    .local v6, "actionExtrasMap":Landroid/util/SparseArray;, "Landroid/util/SparseArray<Landroid/os/Bundle;>;"
    if-eqz v6, :cond_0

    .line 286
    invoke-virtual {v6, p1}, Landroid/util/SparseArray;->get(I)Ljava/lang/Object;

    move-result-object v5

    .end local v5    # "actionExtras":Landroid/os/Bundle;
    check-cast v5, Landroid/os/Bundle;

    .line 290
    .end local v6    # "actionExtrasMap":Landroid/util/SparseArray;, "Landroid/util/SparseArray<Landroid/os/Bundle;>;"
    :cond_0
    sget-object v0, Landroid/support/v4/app/NotificationCompatJellybean;->sActionIconField:Ljava/lang/reflect/Field;

    invoke-virtual {v0, v7}, Ljava/lang/reflect/Field;->getInt(Ljava/lang/Object;)I

    move-result v2

    .line 291
    sget-object v0, Landroid/support/v4/app/NotificationCompatJellybean;->sActionTitleField:Ljava/lang/reflect/Field;

    invoke-virtual {v0, v7}, Ljava/lang/reflect/Field;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v3

    check-cast v3, Ljava/lang/CharSequence;

    .line 292
    sget-object v0, Landroid/support/v4/app/NotificationCompatJellybean;->sActionIntentField:Ljava/lang/reflect/Field;

    invoke-virtual {v0, v7}, Ljava/lang/reflect/Field;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v4

    check-cast v4, Landroid/app/PendingIntent;

    move-object v0, p2

    move-object v1, p3

    .line 289
    invoke-static/range {v0 .. v5}, Landroid/support/v4/app/NotificationCompatJellybean;->readAction(Landroid/support/v4/app/NotificationCompatBase$Action$Factory;Landroid/support/v4/app/RemoteInputCompatBase$RemoteInput$Factory;ILjava/lang/CharSequence;Landroid/app/PendingIntent;Landroid/os/Bundle;)Landroid/support/v4/app/NotificationCompatBase$Action;
    :try_end_0
    .catch Ljava/lang/IllegalAccessException; {:try_start_0 .. :try_end_0} :catch_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    move-result-object v0

    monitor-exit v10

    return-object v0

    .line 294
    .end local v7    # "actionObject":Ljava/lang/Object;
    .end local v9    # "extras":Landroid/os/Bundle;
    :catch_0
    move-exception v8

    .line 295
    .local v8, "e":Ljava/lang/IllegalAccessException;
    :try_start_1
    const-string/jumbo v0, "NotificationCompat"

    const-string/jumbo v1, "Unable to access notification actions"

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

    .line 296
    const/4 v0, 0x1

    sput-boolean v0, Landroid/support/v4/app/NotificationCompatJellybean;->sActionsAccessFailed:Z
    :try_end_1
    .catchall {:try_start_1 .. :try_end_1} :catchall_0

    monitor-exit v10

    .line 299
    return-object v11

    .line 277
    .end local v8    # "e":Ljava/lang/IllegalAccessException;
    :catchall_0
    move-exception v0

    monitor-exit v10

    throw v0
.end method

.method public static getActionCount(Landroid/app/Notification;)I
    .locals 3
    .param p0, "notif"    # Landroid/app/Notification;

    .prologue
    .line 268
    sget-object v2, Landroid/support/v4/app/NotificationCompatJellybean;->sActionsLock:Ljava/lang/Object;

    monitor-enter v2

    .line 269
    :try_start_0
    invoke-static {p0}, Landroid/support/v4/app/NotificationCompatJellybean;->getActionObjectsLocked(Landroid/app/Notification;)[Ljava/lang/Object;

    move-result-object v0

    .line 270
    .local v0, "actionObjects":[Ljava/lang/Object;
    if-eqz v0, :cond_0

    array-length v1, v0
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    :goto_0
    monitor-exit v2

    return v1

    :cond_0
    const/4 v1, 0x0

    goto :goto_0

    .line 268
    .end local v0    # "actionObjects":[Ljava/lang/Object;
    :catchall_0
    move-exception v1

    monitor-exit v2

    throw v1
.end method

.method private static getActionFromBundle(Landroid/os/Bundle;Landroid/support/v4/app/NotificationCompatBase$Action$Factory;Landroid/support/v4/app/RemoteInputCompatBase$RemoteInput$Factory;)Landroid/support/v4/app/NotificationCompatBase$Action;
    .locals 6
    .param p0, "bundle"    # Landroid/os/Bundle;
    .param p1, "actionFactory"    # Landroid/support/v4/app/NotificationCompatBase$Action$Factory;
    .param p2, "remoteInputFactory"    # Landroid/support/v4/app/RemoteInputCompatBase$RemoteInput$Factory;

    .prologue
    .line 359
    const-string/jumbo v0, "icon"

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

    move-result v1

    .line 360
    const-string/jumbo v0, "title"

    invoke-virtual {p0, v0}, Landroid/os/Bundle;->getCharSequence(Ljava/lang/String;)Ljava/lang/CharSequence;

    move-result-object v2

    .line 361
    const-string/jumbo v0, "actionIntent"

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

    move-result-object v3

    check-cast v3, Landroid/app/PendingIntent;

    .line 362
    const-string/jumbo v0, "extras"

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

    move-result-object v4

    .line 364
    const-string/jumbo v0, "remoteInputs"

    invoke-static {p0, v0}, Landroid/support/v4/app/BundleUtil;->getBundleArrayFromBundle(Landroid/os/Bundle;Ljava/lang/String;)[Landroid/os/Bundle;

    move-result-object v0

    .line 363
    invoke-static {v0, p2}, Landroid/support/v4/app/RemoteInputCompatJellybean;->fromBundleArray([Landroid/os/Bundle;Landroid/support/v4/app/RemoteInputCompatBase$RemoteInput$Factory;)[Landroid/support/v4/app/RemoteInputCompatBase$RemoteInput;

    move-result-object v5

    move-object v0, p1

    .line 358
    invoke-interface/range {v0 .. v5}, Landroid/support/v4/app/NotificationCompatBase$Action$Factory;->build(ILjava/lang/CharSequence;Landroid/app/PendingIntent;Landroid/os/Bundle;[Landroid/support/v4/app/RemoteInputCompatBase$RemoteInput;)Landroid/support/v4/app/NotificationCompatBase$Action;

    move-result-object v0

    return-object v0
.end method

.method private static getActionObjectsLocked(Landroid/app/Notification;)[Ljava/lang/Object;
    .locals 5
    .param p0, "notif"    # Landroid/app/Notification;

    .prologue
    const/4 v4, 0x0

    .line 303
    sget-object v2, Landroid/support/v4/app/NotificationCompatJellybean;->sActionsLock:Ljava/lang/Object;

    monitor-enter v2

    .line 304
    :try_start_0
    invoke-static {}, Landroid/support/v4/app/NotificationCompatJellybean;->ensureActionReflectionReadyLocked()Z
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    move-result v1

    if-nez v1, :cond_0

    monitor-exit v2

    .line 305
    return-object v4

    .line 308
    :cond_0
    :try_start_1
    sget-object v1, Landroid/support/v4/app/NotificationCompatJellybean;->sActionsField:Ljava/lang/reflect/Field;

    invoke-virtual {v1, p0}, Ljava/lang/reflect/Field;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, [Ljava/lang/Object;
    :try_end_1
    .catch Ljava/lang/IllegalAccessException; {:try_start_1 .. :try_end_1} :catch_0
    .catchall {:try_start_1 .. :try_end_1} :catchall_0

    monitor-exit v2

    return-object v1

    .line 309
    :catch_0
    move-exception v0

    .line 310
    .local v0, "e":Ljava/lang/IllegalAccessException;
    :try_start_2
    const-string/jumbo v1, "NotificationCompat"

    const-string/jumbo v3, "Unable to access notification actions"

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

    .line 311
    const/4 v1, 0x1

    sput-boolean v1, Landroid/support/v4/app/NotificationCompatJellybean;->sActionsAccessFailed:Z
    :try_end_2
    .catchall {:try_start_2 .. :try_end_2} :catchall_0

    monitor-exit v2

    .line 312
    return-object v4

    .line 303
    .end local v0    # "e":Ljava/lang/IllegalAccessException;
    :catchall_0
    move-exception v1

    monitor-exit v2

    throw v1
.end method

.method public static getActionsFromParcelableArrayList(Ljava/util/ArrayList;Landroid/support/v4/app/NotificationCompatBase$Action$Factory;Landroid/support/v4/app/RemoteInputCompatBase$RemoteInput$Factory;)[Landroid/support/v4/app/NotificationCompatBase$Action;
    .locals 3
    .param p1, "actionFactory"    # Landroid/support/v4/app/NotificationCompatBase$Action$Factory;
    .param p2, "remoteInputFactory"    # Landroid/support/v4/app/RemoteInputCompatBase$RemoteInput$Factory;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/ArrayList",
            "<",
            "Landroid/os/Parcelable;",
            ">;",
            "Landroid/support/v4/app/NotificationCompatBase$Action$Factory;",
            "Landroid/support/v4/app/RemoteInputCompatBase$RemoteInput$Factory;",
            ")[",
            "Landroid/support/v4/app/NotificationCompatBase$Action;"
        }
    .end annotation

    .prologue
    .local p0, "parcelables":Ljava/util/ArrayList;, "Ljava/util/ArrayList<Landroid/os/Parcelable;>;"
    const/4 v2, 0x0

    .line 344
    if-nez p0, :cond_0

    .line 345
    return-object v2

    .line 347
    :cond_0
    invoke-virtual {p0}, Ljava/util/ArrayList;->size()I

    move-result v2

    invoke-interface {p1, v2}, Landroid/support/v4/app/NotificationCompatBase$Action$Factory;->newArray(I)[Landroid/support/v4/app/NotificationCompatBase$Action;

    move-result-object v0

    .line 348
    .local v0, "actions":[Landroid/support/v4/app/NotificationCompatBase$Action;
    const/4 v1, 0x0

    .local v1, "i":I
    :goto_0
    array-length v2, v0

    if-ge v1, v2, :cond_1

    .line 349
    invoke-virtual {p0, v1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Landroid/os/Bundle;

    invoke-static {v2, p1, p2}, Landroid/support/v4/app/NotificationCompatJellybean;->getActionFromBundle(Landroid/os/Bundle;Landroid/support/v4/app/NotificationCompatBase$Action$Factory;Landroid/support/v4/app/RemoteInputCompatBase$RemoteInput$Factory;)Landroid/support/v4/app/NotificationCompatBase$Action;

    move-result-object v2

    aput-object v2, v0, v1

    .line 348
    add-int/lit8 v1, v1, 0x1

    goto :goto_0

    .line 352
    :cond_1
    return-object v0
.end method

.method private static getBundleForAction(Landroid/support/v4/app/NotificationCompatBase$Action;)Landroid/os/Bundle;
    .locals 3
    .param p0, "action"    # Landroid/support/v4/app/NotificationCompatBase$Action;

    .prologue
    .line 381
    new-instance v0, Landroid/os/Bundle;

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

    .line 382
    .local v0, "bundle":Landroid/os/Bundle;
    const-string/jumbo v1, "icon"

    invoke-virtual {p0}, Landroid/support/v4/app/NotificationCompatBase$Action;->getIcon()I

    move-result v2

    invoke-virtual {v0, v1, v2}, Landroid/os/Bundle;->putInt(Ljava/lang/String;I)V

    .line 383
    const-string/jumbo v1, "title"

    invoke-virtual {p0}, Landroid/support/v4/app/NotificationCompatBase$Action;->getTitle()Ljava/lang/CharSequence;

    move-result-object v2

    invoke-virtual {v0, v1, v2}, Landroid/os/Bundle;->putCharSequence(Ljava/lang/String;Ljava/lang/CharSequence;)V

    .line 384
    const-string/jumbo v1, "actionIntent"

    invoke-virtual {p0}, Landroid/support/v4/app/NotificationCompatBase$Action;->getActionIntent()Landroid/app/PendingIntent;

    move-result-object v2

    invoke-virtual {v0, v1, v2}, Landroid/os/Bundle;->putParcelable(Ljava/lang/String;Landroid/os/Parcelable;)V

    .line 385
    const-string/jumbo v1, "extras"

    invoke-virtual {p0}, Landroid/support/v4/app/NotificationCompatBase$Action;->getExtras()Landroid/os/Bundle;

    move-result-object v2

    invoke-virtual {v0, v1, v2}, Landroid/os/Bundle;->putBundle(Ljava/lang/String;Landroid/os/Bundle;)V

    .line 386
    const-string/jumbo v1, "remoteInputs"

    .line 387
    invoke-virtual {p0}, Landroid/support/v4/app/NotificationCompatBase$Action;->getRemoteInputs()[Landroid/support/v4/app/RemoteInputCompatBase$RemoteInput;

    move-result-object v2

    .line 386
    invoke-static {v2}, Landroid/support/v4/app/RemoteInputCompatJellybean;->toBundleArray([Landroid/support/v4/app/RemoteInputCompatBase$RemoteInput;)[Landroid/os/Bundle;

    move-result-object v2

    invoke-virtual {v0, v1, v2}, Landroid/os/Bundle;->putParcelableArray(Ljava/lang/String;[Landroid/os/Parcelable;)V

    .line 388
    return-object v0
.end method

.method public static getExtras(Landroid/app/Notification;)Landroid/os/Bundle;
    .locals 8
    .param p0, "notif"    # Landroid/app/Notification;

    .prologue
    const/4 v7, 0x0

    .line 212
    sget-object v5, Landroid/support/v4/app/NotificationCompatJellybean;->sExtrasLock:Ljava/lang/Object;

    monitor-enter v5

    .line 213
    :try_start_0
    sget-boolean v4, Landroid/support/v4/app/NotificationCompatJellybean;->sExtrasFieldAccessFailed:Z
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    if-eqz v4, :cond_0

    monitor-exit v5

    .line 214
    return-object v7

    .line 217
    :cond_0
    :try_start_1
    sget-object v4, Landroid/support/v4/app/NotificationCompatJellybean;->sExtrasField:Ljava/lang/reflect/Field;

    if-nez v4, :cond_2

    .line 218
    const-class v4, Landroid/app/Notification;

    const-string/jumbo v6, "extras"

    invoke-virtual {v4, v6}, Ljava/lang/Class;->getDeclaredField(Ljava/lang/String;)Ljava/lang/reflect/Field;

    move-result-object v3

    .line 219
    .local v3, "extrasField":Ljava/lang/reflect/Field;
    const-class v4, Landroid/os/Bundle;

    invoke-virtual {v3}, Ljava/lang/reflect/Field;->getType()Ljava/lang/Class;

    move-result-object v6

    invoke-virtual {v4, v6}, Ljava/lang/Class;->isAssignableFrom(Ljava/lang/Class;)Z

    move-result v4

    if-nez v4, :cond_1

    .line 220
    const-string/jumbo v4, "NotificationCompat"

    const-string/jumbo v6, "Notification.extras field is not of type Bundle"

    invoke-static {v4, v6}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I

    .line 221
    const/4 v4, 0x1

    sput-boolean v4, Landroid/support/v4/app/NotificationCompatJellybean;->sExtrasFieldAccessFailed:Z
    :try_end_1
    .catch Ljava/lang/IllegalAccessException; {:try_start_1 .. :try_end_1} :catch_1
    .catch Ljava/lang/NoSuchFieldException; {:try_start_1 .. :try_end_1} :catch_0
    .catchall {:try_start_1 .. :try_end_1} :catchall_0

    monitor-exit v5

    .line 222
    return-object v7

    .line 224
    :cond_1
    const/4 v4, 0x1

    :try_start_2
    invoke-virtual {v3, v4}, Ljava/lang/reflect/Field;->setAccessible(Z)V

    .line 225
    sput-object v3, Landroid/support/v4/app/NotificationCompatJellybean;->sExtrasField:Ljava/lang/reflect/Field;

    .line 227
    .end local v3    # "extrasField":Ljava/lang/reflect/Field;
    :cond_2
    sget-object v4, Landroid/support/v4/app/NotificationCompatJellybean;->sExtrasField:Ljava/lang/reflect/Field;

    invoke-virtual {v4, p0}, Ljava/lang/reflect/Field;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Landroid/os/Bundle;

    .line 228
    .local v2, "extras":Landroid/os/Bundle;
    if-nez v2, :cond_3

    .line 229
    new-instance v2, Landroid/os/Bundle;

    .end local v2    # "extras":Landroid/os/Bundle;
    invoke-direct {v2}, Landroid/os/Bundle;-><init>()V

    .line 230
    .restart local v2    # "extras":Landroid/os/Bundle;
    sget-object v4, Landroid/support/v4/app/NotificationCompatJellybean;->sExtrasField:Ljava/lang/reflect/Field;

    invoke-virtual {v4, p0, v2}, Ljava/lang/reflect/Field;->set(Ljava/lang/Object;Ljava/lang/Object;)V
    :try_end_2
    .catch Ljava/lang/IllegalAccessException; {:try_start_2 .. :try_end_2} :catch_1
    .catch Ljava/lang/NoSuchFieldException; {:try_start_2 .. :try_end_2} :catch_0
    .catchall {:try_start_2 .. :try_end_2} :catchall_0

    :cond_3
    monitor-exit v5

    .line 232
    return-object v2

    .line 235
    .end local v2    # "extras":Landroid/os/Bundle;
    :catch_0
    move-exception v1

    .line 236
    .local v1, "e":Ljava/lang/NoSuchFieldException;
    :try_start_3
    const-string/jumbo v4, "NotificationCompat"

    const-string/jumbo v6, "Unable to access notification extras"

    invoke-static {v4, v6, v1}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I

    .line 238
    .end local v1    # "e":Ljava/lang/NoSuchFieldException;
    :goto_0
    const/4 v4, 0x1

    sput-boolean v4, Landroid/support/v4/app/NotificationCompatJellybean;->sExtrasFieldAccessFailed:Z
    :try_end_3
    .catchall {:try_start_3 .. :try_end_3} :catchall_0

    monitor-exit v5

    .line 239
    return-object v7

    .line 233
    :catch_1
    move-exception v0

    .line 234
    .local v0, "e":Ljava/lang/IllegalAccessException;
    :try_start_4
    const-string/jumbo v4, "NotificationCompat"

    const-string/jumbo v6, "Unable to access notification extras"

    invoke-static {v4, v6, v0}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
    :try_end_4
    .catchall {:try_start_4 .. :try_end_4} :catchall_0

    goto :goto_0

    .line 212
    .end local v0    # "e":Ljava/lang/IllegalAccessException;
    :catchall_0
    move-exception v4

    monitor-exit v5

    throw v4
.end method

.method public static getGroup(Landroid/app/Notification;)Ljava/lang/String;
    .locals 2
    .param p0, "n"    # Landroid/app/Notification;

    .prologue
    .line 396
    invoke-static {p0}, Landroid/support/v4/app/NotificationCompatJellybean;->getExtras(Landroid/app/Notification;)Landroid/os/Bundle;

    move-result-object v0

    const-string/jumbo v1, "android.support.groupKey"

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

    move-result-object v0

    return-object v0
.end method

.method public static getLocalOnly(Landroid/app/Notification;)Z
    .locals 2
    .param p0, "notif"    # Landroid/app/Notification;

    .prologue
    .line 392
    invoke-static {p0}, Landroid/support/v4/app/NotificationCompatJellybean;->getExtras(Landroid/app/Notification;)Landroid/os/Bundle;

    move-result-object v0

    const-string/jumbo v1, "android.support.localOnly"

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

    move-result v0

    return v0
.end method

.method public static getParcelableArrayListForActions([Landroid/support/v4/app/NotificationCompatBase$Action;)Ljava/util/ArrayList;
    .locals 5
    .param p0, "actions"    # [Landroid/support/v4/app/NotificationCompatBase$Action;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "([",
            "Landroid/support/v4/app/NotificationCompatBase$Action;",
            ")",
            "Ljava/util/ArrayList",
            "<",
            "Landroid/os/Parcelable;",
            ">;"
        }
    .end annotation

    .prologue
    const/4 v2, 0x0

    .line 370
    if-nez p0, :cond_0

    .line 371
    return-object v2

    .line 373
    :cond_0
    new-instance v1, Ljava/util/ArrayList;

    array-length v2, p0

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

    .line 374
    .local v1, "parcelables":Ljava/util/ArrayList;, "Ljava/util/ArrayList<Landroid/os/Parcelable;>;"
    const/4 v2, 0x0

    array-length v3, p0

    :goto_0
    if-ge v2, v3, :cond_1

    aget-object v0, p0, v2

    .line 375
    .local v0, "action":Landroid/support/v4/app/NotificationCompatBase$Action;
    invoke-static {v0}, Landroid/support/v4/app/NotificationCompatJellybean;->getBundleForAction(Landroid/support/v4/app/NotificationCompatBase$Action;)Landroid/os/Bundle;

    move-result-object v4

    invoke-virtual {v1, v4}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    .line 374
    add-int/lit8 v2, v2, 0x1

    goto :goto_0

    .line 377
    .end local v0    # "action":Landroid/support/v4/app/NotificationCompatBase$Action;
    :cond_1
    return-object v1
.end method

.method public static getSortKey(Landroid/app/Notification;)Ljava/lang/String;
    .locals 2
    .param p0, "n"    # Landroid/app/Notification;

    .prologue
    .line 404
    invoke-static {p0}, Landroid/support/v4/app/NotificationCompatJellybean;->getExtras(Landroid/app/Notification;)Landroid/os/Bundle;

    move-result-object v0

    const-string/jumbo v1, "android.support.sortKey"

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

    move-result-object v0

    return-object v0
.end method

.method public static isGroupSummary(Landroid/app/Notification;)Z
    .locals 2
    .param p0, "n"    # Landroid/app/Notification;

    .prologue
    .line 400
    invoke-static {p0}, Landroid/support/v4/app/NotificationCompatJellybean;->getExtras(Landroid/app/Notification;)Landroid/os/Bundle;

    move-result-object v0

    const-string/jumbo v1, "android.support.isGroupSummary"

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

    move-result v0

    return v0
.end method

.method public static readAction(Landroid/support/v4/app/NotificationCompatBase$Action$Factory;Landroid/support/v4/app/RemoteInputCompatBase$RemoteInput$Factory;ILjava/lang/CharSequence;Landroid/app/PendingIntent;Landroid/os/Bundle;)Landroid/support/v4/app/NotificationCompatBase$Action;
    .locals 6
    .param p0, "factory"    # Landroid/support/v4/app/NotificationCompatBase$Action$Factory;
    .param p1, "remoteInputFactory"    # Landroid/support/v4/app/RemoteInputCompatBase$RemoteInput$Factory;
    .param p2, "icon"    # I
    .param p3, "title"    # Ljava/lang/CharSequence;
    .param p4, "actionIntent"    # Landroid/app/PendingIntent;
    .param p5, "extras"    # Landroid/os/Bundle;

    .prologue
    .line 247
    const/4 v5, 0x0

    .line 248
    .local v5, "remoteInputs":[Landroid/support/v4/app/RemoteInputCompatBase$RemoteInput;
    if-eqz p5, :cond_0

    .line 250
    const-string/jumbo v0, "android.support.remoteInputs"

    invoke-static {p5, v0}, Landroid/support/v4/app/BundleUtil;->getBundleArrayFromBundle(Landroid/os/Bundle;Ljava/lang/String;)[Landroid/os/Bundle;

    move-result-object v0

    .line 249
    invoke-static {v0, p1}, Landroid/support/v4/app/RemoteInputCompatJellybean;->fromBundleArray([Landroid/os/Bundle;Landroid/support/v4/app/RemoteInputCompatBase$RemoteInput$Factory;)[Landroid/support/v4/app/RemoteInputCompatBase$RemoteInput;

    move-result-object v5

    .end local v5    # "remoteInputs":[Landroid/support/v4/app/RemoteInputCompatBase$RemoteInput;
    :cond_0
    move-object v0, p0

    move v1, p2

    move-object v2, p3

    move-object v3, p4

    move-object v4, p5

    .line 253
    invoke-interface/range {v0 .. v5}, Landroid/support/v4/app/NotificationCompatBase$Action$Factory;->build(ILjava/lang/CharSequence;Landroid/app/PendingIntent;Landroid/os/Bundle;[Landroid/support/v4/app/RemoteInputCompatBase$RemoteInput;)Landroid/support/v4/app/NotificationCompatBase$Action;

    move-result-object v0

    return-object v0
.end method

.method public static writeActionAndGetExtras(Landroid/app/Notification$Builder;Landroid/support/v4/app/NotificationCompatBase$Action;)Landroid/os/Bundle;
    .locals 4
    .param p0, "builder"    # Landroid/app/Notification$Builder;
    .param p1, "action"    # Landroid/support/v4/app/NotificationCompatBase$Action;

    .prologue
    .line 258
    invoke-virtual {p1}, Landroid/support/v4/app/NotificationCompatBase$Action;->getIcon()I

    move-result v1

    invoke-virtual {p1}, Landroid/support/v4/app/NotificationCompatBase$Action;->getTitle()Ljava/lang/CharSequence;

    move-result-object v2

    invoke-virtual {p1}, Landroid/support/v4/app/NotificationCompatBase$Action;->getActionIntent()Landroid/app/PendingIntent;

    move-result-object v3

    invoke-virtual {p0, v1, v2, v3}, Landroid/app/Notification$Builder;->addAction(ILjava/lang/CharSequence;Landroid/app/PendingIntent;)Landroid/app/Notification$Builder;

    .line 259
    new-instance v0, Landroid/os/Bundle;

    invoke-virtual {p1}, Landroid/support/v4/app/NotificationCompatBase$Action;->getExtras()Landroid/os/Bundle;

    move-result-object v1

    invoke-direct {v0, v1}, Landroid/os/Bundle;-><init>(Landroid/os/Bundle;)V

    .line 260
    .local v0, "actionExtras":Landroid/os/Bundle;
    invoke-virtual {p1}, Landroid/support/v4/app/NotificationCompatBase$Action;->getRemoteInputs()[Landroid/support/v4/app/RemoteInputCompatBase$RemoteInput;

    move-result-object v1

    if-eqz v1, :cond_0

    .line 261
    const-string/jumbo v1, "android.support.remoteInputs"

    .line 262
    invoke-virtual {p1}, Landroid/support/v4/app/NotificationCompatBase$Action;->getRemoteInputs()[Landroid/support/v4/app/RemoteInputCompatBase$RemoteInput;

    move-result-object v2

    invoke-static {v2}, Landroid/support/v4/app/RemoteInputCompatJellybean;->toBundleArray([Landroid/support/v4/app/RemoteInputCompatBase$RemoteInput;)[Landroid/os/Bundle;

    move-result-object v2

    .line 261
    invoke-virtual {v0, v1, v2}, Landroid/os/Bundle;->putParcelableArray(Ljava/lang/String;[Landroid/os/Parcelable;)V

    .line 264
    :cond_0
    return-object v0
.end method


text:
enum ElementType {
	Image = 'image',
	Note = 'note',
	Colors = 'colors',
	Link = 'link',
}

export default ElementType