I hereby claim:
- I am markshiz on github.
- I am markshiz (https://keybase.io/markshiz) on keybase.
- I have a public key ASCH_7_0dtevFVMv6Yg16FbN4yYxOIRXAZ7QKhUzdktQ0go
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| /* | |
| * Copyright (C) 2013 Square, Inc. | |
| * | |
| * Licensed under the Apache License, Version 2.0 (the "License"); | |
| * you may not use this file except in compliance with the License. | |
| * You may obtain a copy of the License at | |
| * | |
| * http://www.apache.org/licenses/LICENSE-2.0 | |
| * | |
| * Unless required by applicable law or agreed to in writing, software |
| require 'i18n' | |
| module Rack | |
| class Locale | |
| def initialize(app) | |
| @app = app | |
| end | |
| def call(env) | |
| old_locale = I18n.locale |
| import android.content.Context; | |
| import android.text.SpannableStringBuilder; | |
| import android.text.Spanned; | |
| import android.util.AttributeSet; | |
| import android.util.Log; | |
| import android.widget.TextView; | |
| import com.github.jobs.BuildConfig; | |
| import java.util.ArrayList; | |
| import java.util.List; |
| - (BOOL)isEqual:(id)object { | |
| if ( [object isMemberOfClass:self.class] ) { | |
| unsigned int count; | |
| Ivar* ivars = class_copyIvarList(self.class, &count); | |
| for(unsigned int i = 0; i < count; ++i) { | |
| NSObject* lhs = object_getIvar(self, ivars[i]); | |
| NSObject* rhs = object_getIvar(object, ivars[i]); | |
| if ( [lhs isKindOfClass:NSObject.class] && [rhs isKindOfClass:NSObject.class] ) { | |
| if ( ![lhs isEqual:rhs] ) { | |
| free(ivars); |