Skip to content

Commit

Permalink
update to 9.1.4
Browse files Browse the repository at this point in the history
  • Loading branch information
xaxtix committed Nov 20, 2022
1 parent 4951061 commit 9bd017a
Show file tree
Hide file tree
Showing 66 changed files with 1,196 additions and 406 deletions.
6 changes: 3 additions & 3 deletions TMessagesProj/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ dependencies {
implementation 'androidx.exifinterface:exifinterface:1.3.3'
implementation 'androidx.dynamicanimation:dynamicanimation:1.0.0'
implementation 'androidx.multidex:multidex:2.0.1'
implementation "androidx.sharetarget:sharetarget:1.1.0"
implementation "androidx.sharetarget:sharetarget:1.2.0"

compileOnly 'org.checkerframework:checker-qual:2.5.2'
compileOnly 'org.checkerframework:checker-compat-qual:2.5.0'
Expand Down Expand Up @@ -79,8 +79,8 @@ android {
defaultConfig.versionCode = Integer.parseInt(APP_VERSION_CODE)

defaultConfig {
minSdkVersion 16
targetSdkVersion 30
minSdkVersion 19
targetSdkVersion 31
versionName "8.9.0"

vectorDrawables.generatedDensities = ['mdpi', 'hdpi', 'xhdpi', 'xxhdpi']
Expand Down
6 changes: 4 additions & 2 deletions TMessagesProj/config/debug/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.SCHEDULE_EXACT_ALARM"/>

<permission android:name="${applicationId}.permission.MAPS_RECEIVE" android:protectionLevel="signature"/>

Expand All @@ -31,7 +32,7 @@
<meta-data android:name="com.google.android.maps.v2.API_KEY" android:value="AIzaSyA-t0jLPjUt2FxrA8VPK2EiYHcYcboIR6k" />

<service
android:name="org.telegram.messenger.GcmPushListenerService">
android:name="org.telegram.messenger.GcmPushListenerService" android:exported="true">
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter>
Expand All @@ -45,7 +46,8 @@
<receiver
tools:replace="android:enabled"
android:name="com.google.android.gms.measurement.AppMeasurementReceiver"
android:enabled="false">
android:enabled="false"
android:exported="false">
<intent-filter>
<action android:name="com.google.android.gms.measurement.UPLOAD" />
</intent-filter>
Expand Down
5 changes: 3 additions & 2 deletions TMessagesProj/config/debug/AndroidManifest_SDK23.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
<meta-data android:name="com.google.android.maps.v2.API_KEY" android:value="AIzaSyA-t0jLPjUt2FxrA8VPK2EiYHcYcboIR6k" />

<service
android:name="org.telegram.messenger.GcmPushListenerService">
android:name="org.telegram.messenger.GcmPushListenerService" android:exported="true">
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter>
Expand All @@ -48,7 +48,8 @@
<receiver
tools:replace="android:enabled"
android:name="com.google.android.gms.measurement.AppMeasurementReceiver"
android:enabled="false">
android:enabled="false"
android:exported="false">
<intent-filter>
<action android:name="com.google.android.gms.measurement.UPLOAD" />
</intent-filter>
Expand Down
6 changes: 4 additions & 2 deletions TMessagesProj/config/release/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.SCHEDULE_EXACT_ALARM"/>

<permission android:name="${applicationId}.permission.MAPS_RECEIVE" android:protectionLevel="signature"/>

Expand All @@ -31,7 +32,7 @@
<meta-data android:name="com.google.android.maps.v2.API_KEY" android:value="AIzaSyA-t0jLPjUt2FxrA8VPK2EiYHcYcboIR6k" />

<service
android:name="org.telegram.messenger.GcmPushListenerService">
android:name="org.telegram.messenger.GcmPushListenerService" android:exported="true">
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter>
Expand All @@ -45,7 +46,8 @@
<receiver
tools:replace="android:enabled"
android:name="com.google.android.gms.measurement.AppMeasurementReceiver"
android:enabled="false">
android:enabled="false"
android:exported="false">
<intent-filter>
<action android:name="com.google.android.gms.measurement.UPLOAD" />
</intent-filter>
Expand Down
6 changes: 4 additions & 2 deletions TMessagesProj/config/release/AndroidManifest_SDK23.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@
<meta-data android:name="com.google.android.maps.v2.API_KEY" android:value="AIzaSyA-t0jLPjUt2FxrA8VPK2EiYHcYcboIR6k" />

<service
android:name="org.telegram.messenger.GcmPushListenerService">
android:name="org.telegram.messenger.GcmPushListenerService"
android:exported="true">
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter>
Expand All @@ -48,7 +49,8 @@
<receiver
tools:replace="android:enabled"
android:name="com.google.android.gms.measurement.AppMeasurementReceiver"
android:enabled="false">
android:enabled="false"
android:exported="false">
<intent-filter>
<action android:name="com.google.android.gms.measurement.UPLOAD" />
</intent-filter>
Expand Down
5 changes: 3 additions & 2 deletions TMessagesProj/config/release/AndroidManifest_standalone.xml
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@
<meta-data android:name="com.google.android.maps.v2.API_KEY" android:value="AIzaSyA-t0jLPjUt2FxrA8VPK2EiYHcYcboIR6k" />

<service
android:name="org.telegram.messenger.GcmPushListenerService">
android:name="org.telegram.messenger.GcmPushListenerService" android:exported="true">
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter>
Expand All @@ -128,7 +128,8 @@
<receiver
tools:replace="android:enabled"
android:name="com.google.android.gms.measurement.AppMeasurementReceiver"
android:enabled="false">
android:enabled="false"
android:exported="false">
<intent-filter>
<action android:name="com.google.android.gms.measurement.UPLOAD" />
</intent-filter>
Expand Down
37 changes: 22 additions & 15 deletions TMessagesProj/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,8 @@
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|uiMode"
android:hardwareAccelerated="@bool/useHardwareAcceleration"
android:launchMode="singleTask"
android:windowSoftInputMode="adjustResize">
android:windowSoftInputMode="adjustResize"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
</intent-filter>
Expand Down Expand Up @@ -251,7 +252,8 @@
<activity-alias
android:name="org.telegram.ui.CallsActivity"
android:targetActivity="org.telegram.ui.LaunchActivity"
android:permission="android.permission.CALL_PHONE">
android:permission="android.permission.CALL_PHONE"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.DEFAULT"/>
Expand All @@ -274,7 +276,8 @@
android:windowSoftInputMode="adjustPan"
android:excludeFromRecents="true"
android:stateNotNeeded="true"
android:theme="@style/Theme.TMessages.Transparent">
android:theme="@style/Theme.TMessages.Transparent"
android:exported="true">
<intent-filter android:icon="@mipmap/ic_launcher" android:roundIcon="@mipmap/ic_launcher_round" android:priority="1">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.BROWSABLE" />
Expand All @@ -286,7 +289,8 @@
android:name="org.telegram.ui.ExternalActionActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|uiMode"
android:hardwareAccelerated="@bool/useHardwareAcceleration"
android:windowSoftInputMode="adjustPan">
android:windowSoftInputMode="adjustPan"
android:exported="true">
<intent-filter android:icon="@mipmap/ic_launcher" android:roundIcon="@mipmap/ic_launcher_round">
<action android:name="org.telegram.passport.AUTHORIZE"/>
<category android:name="android.intent.category.DEFAULT"/>
Expand All @@ -296,7 +300,8 @@
android:name="org.telegram.ui.ChatsWidgetConfigActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|uiMode"
android:hardwareAccelerated="@bool/useHardwareAcceleration"
android:windowSoftInputMode="adjustPan">
android:windowSoftInputMode="adjustPan"
android:exported="true">
<intent-filter android:icon="@mipmap/ic_launcher" android:roundIcon="@mipmap/ic_launcher_round">
<action android:name="android.appwidget.action.APPWIDGET_CONFIGURE"/>
</intent-filter>
Expand All @@ -305,7 +310,8 @@
android:name="org.telegram.ui.ContactsWidgetConfigActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|uiMode"
android:hardwareAccelerated="@bool/useHardwareAcceleration"
android:windowSoftInputMode="adjustPan">
android:windowSoftInputMode="adjustPan"
android:exported="true">
<intent-filter android:icon="@mipmap/ic_launcher" android:roundIcon="@mipmap/ic_launcher_round">
<action android:name="android.appwidget.action.APPWIDGET_CONFIGURE"/>
</intent-filter>
Expand Down Expand Up @@ -377,7 +383,7 @@
</intent-filter>
</receiver>

<receiver android:name=".CallReceiver">
<receiver android:name=".CallReceiver" android:exported="false">
<intent-filter>
<action android:name="android.intent.action.PHONE_STATE"/>
</intent-filter>
Expand All @@ -404,28 +410,29 @@
<service android:name=".KeepAliveJob"
android:exported="false"
android:permission="android.permission.BIND_JOB_SERVICE"/>
<service android:name=".BringAppForegroundService" android:enabled="true"/>
<service android:name=".NotificationsService" android:enabled="true"/>
<service android:name=".BringAppForegroundService" android:enabled="true" android:exported="true"/>
<service android:name=".NotificationsService" android:enabled="true" android:exported="true"/>
<service android:name=".NotificationRepeat" android:exported="false"/>
<service android:name=".VideoEncodingService" android:enabled="true"/>
<service android:name=".ImportingService" android:enabled="true"/>
<service android:name=".VideoEncodingService" android:enabled="true" android:exported="true"/>
<service android:name=".ImportingService" android:enabled="true" android:exported="true"/>
<service android:name=".LocationSharingService"
android:foregroundServiceType="location"
android:enabled="true"/>
android:enabled="true"
android:exported="true"/>
<service android:name=".voip.VoIPService" android:enabled="true" android:foregroundServiceType="mediaProjection|camera|microphone|mediaPlayback"/>
<service android:name=".MusicPlayerService" android:exported="true" android:enabled="true" android:foregroundServiceType="mediaPlayback"/>
<service android:name=".MusicBrowserService" android:exported="true">
<intent-filter>
<action android:name="android.media.browse.MediaBrowserService"/>
</intent-filter>
</service>
<service android:name=".voip.TelegramConnectionService" android:permission="android.permission.BIND_TELECOM_CONNECTION_SERVICE">
<service android:name=".voip.TelegramConnectionService" android:permission="android.permission.BIND_TELECOM_CONNECTION_SERVICE" android:exported="true">
<intent-filter>
<action android:name="android.telecom.ConnectionService" />
</intent-filter>
</service>

<receiver android:name=".MusicPlayerReceiver" >
<receiver android:name=".MusicPlayerReceiver" android:exported="false">
<intent-filter>
<action android:name="org.telegram.android.musicplayer.close" />
<action android:name="org.telegram.android.musicplayer.pause" />
Expand All @@ -442,7 +449,7 @@
</intent-filter>
</receiver>

<receiver android:name=".AppStartReceiver" android:enabled="true">
<receiver android:name=".AppStartReceiver" android:enabled="true" android:exported="false">
<intent-filter>
<action android:name="org.telegram.start" />
<action android:name="android.intent.action.BOOT_COMPLETED" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ public static void startPushService() {
} else {
applicationContext.stopService(new Intent(applicationContext, NotificationsService.class));

PendingIntent pintent = PendingIntent.getService(applicationContext, 0, new Intent(applicationContext, NotificationsService.class), 0);
PendingIntent pintent = PendingIntent.getService(applicationContext, 0, new Intent(applicationContext, NotificationsService.class), PendingIntent.FLAG_MUTABLE);
AlarmManager alarm = (AlarmManager)applicationContext.getSystemService(Context.ALARM_SERVICE);
alarm.cancel(pintent);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ public class BuildVars {
public static boolean USE_CLOUD_STRINGS = true;
public static boolean CHECK_UPDATES = true;
public static boolean NO_SCOPED_STORAGE = Build.VERSION.SDK_INT <= 29;
public static int BUILD_VERSION = 2917;
public static String BUILD_VERSION_STRING = "9.1.3";
public static int BUILD_VERSION = 2927;
public static String BUILD_VERSION_STRING = "9.1.4";
public static int APP_ID = 4;
public static String APP_HASH = "014b35b6184100b085b0d0572f9b5103";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ public static void updateWidget(Context context, AppWidgetManager appWidgetManag
intent.setAction("com.tmessages.openchat" + Math.random() + Integer.MAX_VALUE);
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
intent.addCategory(Intent.CATEGORY_LAUNCHER);
PendingIntent contentIntent = PendingIntent.getActivity(ApplicationLoader.applicationContext, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT);
PendingIntent contentIntent = PendingIntent.getActivity(ApplicationLoader.applicationContext, 0, intent, PendingIntent.FLAG_MUTABLE | PendingIntent.FLAG_UPDATE_CURRENT);

rv.setPendingIntentTemplate(R.id.list_view, contentIntent);
appWidgetManager.updateAppWidget(appWidgetId, rv);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@

import androidx.collection.LongSparseArray;

import com.google.android.exoplayer2.util.Log;

import org.telegram.tgnet.TLRPC;
import org.telegram.ui.ActionBar.Theme;
import org.telegram.ui.Components.AvatarDrawable;
Expand Down Expand Up @@ -350,6 +352,8 @@ public RemoteViews getViewAt(int position) {
fillInIntent.putExtras(extras);
rv.setOnClickFillInIntent(R.id.shortcut_widget_item, fillInIntent);

Log.d("kek", "kek " + name);

rv.setViewVisibility(R.id.shortcut_widget_item_divider, position == getCount() ? View.GONE : View.VISIBLE);

return rv;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ public static void updateWidget(Context context, AppWidgetManager appWidgetManag
intent.setAction("com.tmessages.openchat" + Math.random() + Integer.MAX_VALUE);
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
intent.addCategory(Intent.CATEGORY_LAUNCHER);
PendingIntent contentIntent = PendingIntent.getActivity(ApplicationLoader.applicationContext, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT);
PendingIntent contentIntent = PendingIntent.getActivity(ApplicationLoader.applicationContext, 0, intent, PendingIntent.FLAG_MUTABLE | PendingIntent.FLAG_UPDATE_CURRENT);

rv.setPendingIntentTemplate(R.id.list_view, contentIntent);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@

import androidx.collection.LongSparseArray;

import com.google.android.exoplayer2.util.Log;

import org.telegram.tgnet.TLRPC;
import org.telegram.ui.ActionBar.Theme;
import org.telegram.ui.Components.AvatarDrawable;
Expand Down Expand Up @@ -201,6 +203,8 @@ public RemoteViews getViewAt(int position) {
}
extras.putInt("currentAccount", accountInstance.getCurrentAccount());

Log.d("kek", "kek " + name);

Intent fillInIntent = new Intent();
fillInIntent.putExtras(extras);
rv.setOnClickFillInIntent(a == 0 ? R.id.contacts_widget_item1 : R.id.contacts_widget_item2, fillInIntent);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,14 @@ public static void updateWidget(Context context, AppWidgetManager appWidgetManag
intent2.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, appWidgetId);
intent2.setData(Uri.parse(intent2.toUri(Intent.URI_INTENT_SCHEME)));
RemoteViews rv = new RemoteViews(context.getPackageName(), R.layout.feed_widget_layout);
rv.setRemoteAdapter(appWidgetId, R.id.list_view, intent2);
rv.setRemoteAdapter(R.id.list_view, intent2);
rv.setEmptyView(R.id.list_view, R.id.empty_view);

Intent intent = new Intent(ApplicationLoader.applicationContext, LaunchActivity.class);
intent.setAction("com.tmessages.openchat" + Math.random() + Integer.MAX_VALUE);
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
intent.addCategory(Intent.CATEGORY_LAUNCHER);
PendingIntent contentIntent = PendingIntent.getActivity(ApplicationLoader.applicationContext, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT);
PendingIntent contentIntent = PendingIntent.getActivity(ApplicationLoader.applicationContext, 0, intent, PendingIntent.FLAG_MUTABLE | PendingIntent.FLAG_UPDATE_CURRENT);

rv.setPendingIntentTemplate(R.id.list_view, contentIntent);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;

import org.telegram.SQLite.SQLiteException;
import org.telegram.messenger.time.FastDateFormat;
import org.telegram.messenger.video.MediaCodecVideoConvertor;
import org.telegram.tgnet.TLObject;
Expand Down Expand Up @@ -308,6 +309,9 @@ public static void e(final Throwable e, boolean logToAppCenter) {
}
if (BuildVars.DEBUG_VERSION && needSent(e) && logToAppCenter) {
AndroidUtilities.appCenterLog(e);
}
if (BuildVars.DEBUG_VERSION && e instanceof SQLiteException && e.getMessage() != null && e.getMessage().contains("disk image is malformed")) {

}
ensureInitied();
e.printStackTrace();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,6 @@ public String getPath(long documentId, int dc, int type, boolean useQueue) {

CountDownLatch syncLatch = new CountDownLatch(1);
String[] res = new String[1];
long time = System.currentTimeMillis();

dispatchQueue.postRunnable(() -> {
if (database != null) {
Expand Down
Loading

0 comments on commit 9bd017a

Please sign in to comment.