Skip to content

Instantly share code, notes, and snippets.

diff --git a/services/java/com/android/server/PrivacyTelephonyRegistry.java b/services/java/com/android/server/PrivacyTelephonyRegistry.java
index 15ddea7..2a0a5df 100644
--- a/services/java/com/android/server/PrivacyTelephonyRegistry.java
+++ b/services/java/com/android/server/PrivacyTelephonyRegistry.java
@@ -57,18 +57,27 @@ public class PrivacyTelephonyRegistry extends TelephonyRegistry{
private static final int PERMISSION_CALL_STATE = 3;
private static final int PERMISSION_SERVICE_STATE = 4;
+
+ private Context _context;
@mateor
mateor / b_tree.py
Created November 12, 2014 23:17
A simple B-Tree in Python that supports insert, search and print.
# coding=utf-8
"""
author = Mateor
PYTHON 3.3.5
"""
from __future__ import (nested_scopes, generators, division, absolute_import, with_statement,
print_function, unicode_literals)
@mateor
mateor / keybase.md
Created January 12, 2015 20:04
verify keybase

Keybase proof

I hereby claim:

  • I am mateor on github.
  • I am mateor (https://keybase.io/mateor) on keybase.
  • I have a public key whose fingerprint is B2E3 CE48 59B5 5A57 F4DC 829B 4A79 DE3C 7E00 104E

To claim this, I am signing this object:

@mateor
mateor / ci output
Last active August 29, 2015 14:13
ci errors
~/development/pants$ ./build-support/bin/ci.sh
[== CI BEGINS ==]
[== Bootstrapping pants ==]
*** Running pants in dev mode from /Users/mateor/development/pants/src/python/pants/bin/pants_exe.py ***
Bootstrapping pants_deps with requirements:
/Users/mateor/development/pants/3rdparty/python/requirements.txt
@mateor
mateor / ivysettings.xml
Created March 24, 2015 17:37
Pants ivysettings.xml that works with local Android SDK
<?xml version="1.0"?>
<!--
Copyright 2014 Pants project contributors (see CONTRIBUTORS.md).
Licensed under the Apache License, Version 2.0 (see LICENSE).
-->
<ivysettings>
<property name="root.dir" value="${ivy.settings.dir}/../.." override="false"/>
<property name="ivy.cache.dir" value="${user.home}/.ivy2/pants" override="false"/>
<properties file="${root.dir}/build.properties" override="false"/>
[ -n "${VAR##[NFnf]*}" ] && echo '$VAR must be truthy (but will be considered falsey by default, if empty)'
[ -z "${VAR##[YTyt]*}" ] && echo '$VAR must be truthy (and will be by default, if empty)'
[ -z "${VAR##[NFnf]*}" ] && echo '$VAR must be falsey (and will be by default, if empty)'
[ -n "${VAR##[YTyt]*}" ] && echo '$VAR must be falsey (but will be considered truthy by default, if empty)'
@mateor
mateor / ivysettings.xml
Created April 10, 2015 08:21
Ivysettings with google and android m2 repos from the Android SDK.
<?xml version="1.0"?>
<!--
Copyright 2014 Pants project contributors (see CONTRIBUTORS.md).
Licensed under the Apache License, Version 2.0 (see LICENSE).
-->
<ivysettings>
<property name="root.dir" value="${ivy.settings.dir}/../.." override="false"/>
<property name="ivy.cache.dir" value="${user.home}/.ivy2/pants" override="false"/>
<properties file="${root.dir}/build.properties" override="false"/>
@mateor
mateor / ivysettings.xml
Created May 22, 2015 18:04
Simple ivysettings.xml to interact with Android SDk (Google libraries and Android Support libraries)
<?xml version="1.0"?>
<!--
Copyright 2015 Pants project contributors (see CONTRIBUTORS.md).
Licensed under the Apache License, Version 2.0 (see LICENSE).
-->
<ivysettings>
<properties environment="env" />
<property name="env.ANDROID_HOME" value="/please-export-your-ANDROID_HOME" override="false"/>
<property name="android.repo.dir" value="${env.ANDROID_HOME}/extras/android/m2repository"/>
@mateor
mateor / pants_exe._run()
Created September 27, 2015 23:22
python profiling in pants snippet. Install guppy into the virtual env (env/bin/pip install guppy).
def _run(exiter):
# We want to present warnings to the user, set this up early to ensure all warnings are seen.
# The "default" action displays a warning for a particular file and line number exactly once.
# See https://docs.python.org/2/library/warnings.html#the-warnings-filter for the complete action
# list.
warnings.simplefilter('default')
# Bootstrap options and logging.
options, build_config = OptionsInitializer().setup()
@mateor
mateor / gist:3a4657a459215c3ef144
Created November 20, 2015 18:48
class file for org.apache.thrift.TBase not found.
mateo:pants mateo$ git log
commit 3484a8f26dac7177097b394a765649791a03ba43
Author: Matt Olsen <[email protected]>
Date: Fri Nov 20 10:23:31 2015 -0800
Isolate .pex dir
Ensure that we don't interfere with the users .pex directory in case
they use pex outside of pants.