Loading GmsApi @ c43facae Compare c0c4a78e to c43facae Original line number Diff line number Diff line Subproject commit c0c4a78eab3064cdd7545cb7fcdddfe93ca1674d Subproject commit c43facae3dba6fcf4139c6a36e3a6f364d6db057 play-services-core/src/main/AndroidManifest.xml +14 −2 Original line number Diff line number Diff line Loading @@ -148,6 +148,10 @@ android:name="org.microg.gms.gcm.mcs.McsService" android:exported="true" /> <service android:name="com.google.android.gms.gcm.http.GoogleHttpService" android:exported="true" /> <!-- DroidGuard --> <service Loading Loading @@ -228,10 +232,10 @@ android:excludeFromRecents="true" /> <service android:name=".auth.GetToken" android:name="com.google.android.gms.auth.GetToken" android:exported="true" /> <activity android:name=".auth.TokenActivity" android:name="com.google.android.gms.auth.TokenActivity" android:exported="true" /> <!-- Other --> Loading Loading @@ -268,5 +272,13 @@ <action android:name="com.google.android.gms.analytics.service.START" /> </intent-filter> </service> <service android:name="org.microg.gms.playlog.PlayLogService" android:exported="true"> <intent-filter> <action android:name="com.google.android.gms.playlog.service.START" /> </intent-filter> </service> </application> </manifest> play-services-core/src/main/java/com/google/android/gms/gcm/http/GoogleHttpService.java 0 → 100644 +37 −0 Original line number Diff line number Diff line /* * Copyright 2013-2015 µg Project Team * * 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 * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.android.gms.gcm.http; import android.app.Service; import android.content.Intent; import android.os.Bundle; import android.os.IBinder; import android.os.RemoteException; import com.google.android.gms.http.IGoogleHttpService; public class GoogleHttpService extends Service { @Override public IBinder onBind(Intent intent) { return new IGoogleHttpService.Stub() { @Override public Bundle checkUrl(String url) throws RemoteException { return null; // allow } }.asBinder(); } } play-services-core/src/main/java/org/microg/gms/auth/AskPermissionActivity.java +2 −2 Original line number Diff line number Diff line Loading @@ -105,7 +105,7 @@ public class AskPermissionActivity extends AccountAuthenticatorActivity { } CharSequence appLabel = packageManager.getApplicationLabel(applicationInfo); Drawable appIcon = packageManager.getApplicationIcon(applicationInfo); Bitmap profileIcon = PeopleManager.getUserPicture(this, account, false); Bitmap profileIcon = PeopleManager.getOwnerAvatarBitmap(this, account.name, false); // receive profile icon if (profileIcon != null) { Loading @@ -114,7 +114,7 @@ public class AskPermissionActivity extends AccountAuthenticatorActivity { new Thread(new Runnable() { @Override public void run() { final Bitmap profileIcon = PeopleManager.getUserPicture(AskPermissionActivity.this, account, true); final Bitmap profileIcon = PeopleManager.getOwnerAvatarBitmap(AskPermissionActivity.this, account.name, true); runOnUiThread(new Runnable() { @Override public void run() { Loading play-services-core/src/main/java/org/microg/gms/people/DatabaseHelper.java +22 −2 Original line number Diff line number Diff line Loading @@ -23,7 +23,7 @@ import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteOpenHelper; public class DatabaseHelper extends SQLiteOpenHelper { private static final int DB_VERSION = 1; private static final int DB_VERSION = 2; private static final String DB_NAME = "pluscontacts.db"; private static final String CREATE_OWNERS = "CREATE TABLE owners (" + "_id INTEGER PRIMARY KEY AUTOINCREMENT," + Loading @@ -47,7 +47,21 @@ public class DatabaseHelper extends SQLiteOpenHelper { "sync_circles_to_contacts INTEGER NOT NULL DEFAULT 0," + // 0 "sync_evergreen_to_contacts INTEGER NOT NULL DEFAULT 0," + // 0 "last_full_people_sync_time INTEGER NOT NULL DEFAULT 0);"; // timestamp private static final String CREATE_CIRCLES = "CREATE TABLE circles (" + "_id INTEGER PRIMARY KEY AUTOINCREMENT," + "owner_id INTEGER NOT NULL," + "circle_id TEXT NOT NULL," + "name TEXT,sort_key TEXT," + "type INTEGER NOT NULL," + "for_sharing INTEGER NOT NULL DEFAULT 0," + "people_count INTEGER NOT NULL DEFAULT -1," + "client_policies INTEGER NOT NULL DEFAULT 0," + "etag TEXT,last_modified INTEGER NOT NULL DEFAULT 0," + "sync_to_contacts INTEGER NOT NULL DEFAULT 0," + "UNIQUE (owner_id,circle_id)," + "FOREIGN KEY (owner_id) REFERENCES owners(_id) ON DELETE CASCADE);"; public static final String OWNERS_TABLE = "owners"; public static final String CIRCLES_TABLE = "circles"; public DatabaseHelper(Context context) { Loading @@ -61,7 +75,7 @@ public class DatabaseHelper extends SQLiteOpenHelper { @Override public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { if (oldVersion < 2) db.execSQL(CREATE_CIRCLES); } @Override Loading @@ -80,4 +94,10 @@ public class DatabaseHelper extends SQLiteOpenHelper { public Cursor getOwner(String accountName) { return getReadableDatabase().query(OWNERS_TABLE, null, "account_name=?", new String[]{accountName}, null, null, null); } public Cursor getCircles(int ownerId, String circleId, int type) { return getReadableDatabase().query(CIRCLES_TABLE, null, "owner_id=?1 AND (circle_id = ?2 OR ?2 = '') AND (type = ?3 OR ?3 = -999 OR (?3 = -998 AND type = -1))", new String[]{Integer.toString(ownerId), circleId != null ? circleId : "", Integer.toString(type)}, null, null, null); } } Loading
GmsApi @ c43facae Compare c0c4a78e to c43facae Original line number Diff line number Diff line Subproject commit c0c4a78eab3064cdd7545cb7fcdddfe93ca1674d Subproject commit c43facae3dba6fcf4139c6a36e3a6f364d6db057
play-services-core/src/main/AndroidManifest.xml +14 −2 Original line number Diff line number Diff line Loading @@ -148,6 +148,10 @@ android:name="org.microg.gms.gcm.mcs.McsService" android:exported="true" /> <service android:name="com.google.android.gms.gcm.http.GoogleHttpService" android:exported="true" /> <!-- DroidGuard --> <service Loading Loading @@ -228,10 +232,10 @@ android:excludeFromRecents="true" /> <service android:name=".auth.GetToken" android:name="com.google.android.gms.auth.GetToken" android:exported="true" /> <activity android:name=".auth.TokenActivity" android:name="com.google.android.gms.auth.TokenActivity" android:exported="true" /> <!-- Other --> Loading Loading @@ -268,5 +272,13 @@ <action android:name="com.google.android.gms.analytics.service.START" /> </intent-filter> </service> <service android:name="org.microg.gms.playlog.PlayLogService" android:exported="true"> <intent-filter> <action android:name="com.google.android.gms.playlog.service.START" /> </intent-filter> </service> </application> </manifest>
play-services-core/src/main/java/com/google/android/gms/gcm/http/GoogleHttpService.java 0 → 100644 +37 −0 Original line number Diff line number Diff line /* * Copyright 2013-2015 µg Project Team * * 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 * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.android.gms.gcm.http; import android.app.Service; import android.content.Intent; import android.os.Bundle; import android.os.IBinder; import android.os.RemoteException; import com.google.android.gms.http.IGoogleHttpService; public class GoogleHttpService extends Service { @Override public IBinder onBind(Intent intent) { return new IGoogleHttpService.Stub() { @Override public Bundle checkUrl(String url) throws RemoteException { return null; // allow } }.asBinder(); } }
play-services-core/src/main/java/org/microg/gms/auth/AskPermissionActivity.java +2 −2 Original line number Diff line number Diff line Loading @@ -105,7 +105,7 @@ public class AskPermissionActivity extends AccountAuthenticatorActivity { } CharSequence appLabel = packageManager.getApplicationLabel(applicationInfo); Drawable appIcon = packageManager.getApplicationIcon(applicationInfo); Bitmap profileIcon = PeopleManager.getUserPicture(this, account, false); Bitmap profileIcon = PeopleManager.getOwnerAvatarBitmap(this, account.name, false); // receive profile icon if (profileIcon != null) { Loading @@ -114,7 +114,7 @@ public class AskPermissionActivity extends AccountAuthenticatorActivity { new Thread(new Runnable() { @Override public void run() { final Bitmap profileIcon = PeopleManager.getUserPicture(AskPermissionActivity.this, account, true); final Bitmap profileIcon = PeopleManager.getOwnerAvatarBitmap(AskPermissionActivity.this, account.name, true); runOnUiThread(new Runnable() { @Override public void run() { Loading
play-services-core/src/main/java/org/microg/gms/people/DatabaseHelper.java +22 −2 Original line number Diff line number Diff line Loading @@ -23,7 +23,7 @@ import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteOpenHelper; public class DatabaseHelper extends SQLiteOpenHelper { private static final int DB_VERSION = 1; private static final int DB_VERSION = 2; private static final String DB_NAME = "pluscontacts.db"; private static final String CREATE_OWNERS = "CREATE TABLE owners (" + "_id INTEGER PRIMARY KEY AUTOINCREMENT," + Loading @@ -47,7 +47,21 @@ public class DatabaseHelper extends SQLiteOpenHelper { "sync_circles_to_contacts INTEGER NOT NULL DEFAULT 0," + // 0 "sync_evergreen_to_contacts INTEGER NOT NULL DEFAULT 0," + // 0 "last_full_people_sync_time INTEGER NOT NULL DEFAULT 0);"; // timestamp private static final String CREATE_CIRCLES = "CREATE TABLE circles (" + "_id INTEGER PRIMARY KEY AUTOINCREMENT," + "owner_id INTEGER NOT NULL," + "circle_id TEXT NOT NULL," + "name TEXT,sort_key TEXT," + "type INTEGER NOT NULL," + "for_sharing INTEGER NOT NULL DEFAULT 0," + "people_count INTEGER NOT NULL DEFAULT -1," + "client_policies INTEGER NOT NULL DEFAULT 0," + "etag TEXT,last_modified INTEGER NOT NULL DEFAULT 0," + "sync_to_contacts INTEGER NOT NULL DEFAULT 0," + "UNIQUE (owner_id,circle_id)," + "FOREIGN KEY (owner_id) REFERENCES owners(_id) ON DELETE CASCADE);"; public static final String OWNERS_TABLE = "owners"; public static final String CIRCLES_TABLE = "circles"; public DatabaseHelper(Context context) { Loading @@ -61,7 +75,7 @@ public class DatabaseHelper extends SQLiteOpenHelper { @Override public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { if (oldVersion < 2) db.execSQL(CREATE_CIRCLES); } @Override Loading @@ -80,4 +94,10 @@ public class DatabaseHelper extends SQLiteOpenHelper { public Cursor getOwner(String accountName) { return getReadableDatabase().query(OWNERS_TABLE, null, "account_name=?", new String[]{accountName}, null, null, null); } public Cursor getCircles(int ownerId, String circleId, int type) { return getReadableDatabase().query(CIRCLES_TABLE, null, "owner_id=?1 AND (circle_id = ?2 OR ?2 = '') AND (type = ?3 OR ?3 = -999 OR (?3 = -998 AND type = -1))", new String[]{Integer.toString(ownerId), circleId != null ? circleId : "", Integer.toString(type)}, null, null, null); } }