Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mm6.0 root #1

Open
wants to merge 31 commits into
base: mm6.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
f371188
Add support for QC's time_daemon
rmcc Oct 23, 2013
9c07313
Alarm: Don't use invalid timerfd alarm types
intervigilium Dec 8, 2015
4a35fc9
core: Reduce mutex contention in ActivityManager
Sep 11, 2015
dd426b9
Remove Qualcomm BoostFramework
Oct 31, 2015
9af6366
net: Don't spam logs when ConnectivityExt isn't available
Oct 18, 2015
c2c896a
geofence: Low power geofence HW implementation
Apr 10, 2014
c761a42
core: Don't enable qualcomm location overlay by default
mikeNG Nov 28, 2015
54786d3
Don't allow contact sharing by default for device not recognized as c…
Nov 11, 2015
37b1f37
DO NOT MERGE Ensure that the device is provisioned before showing Rec…
Nov 4, 2015
f0be13d
DO NOT MERGE SoundPool: add lock for findSample access from SoundPool…
xt0032rus Dec 1, 2015
73002c4
MediaRecorder: Add pause interface
Nov 7, 2015
c05531f
Merge tag 'android-6.0.1_r22' into HEAD
gmillz Mar 28, 2016
0c5d9ff
AppOps: track op persistence by name instead of id
sam3000 Oct 21, 2013
e4b9b8d
AppOpsService: Add MODE_ASK support to AppOps.
Jul 16, 2014
95aabb0
AppOps: Add support for AppOps policy file
Jul 17, 2014
ecfd19b
[1/2] frameworks/base: Privacy Guard
sam3000 Nov 15, 2014
bb45143
[1/2] Framework AppOps: Add per Op allowed and ignored counters
sam3000 Nov 25, 2014
9012a8d
wifi: Confirm user permission before toggling wifi
Sep 5, 2014
ee380ba
AppOps: Add Bluetooth enable control into AppOps
Sep 5, 2014
def809f
AppOps: Add BOOT_COMPLETED operation
Dec 4, 2013
b60318e
AppOps: Add nfc enable control into AppOps.
May 15, 2014
bca9131
AppOps: Add data connect control into AppOps
Jul 31, 2014
23b6f90
appops: Add support for SU
defer Dec 15, 2014
c322ea9
su: Add an indicator when a 'su' session is active
defer Dec 29, 2015
d3696c0
AppOps: fix wifi scan op
romanbb Oct 27, 2015
7203348
AppOps: add a default constructor
romanbb Oct 27, 2015
bb65bc3
Frameworks: Redirect appops strings to string references
sam3000 Dec 8, 2014
600cad9
appops: Disassociate appops requests from notification broadcasts
defer Jan 14, 2015
6b70f16
add missing app ops to string array
romanbb Oct 29, 2015
0fedc6c
AppOps: relax some system appops for systemui
romanbb Nov 2, 2015
5d1fc3f
core: temp metrics hack.
Oct 26, 2015
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
7 changes: 6 additions & 1 deletion Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ LOCAL_SRC_FILES += \
core/java/android/bluetooth/IBluetoothA2dpSink.aidl \
core/java/android/bluetooth/IBluetoothAvrcpController.aidl \
core/java/android/bluetooth/IBluetoothCallback.aidl \
core/java/android/bluetooth/IBluetoothProfileServiceConnection.aidl \
core/java/android/bluetooth/IBluetoothHeadset.aidl \
core/java/android/bluetooth/IBluetoothHeadsetPhone.aidl \
core/java/android/bluetooth/IBluetoothHealth.aidl \
Expand All @@ -117,9 +116,12 @@ LOCAL_SRC_FILES += \
core/java/android/bluetooth/IBluetoothSap.aidl \
core/java/android/bluetooth/IBluetoothStateChangeCallback.aidl \
core/java/android/bluetooth/IBluetoothHeadsetClient.aidl \
core/java/android/bluetooth/IBluetoothHidDevice.aidl \
core/java/android/bluetooth/IBluetoothHidDeviceCallback.aidl \
core/java/android/bluetooth/IBluetoothGatt.aidl \
core/java/android/bluetooth/IBluetoothGattCallback.aidl \
core/java/android/bluetooth/IBluetoothGattServerCallback.aidl \
core/java/android/bluetooth/IBluetoothDun.aidl \
core/java/android/content/IClipboard.aidl \
core/java/android/content/IContentService.aidl \
core/java/android/content/IIntentReceiver.aidl \
Expand Down Expand Up @@ -322,6 +324,8 @@ LOCAL_SRC_FILES += \
location/java/android/location/IGeofenceProvider.aidl \
location/java/android/location/IGpsMeasurementsListener.aidl \
location/java/android/location/IGpsNavigationMessageListener.aidl \
location/java/android/location/IGeoFencer.aidl \
location/java/android/location/IGeoFenceListener.aidl \
location/java/android/location/IGpsStatusListener.aidl \
location/java/android/location/IGpsStatusProvider.aidl \
location/java/android/location/ILocationListener.aidl \
Expand Down Expand Up @@ -405,6 +409,7 @@ LOCAL_SRC_FILES += \
telephony/java/com/android/internal/telephony/ITelephony.aidl \
telephony/java/com/android/internal/telephony/ITelephonyRegistry.aidl \
telephony/java/com/android/internal/telephony/IWapPushManager.aidl \
telephony/java/com/android/internal/telephony/IExtTelephony.aidl \
wifi/java/android/net/wifi/IWifiManager.aidl \
wifi/java/android/net/wifi/passpoint/IWifiPasspointManager.aidl \
wifi/java/android/net/wifi/p2p/IWifiP2pManager.aidl \
Expand Down
10 changes: 10 additions & 0 deletions cmds/bootanimation/BootAnimation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,16 @@ status_t BootAnimation::readyToRun() {
if (status)
return -1;

char value[PROPERTY_VALUE_MAX];
property_get("persist.panel.orientation", value, "0");
int orient = atoi(value)/90;
if (orient == eOrientation90 || orient == eOrientation270) {
int temp = dinfo.h;
dinfo.h = dinfo.w;
dinfo.w = temp;
}
Rect destRect(dinfo.w, dinfo.h);
mSession->setDisplayProjection(dtoken, orient, destRect, destRect);
// create the native surface
sp<SurfaceControl> control = session()->createSurface(String8("BootAnimation"),
dinfo.w, dinfo.h, PIXEL_FORMAT_RGB_565);
Expand Down
6 changes: 6 additions & 0 deletions cmds/bootanimation/BootAnimation.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,12 @@ class BootAnimation : public Thread, public IBinder::DeathRecipient
virtual void onFirstRef();
virtual void binderDied(const wp<IBinder>& who);

enum {
eOrientationDefault = 0,
eOrientation90 = 1,
eOrientation180 = 2,
eOrientation270 = 3,
};
struct Texture {
GLint w;
GLint h;
Expand Down
5 changes: 4 additions & 1 deletion cmds/idmap/create.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ namespace {
int open_idmap(const char *path)
{
int fd = TEMP_FAILURE_RETRY(open(path, O_WRONLY | O_CREAT | O_TRUNC, 0644));
bool needUnlink = true;
if (fd == -1) {
ALOGD("error: open %s: %s\n", path, strerror(errno));
goto fail;
Expand All @@ -43,14 +44,16 @@ namespace {
}
if (TEMP_FAILURE_RETRY(flock(fd, LOCK_EX | LOCK_NB)) != 0) {
ALOGD("error: flock %s: %s\n", path, strerror(errno));
// If the file is locked by another process, then we needn't unlink the file.
needUnlink = false;
goto fail;
}

return fd;
fail:
if (fd != -1) {
close(fd);
unlink(path);
if (needUnlink) unlink(path);
}
return -1;
}
Expand Down
102 changes: 61 additions & 41 deletions cmds/idmap/scan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ namespace {

bool operator<(Overlay const& rhs) const
{
// Note: order is reversed by design
return rhs.priority < priority;
return rhs.priority > priority;
}

String8 apk_path;
Expand Down Expand Up @@ -165,6 +164,62 @@ namespace {
delete dataMap;
return priority;
}

int idmap_scan(const char *overlay_dir, const char *target_package_name,
const char *target_apk_path, const char *idmap_dir,
SortedVector<Overlay>& overlayVector)
{
DIR *dir = opendir(overlay_dir);
if (dir == NULL) {
return EXIT_FAILURE;
}

struct dirent *dirent;
while ((dirent = readdir(dir)) != NULL) {
struct stat st;
char overlay_apk_path[PATH_MAX + 1];
snprintf(overlay_apk_path, PATH_MAX, "%s/%s", overlay_dir, dirent->d_name);
if (stat(overlay_apk_path, &st) < 0) {
continue;
}
if (!S_ISREG(st.st_mode) && !S_ISDIR(st.st_mode)) {
continue;
}

if (S_ISDIR(st.st_mode)) {
String8 dir_name = String8(overlay_apk_path).getPathLeaf();
if (dir_name == "." || dir_name == "..") {
// Skip the "." and ".." dir.
continue;
}
idmap_scan(overlay_apk_path, target_package_name, target_apk_path, idmap_dir,
overlayVector);
} else {
int priority = parse_apk(overlay_apk_path, target_package_name);
if (priority < 0) {
continue;
}

String8 idmap_path(idmap_dir);
idmap_path.appendPath(flatten_path(overlay_apk_path + 1));
idmap_path.append("@idmap");

if (idmap_create_path(target_apk_path, overlay_apk_path,
idmap_path.string()) != 0) {
ALOGE("error: failed to create idmap for target=%s overlay=%s idmap=%s\n",
target_apk_path, overlay_apk_path, idmap_path.string());
continue;
}

Overlay overlay(String8(overlay_apk_path), idmap_path, priority);
overlayVector.add(overlay);
}
}

closedir(dir);

return EXIT_SUCCESS;
}
}

int idmap_scan(const char *overlay_dir, const char *target_package_name,
Expand All @@ -176,48 +231,13 @@ int idmap_scan(const char *overlay_dir, const char *target_package_name,
return EXIT_FAILURE;
}

DIR *dir = opendir(overlay_dir);
if (dir == NULL) {
return EXIT_FAILURE;
}

SortedVector<Overlay> overlayVector;
struct dirent *dirent;
while ((dirent = readdir(dir)) != NULL) {
struct stat st;
char overlay_apk_path[PATH_MAX + 1];
snprintf(overlay_apk_path, PATH_MAX, "%s/%s", overlay_dir, dirent->d_name);
if (stat(overlay_apk_path, &st) < 0) {
continue;
}
if (!S_ISREG(st.st_mode)) {
continue;
}

int priority = parse_apk(overlay_apk_path, target_package_name);
if (priority < 0) {
continue;
}

String8 idmap_path(idmap_dir);
idmap_path.appendPath(flatten_path(overlay_apk_path + 1));
idmap_path.append("@idmap");

if (idmap_create_path(target_apk_path, overlay_apk_path, idmap_path.string()) != 0) {
ALOGE("error: failed to create idmap for target=%s overlay=%s idmap=%s\n",
target_apk_path, overlay_apk_path, idmap_path.string());
continue;
}

Overlay overlay(String8(overlay_apk_path), idmap_path, priority);
overlayVector.add(overlay);
}

closedir(dir);
int res = idmap_scan(overlay_dir, target_package_name, target_apk_path, idmap_dir,
overlayVector);

if (!writePackagesList(filename.string(), overlayVector)) {
if (res == EXIT_FAILURE || !writePackagesList(filename.string(), overlayVector)) {
return EXIT_FAILURE;
}

return EXIT_SUCCESS;
return res;
}
20 changes: 20 additions & 0 deletions cmds/media/src/com/android/commands/media/Media.java
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,26 @@ public void onVolumeInfoChanged(ParcelableVolumeInfo info) throws RemoteExceptio
System.out.println("onVolumeInfoChanged " + info);
}

@Override
public void onPlayItemResponse(boolean success) throws RemoteException {
System.out.println("onPlayItemResponse ");
}

@Override
public void onUpdateNowPlayingEntries(long[] playList) throws RemoteException {
System.out.println("onUpdateNowPlayingEntries ");
}

@Override
public void onUpdateFolderInfoBrowsedPlayer(String stringUri) throws RemoteException {
System.out.println("onUpdateFolderInfoBrowsedPlayer ");
}

@Override
public void onUpdateNowPlayingContentChange() throws RemoteException {
System.out.println("onUpdateNowPlayingContentChange ");
}

void printUsageMessage() {
try {
System.out.println("V2Monitoring session " + mController.getTag()
Expand Down
Loading