Skip to content

Instantly share code, notes, and snippets.

View victorkifer's full-sized avatar

Viktor Kifer victorkifer

View GitHub Profile
@victorkifer
victorkifer / IExtendedNetworkService.aidl
Created March 6, 2014 07:56
IExtendedNetworkService.aidl should be in com.android.internal.telephony package
package com.android.internal.telephony;
/**
* Interface used to interact with extended MMI/USSD network service.
*/
interface IExtendedNetworkService {
/**
* Set a MMI/USSD command to ExtendedNetworkService for further process.
* This should be called when a MMI command is placed from panel.
* @param number the dialed MMI/USSD number.
public int pointToPosition(int x, int y) {
ArrayList<CarouselItem> fitting = new ArrayList<CarouselItem>();
for(int i = 0; i < mAdapter.getCount(); i++){
CarouselItem item = (CarouselItem)getChildAt(i);
Matrix mm = item.getCIMatrix();
float[] pts = new float[3];
@victorkifer
victorkifer / USSDNetworkService.java
Created January 25, 2014 13:19
USSDNetworkService used to replace Android default one and get USSD messages results.
package com.username.ussd;
import android.app.Service;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.IBinder;
import android.os.RemoteException;
import android.preference.PreferenceManager;
import android.util.Log;