Messaging: Remove unused or not required classes and methods

Change-Id: I28ebaecc503ee58c74fc8081162777f861dd4516
This commit is contained in:
Michael W
2025-04-12 10:10:00 +02:00
parent f0b25f0760
commit 2f9b1386f8
20 changed files with 10 additions and 475 deletions

View File

@@ -1,6 +1,6 @@
/*
* Copyright (C) 2015 The Android Open Source Project
* Copyright (C) 2024 The LineageOS Project
* Copyright (C) 2024-2025 The LineageOS Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -68,10 +68,6 @@ public class CompositeAdapter extends BaseAdapter {
public View getHeaderView(final View convertView, final ViewGroup parentView) {
return null;
}
public void close() {
// do nothing in base class.
}
}
private class Observer extends DataSetObserver {
@@ -116,56 +112,6 @@ public class CompositeAdapter extends BaseAdapter {
notifyDataSetChanged();
}
public void removePartition(final int index) {
final Partition partition = mPartitions[index];
partition.close();
System.arraycopy(mPartitions, index + 1, mPartitions, index,
mSize - index - 1);
mSize--;
partition.getAdapter().unregisterDataSetObserver(mObserver);
invalidate();
notifyDataSetChanged();
}
public void clearPartitions() {
for (int i = 0; i < mSize; i++) {
final Partition partition = mPartitions[i];
partition.close();
partition.getAdapter().unregisterDataSetObserver(mObserver);
}
invalidate();
notifyDataSetChanged();
}
public Partition getPartition(final int index) {
return mPartitions[index];
}
public int getPartitionAtPosition(final int position) {
ensureCacheValid();
int start = 0;
for (int i = 0; i < mSize; i++) {
final int end = start + mPartitions[i].getCount();
if (position >= start && position < end) {
int offset = position - start;
if (mPartitions[i].hasHeader() &&
(mPartitions[i].getCount() > 0 || mPartitions[i].showIfEmpty())) {
offset--;
}
if (offset == -1) {
return -1;
}
return i;
}
start = end;
}
return mSize - 1;
}
public int getPartitionCount() {
return mSize;
}
public void invalidate() {
mCacheValid = false;
}