api-impl: misc stubs for WhatsApp support

This commit is contained in:
Julian Winkler
2025-04-21 10:19:48 +02:00
parent f2065e31a4
commit 5de2c27abf
20 changed files with 96 additions and 2 deletions

View File

@@ -622,4 +622,8 @@ public class Activity extends ContextThemeWrapper implements Window.Callback, La
public int getChangingConfigurations() {
return 0;
}
public void finishAfterTransition() {
finish();
}
}

View File

@@ -10,6 +10,10 @@ public class ActivityOptions {
return new ActivityOptions();
}
public static ActivityOptions makeSceneTransitionAnimation(Activity activity, View view, String name) {
return new ActivityOptions();
}
public Bundle toBundle() {
return null;
}

View File

@@ -53,6 +53,8 @@ public class Notification implements Parcelable {
public Bundle extras;
public String category;
String text;
String title;
List<Action> actions = new ArrayList<Action>();

View File

@@ -118,4 +118,8 @@ public class NotificationManager {
public List<NotificationChannelGroup> getNotificationChannelGroups() {
return Collections.emptyList();
}
public boolean areNotificationsEnabled() {
return true;
}
}

View File

@@ -59,4 +59,12 @@ public class PendingIntent implements Parcelable {
public class CanceledException extends Exception {
}
public String getCreatorPackage() {
return Context.this_application.getPackageName();
}
public int getCreatorUid() {
return Context.this_application.getApplicationInfo().uid;
}
}

View File

@@ -46,6 +46,14 @@ public class JobInfo {
return this;
}
public Builder setRequiresBatteryNotLow(boolean requires_battery_not_low) {
return this;
}
public Builder setRequiresStorageNotLow(boolean requires_storage_not_low) {
return this;
}
public JobInfo build() {
return new JobInfo();
}